add rust build cache on ci
All checks were successful
build / build-cargo (push) Successful in 6m3s
build / build-nix (push) Successful in 2m59s
build / check-nix (push) Successful in 3m13s

This commit is contained in:
Cyryl Płotnicki 2024-04-27 11:41:31 +01:00
parent 47cd375a44
commit dcb7a1ed89

View file

@ -11,6 +11,15 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
name: Checkout name: Checkout
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests - name: Run tests
run: | run: |
nix develop -c cargo nextest run --run-ignored all nix develop -c cargo nextest run --run-ignored all
@ -23,6 +32,15 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
name: Checkout name: Checkout
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: - name:
run: | run: |
nix build nix build
@ -35,6 +53,15 @@ jobs:
run: | run: |
nix flake metadata nix flake metadata
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Statix - name: Statix
run: | run: |
nix develop -c statix check nix develop -c statix check