mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-21 18:40:19 +00:00
cache cargo home
This commit is contained in:
parent
6789993913
commit
a6300e6498
1 changed files with 24 additions and 1 deletions
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
|
@ -6,6 +6,8 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CARGO_HOME: ~/.cargo
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -29,11 +31,22 @@ jobs:
|
||||||
nix_path: nixpkgs=channel:nixos-24.05
|
nix_path: nixpkgs=channel:nixos-24.05
|
||||||
enable_kvm: true
|
enable_kvm: true
|
||||||
extra_nix_config: "experimental-features = nix-command flakes"
|
extra_nix_config: "experimental-features = nix-command flakes"
|
||||||
- uses: cachix/cachix-action@v15
|
- name: Restore Nix store
|
||||||
|
uses: cachix/cachix-action@v15
|
||||||
with:
|
with:
|
||||||
name: soywod
|
name: soywod
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
extraPullNames: nix-community
|
extraPullNames: nix-community
|
||||||
|
- name: Restore Cargo home
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
id: cache-cargo-home
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
- name: Build release
|
- name: Build release
|
||||||
run: |
|
run: |
|
||||||
nix run -L .#${{ matrix.target }} -- --version
|
nix run -L .#${{ matrix.target }} -- --version
|
||||||
|
@ -44,3 +57,13 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
result/himalaya.tgz
|
result/himalaya.tgz
|
||||||
result/himalaya.zip
|
result/himalaya.zip
|
||||||
|
- name: Save Cargo home
|
||||||
|
id: cache-cargo-home
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
key: ${{ steps.cache-cargo-home.outputs.cache-primary-key }}
|
||||||
|
|
Loading…
Reference in a new issue