Skip to content

Commit

Permalink
Initial ChirpStack Gateway Relay implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
brocaar committed Jan 24, 2024
1 parent c5bfcd0 commit 670296b
Show file tree
Hide file tree
Showing 43 changed files with 5,646 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: chirpstack
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
84 changes: 84 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
-
name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
-
name: Run tests
run: nix-shell --command "make test"

dist:
needs: tests
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- armv5te-unknown-linux-musleabi
- armv7-unknown-linux-musleabihf
- mips-unknown-linux-musl
- mipsel-unknown-linux-musl
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
-
name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-dist-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
-
name: Build distributables
run: nix-shell --command "make dist-${{ matrix.target }}"
-
name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
-
name: Upload binaries to S3
run: |
aws s3 sync dist s3://builds.loraserver.io/chirpstack-gateway-relay
if: startsWith(github.ref, 'refs/tags/v')
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix",
"rust-analyzer.showUnlinkedFileNotification": false
}
Loading

0 comments on commit 670296b

Please sign in to comment.