Skip to content

Commit 44e6032

Browse files
ci: use nix devShell for ci env
1 parent 786065b commit 44e6032

1 file changed

Lines changed: 9 additions & 29 deletions

File tree

.github/workflows/rust.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,13 @@ env:
1111

1212
jobs:
1313
build:
14-
15-
runs-on: ubuntu-latest
16-
14+
runs-on: ubuntu-22.04
1715
steps:
18-
- uses: actions/checkout@v4
19-
20-
- name: Update Ubuntu Packages
21-
run: sudo apt-get update
22-
23-
- uses: awalsh128/cache-apt-pkgs-action@v1
24-
with:
25-
packages: llvm \
26-
clang \
27-
libclang-dev \
28-
libopencv-dev \
29-
libavutil-dev \
30-
libavcodec-dev \
31-
libavformat-dev
32-
33-
- name: Install gstreamer
34-
run: |
35-
sudo apt update
36-
sudo apt install -y aptitude
37-
sudo aptitude install -y libgstreamer1.0-dev
38-
39-
- uses: dtolnay/rust-toolchain@stable
40-
- uses: Swatinem/rust-cache@v2
41-
42-
- name: Run tests
43-
run: cargo test --features logging,graphing --verbose
16+
- uses: actions/checkout@v5
17+
- uses: cachix/install-nix-action@v31
18+
with:
19+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
20+
- uses: DeterminateSystems/magic-nix-cache-action@v13
21+
- uses: Swatinem/rust-cache@v2
22+
- name: Run tests
23+
run: nix develop ./#noFHS --command cargo test --features logging,graphing --verbose

0 commit comments

Comments
 (0)