Fix gnullvm and test gnullvm with msys2 in CI #1307
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- 'master' | |
- 'stable/**' | |
jobs: | |
windows_gnullvm: | |
name: Test Windows gnullvm | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-2022 | |
arch: | |
- x86_64 | |
# - i686 | |
# - aarch64 | |
compiler: | |
- clang | |
generator: | |
- ninja | |
- make | |
include: | |
- cmake: 3.22.6 | |
- rust: 1.79.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install CMake | |
uses: lukka/get-cmake@519de0c7b4812477d74976b2523a9417f552d126 | |
with: | |
cmakeVersion: "${{ matrix.cmake }}" | |
ninjaVersion: "~1.10.0" | |
- name: Install Rust | |
id: install_rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
targets: ${{matrix.arch}}-pc-windows-gnullvm | |
- uses: msys2/setup-msys2@v2 | |
with: | |
# Note: perhaps needs to be part of the matrix if we cross-compile | |
msystem: CLANG64 | |
- name: Configure | |
shell: msys2 {0} | |
run: cmake -S. -Bbuild "-DRust_TOOLCHAIN=${{steps.install_rust.outputs.name}}" --preset "${{ matrix.generator }}-${{ matrix.arch }}-pc-windows-gnullvm" | |
- name: Run Tests | |
shell: msys2 {0} | |
working-directory: build | |
run: ctest --output-on-failure --build-config Debug -j 3 | |
# We want an "accumulation" job here because it is easier to specify required | |
# jobs here via needs, then in the github UI, since we use matrix jobs. | |
ci-success: | |
name: bors-ci-status | |
if: ${{ always() }} | |
needs: | |
- windows_gnullvm | |
runs-on: ubuntu-latest | |
# Step copied from: https://github.com/cross-rs/cross/blob/80c9f9109a719ffb0f694060ddc6e371d5b3a540/.github/workflows/ci.yml#L361 | |
steps: | |
- name: Result | |
run: | | |
jq -C <<< "${needs}" | |
# Check if all needs were successful or skipped. | |
"$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")" | |
env: | |
needs: ${{ toJson(needs) }} | |