chore: Nix: use /nix/var/cache/ccache for macOS
This commit is contained in:
parent
baeea69972
commit
70daaab0a0
2 changed files with 3 additions and 5 deletions
6
.github/workflows/nix-ci.yml
vendored
6
.github/workflows/nix-ci.yml
vendored
|
|
@ -36,12 +36,12 @@ jobs:
|
|||
with:
|
||||
extra_nix_config: |
|
||||
max-jobs = auto
|
||||
extra-sandbox-paths = /var/cache/ccache
|
||||
extra-sandbox-paths = /nix/var/cache/ccache
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /var/cache/ccache
|
||||
key: ${{ matrix.name }}-build-${{ github.sha }}
|
||||
path: /nix/var/cache/ccache
|
||||
# fall back to (latest) previous cache
|
||||
restore-keys: |
|
||||
${{ matrix.name }}-build
|
||||
|
|
@ -49,8 +49,6 @@ jobs:
|
|||
# can't use `nix-shell` yet since it will complain about the missing sandbox path
|
||||
shell: bash -euo pipefail {0}
|
||||
run: |
|
||||
[ -d /var/cache/ccache ] || sudo mkdir -m0770 -p /var/cache/ccache
|
||||
sudo chown -R root:nixbld /var/cache/ccache
|
||||
- name: Build
|
||||
run: nix build
|
||||
- name: Test
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
bintools = llvmPackages_10.lldClang.bintools;
|
||||
};
|
||||
extraConfig = ''
|
||||
export CCACHE_DIR=/var/cache/ccache
|
||||
export CCACHE_DIR=/nix/var/cache/ccache
|
||||
export CCACHE_UMASK=007
|
||||
export CCACHE_BASE_DIR=$NIX_BUILD_TOP
|
||||
[ -d $CCACHE_DIR ] || exec ${cc}/bin/$(basename "$0") "$@"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue