add separate windows test #1
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: test-suite | |
on: | |
push: | |
branches: | |
- test-windows-runner | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
# Deny warnings in CI | |
# Disable debug info (see https://github.com/sigp/lighthouse/issues/4005) | |
RUSTFLAGS: "-D warnings -C debuginfo=0" | |
# Prevent Github API rate limiting. | |
LIGHTHOUSE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Enable self-hosted runners for the sigp repo only. | |
SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/lighthouse' }} | |
# Self-hosted runners need to reference a different host for `./watch` tests. | |
WATCH_HOST: ${{ github.repository == 'sigp/lighthouse' && 'host.docker.internal' || 'localhost' }} | |
# Disable incremental compilation | |
CARGO_INCREMENTAL: 0 | |
# Enable portable to prevent issues with caching `blst` for the wrong CPU type | |
TEST_FEATURES: portable | |
jobs: | |
target-branch-check: | |
name: target-branch-check | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' || github.event_name == 'merge_group' | |
steps: | |
- name: Check that the pull request is not targeting the stable branch | |
run: test ${{ github.base_ref }} != "stable" | |
release-tests-windows: | |
name: release-tests-windows | |
runs-on: ${{ github.repository == 'antondlr/lighthouse' && fromJson('["self-hosted", "windows", "CI"]') || 'windows-2019' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get latest version of stable Rust | |
if: env.SELF_HOSTED_RUNNERS == 'false' | |
uses: moonrepo/setup-rust@v1 | |
with: | |
channel: stable | |
cache-target: release | |
bins: cargo-nextest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Foundry (anvil) | |
if: env.SELF_HOSTED_RUNNERS == 'false' | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d | |
- name: Install make | |
if: env.SELF_HOSTED_RUNNERS == 'false' | |
run: choco install -y make | |
# - uses: KyleMayes/install-llvm-action@v1 | |
# if: env.SELF_HOSTED_RUNNERS == 'false' | |
# with: | |
# version: "16.0" | |
# directory: ${{ runner.temp }}/llvm | |
- name: Set LIBCLANG_PATH | |
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | |
- name: Run tests in release | |
run: make nextest-release | |
- name: Show cache stats | |
if: env.SELF_HOSTED_RUNNERS == 'true' | |
run: sccache --show-stats |