File tree Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 7
7
-
8
8
name : Checkout
9
9
uses : actions/checkout@v2
10
+ -
11
+ name : Install Nix
12
+ uses : cachix/install-nix-action@v20
13
+ with :
14
+ nix_path : nixpkgs=channel:nixos-23.05
10
15
-
11
16
name : Cargo cache
12
17
uses : actions/cache@v3
13
18
with :
14
- path : .rust/
15
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
16
- -
17
- name : Run the tests
18
- run : make test
19
+ path : |
20
+ ~/.cargo/bin/
21
+ ~/.cargo/registry/index/
22
+ ~/.cargo/registry/cache/
23
+ ~/.cargo/git/db/
24
+ target/
25
+ key : ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
19
26
-
20
- name : Make cache accessible to caching action
21
- run : |
22
- sudo chown $(whoami):$(whoami) -R .rust
27
+ name : Run tests
28
+ run : nix-shell --command "make test"
Original file line number Diff line number Diff line change 1
1
# hidden files
2
2
. *
3
3
! /.cargo
4
+ ! /.github
4
5
5
6
# rust buids / cache
6
7
/target
Original file line number Diff line number Diff line change @@ -6,8 +6,4 @@ services:
6
6
dockerfile : Dockerfile-devel
7
7
volumes :
8
8
- ./:/chirpstack-udp-forwarder
9
- - ./.rust/target:/chirpstack-udp-forwarder/target
10
- - ./.rust/rustup:/usr/local/rustup
11
- - ./.rust/cargo/registry/index:/usr/local/cargo/registry/index
12
- - ./.rust/cargo/registry/cache:/usr/local/cargo/registry/cache
13
- - ./.rust/cargo/git/db:/usr/local/cargo/git/db
9
+
Original file line number Diff line number Diff line change 1
- { pkgs ? import ( fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-22.11 .tar.gz" ) { } } :
1
+ { pkgs ? import ( fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-23.05 .tar.gz" ) { } } :
2
2
3
3
pkgs . mkShell {
4
4
buildInputs = [
You can’t perform that action at this time.
0 commit comments