releaser: doesn't work on Windows #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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/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-${{ matrix.os }}-${{ hashFiles('.bazelversion', 'toolchain/private/zig_sdk.bzl', '.github/workflows/ci.yaml') }} | |
path: | | |
C:\Temp\zig-cache | |
~\AppData\Local\bazelisk' | |
- uses: actions/cache@v4 | |
name: "MacOS: cache bazelisk and zig-cache" | |
if: runner.os == 'macOS' | |
with: | |
key: cache-${{ matrix.os }}-${{ hashFiles('.bazelversion', 'toolchain/private/zig_sdk.bzl', '.github/workflows/ci.yaml') }} | |
path: | | |
/var/tmp/zig-cache | |
~/Library/Caches/bazelisk | |
- uses: actions/cache@v4 | |
name: "Linux: cache bazelisk and zig-cache" | |
if: runner.os == 'Linux' | |
with: | |
key: cache-${{ matrix.os }}-${{ hashFiles('.bazelversion', 'toolchain/private/zig_sdk.bzl', '.github/workflows/ci.yaml') }} | |
path: | | |
/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 and Windows | |
- run: tools/bazel test --config=darwin_toolchains //... | |
if: runner.os == 'Linux' || runner.os == 'Windows' | |
# MacOS | |
- run: tools/bazel test --build_tag_filters=-darwin_c //... | |
if: runner.os == 'macOS' | |
- run: tools/bazel build --config=darwin_toolchains --build_tag_filters=darwin_c //... | |
if: runner.os == 'macOS' | |
# Linux and macOS. On Windows protoc does not compile due to `-lpthread`. | |
- run: ci/lint | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
# Linux, macOS and Windows | |
- run: ci/list_toolchains_platforms | |
- run: ci/zig-utils | |
- run: ci/release | |
- run: ci/prepare_git && ci/test_example rules_cc override_repository | |
- run: ci/prepare_git && ci/test_example bzlmod override_module |