Skip to content

Merge pull request #158 from motiejus/ci-cache-dir #3

Merge pull request #158 from motiejus/ci-cache-dir

Merge pull request #158 from motiejus/ci-cache-dir #3

Workflow file for this run

---
name: ci
on:
push:
pull_request:
defaults:
run:
shell: bash
concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/cache@v4
name: Windows: cache bazelisk and zig-cache

Check failure on line 22 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

You have an error in your yaml syntax on line 22
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'
- 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'
- uses: actions/cache@v4
name: Linux: 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'
'~/.cache/bazelisk'
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- run: brew install bash
if: runner.os == 'macOS'
# Linux, macOS and Windows
- run: ci/list_toolchains_platforms
- run: ci/zig-utils
# Linux and macOS
- run: ci/release
if: runner.os == 'Linux' || runner.os == 'macOS'
- run: ci/lint
if: runner.os == 'Linux' || runner.os == 'macOS'
# TODO: releaser is broken on windows
- run: ci/prepare_git && ci/test_example rules_cc override_repository
if: runner.os == 'Linux' || runner.os == 'macOS'
# Linux and Windows
- run: tools/bazel build --config=darwin_toolchains //...
if: runner.os == 'Linux' || runner.os == 'Windows'
# Linux
- run: ci/test --config=darwin_toolchains
if: runner.os == 'Linux'
# TODO windows: broken releaser. MacOS: cgo.
- run: ci/prepare_git && ci/test_example bzlmod override_module
if: runner.os == 'Linux'
# macOS
- run: tools/bazel build --config=darwin_toolchains --build_tag_filters=darwin_c //...
if: runner.os == 'macOS'