Skip to content

Commit

Permalink
zig cache fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Motiejus Jakštys committed Feb 14, 2024
1 parent 8af313f commit 735288a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
try-import %workspace%/.bazelrc.ci

test --sandbox_default_allow_network=false
test --test_output=errors

Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,42 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/cache@v4
name: "Windows: cache bazelisk and zig-cache"
if: runner.os == 'Windows'
with:
key: cache-${{ runner.os }}-${{ hashFiles('.bazelversion', 'toolchain/private/zig_sdk.bzl', '.github/workflows/ci.yaml') }}
path: |
'C:\Temp\hermetic_cc_toolchain'
'~\AppData\Local\bazelisk'
C:\Temp\hermetic_cc_toolchain
~\AppData\Local\bazelisk'
- uses: actions/cache@v4
name: "MacOS: cache bazelisk and zig-cache"
if: runner.os == 'macOS'
with:
key: cache-${{ runner.os }}-${{ hashFiles('.bazelversion', 'toolchain/private/zig_sdk.bzl', '.github/workflows/ci.yaml') }}
path: |
'/tmp/zig-cache'
'~/Library/Caches/bazelisk'
/tmp/zig-cache
~/Library/Caches/bazelisk
- uses: actions/cache@v4
name: "Linux: cache bazelisk and zig-cache"
if: runner.os == 'macOS'
if: runner.os == 'Linux'
with:
key: cache-${{ runner.os }}-${{ hashFiles('.bazelversion', 'toolchain/private/zig_sdk.bzl', '.github/workflows/ci.yaml') }}
path: |
'/tmp/zig-cache'
'~/.cache/bazelisk'
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
/tmp/zig-cache
~/.cache/bazelisk
- run: brew install bash
if: runner.os == 'macOS'

- run: echo "common --announce_rc" >> .bazelrc.ci
- run: echo "build --sandbox_add_mount_pair=C:\\Temp" >> .bazelrc.ci
if: runner.os == 'Windows'

# Linux, macOS and Windows
- run: ci/list_toolchains_platforms
- run: ci/zig-utils
Expand Down

0 comments on commit 735288a

Please sign in to comment.