Skip to content

Commit 670296b

Browse files
committed
Initial ChirpStack Gateway Relay implementation.
1 parent c5bfcd0 commit 670296b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5646
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: chirpstack

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Please see the documentation for all configuration options:
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "cargo"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"

.github/workflows/main.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v2
17+
-
18+
name: Install Nix
19+
uses: cachix/install-nix-action@v22
20+
with:
21+
nix_path: nixpkgs=channel:nixos-23.05
22+
-
23+
name: Cargo cache
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.cargo/bin/
28+
~/.cargo/registry/index/
29+
~/.cargo/registry/cache/
30+
~/.cargo/git/db/
31+
target/
32+
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
33+
-
34+
name: Run tests
35+
run: nix-shell --command "make test"
36+
37+
dist:
38+
needs: tests
39+
runs-on: ubuntu-latest
40+
if: startsWith(github.ref, 'refs/tags/v')
41+
strategy:
42+
matrix:
43+
target:
44+
- x86_64-unknown-linux-musl
45+
- aarch64-unknown-linux-musl
46+
- armv5te-unknown-linux-musleabi
47+
- armv7-unknown-linux-musleabihf
48+
- mips-unknown-linux-musl
49+
- mipsel-unknown-linux-musl
50+
steps:
51+
-
52+
name: Checkout
53+
uses: actions/checkout@v2
54+
-
55+
name: Install Nix
56+
uses: cachix/install-nix-action@v22
57+
with:
58+
nix_path: nixpkgs=channel:nixos-23.05
59+
-
60+
name: Cargo cache
61+
uses: actions/cache@v3
62+
with:
63+
path: |
64+
~/.cargo/bin/
65+
~/.cargo/registry/index/
66+
~/.cargo/registry/cache/
67+
~/.cargo/git/db/
68+
target/
69+
key: ${{ runner.os }}-cargo-dist-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
70+
-
71+
name: Build distributables
72+
run: nix-shell --command "make dist-${{ matrix.target }}"
73+
-
74+
name: Configure AWS credentials
75+
uses: aws-actions/configure-aws-credentials@v1
76+
with:
77+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
78+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
79+
aws-region: eu-west-1
80+
-
81+
name: Upload binaries to S3
82+
run: |
83+
aws s3 sync dist s3://builds.loraserver.io/chirpstack-gateway-relay
84+
if: startsWith(github.ref, 'refs/tags/v')

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix",
3+
"rust-analyzer.showUnlinkedFileNotification": false
4+
}

0 commit comments

Comments
 (0)