Skip to content

Commit

Permalink
Add test matrix for Windows GNU
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwe committed Sep 17, 2023
1 parent 3955a92 commit a499172
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,46 @@ jobs:
working-directory: build
run: ctest --output-on-failure --build-config Debug -j 3

windows_gnu:
name: Test Windows GNU
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2022
arch:
- x86_64
# - i686
# - aarch64
compiler:
- gcc # Clang only has experimental support for Cygwin / MinGW, so we don't test it
generator:
- ninja
- make
include:
- cmake: 3.22.6
- rust: 1.54.0

steps:
- uses: actions/checkout@v4
- name: Install CMake
uses: corrosion-rs/install-cmake@v2
with:
cmake: ${{ matrix.cmake }}
ninja: 1.10.0
- name: Install Rust
id: install_rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
targets: ${{matrix.arch}}-pc-windows-gnu
- name: New configure
run: cmake -S. -Bbuild "-DRust_TOOLCHAIN=${{steps.install_rust.outputs.name}}" --preset "${{ matrix.generator }}-${{ matrix.arch }}-pc-windows-gnu-${{ matrix.compiler }}"
- name: Run Tests
working-directory: build
run: ctest --output-on-failure --build-config Debug -j 3

# test_cxxbridge:
# name: Test cxxbridge integration
# runs-on: ${{ matrix.os }}
Expand Down
52 changes: 52 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@
"Rust_CARGO_TARGET": "x86_64-pc-windows-gnu"
}
},
{
"name": "i686-pc-windows-gnu",
"hidden": true,
"inherits": ["windows-only"],
"cacheVariables": {
"Rust_CARGO_TARGET": "i686-pc-windows-gnu"
}
},
{
"name": "aarch64-pc-windows-gnu",
"hidden": true,
"inherits": ["windows-only"],
"cacheVariables": {
"Rust_CARGO_TARGET": "aarch64-pc-windows-gnu"
}
},
{
"name": "vs-platform-arm64",
"hidden": true,
Expand Down Expand Up @@ -139,6 +155,14 @@
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "gcc",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++"
}
},
{
"name": "clang-cl",
"hidden": true,
Expand Down Expand Up @@ -184,6 +208,34 @@
{
"name": "ninja-x86_64-pc-windows-gnu-clang",
"inherits": ["ninja", "x86_64-pc-windows-gnu", "clang"]
},
{
"name": "make-x86_64-pc-windows-gnu-clang",
"inherits": ["make", "x86_64-pc-windows-gnu", "clang"]
},
{
"name": "ninja-x86_64-pc-windows-gnu-gcc",
"inherits": ["ninja", "x86_64-pc-windows-gnu", "gcc", "windows-only"]
},
{
"name": "make-x86_64-pc-windows-gnu-gcc",
"inherits": ["make", "x86_64-pc-windows-gnu", "gcc", "windows-only"]
},
{
"name": "ninja-i686-pc-windows-gnu-clang",
"inherits": ["ninja", "i686-pc-windows-gnu", "clang", "windows-10-cross"]
},
{
"name": "make-i686-pc-windows-gnu-clang",
"inherits": ["make", "i686-pc-windows-gnu", "clang", "windows-10-cross"]
},
{
"name": "ninja-aarch64-pc-windows-gnu-clang",
"inherits": ["ninja", "aarch64-pc-windows-gnu", "clang", "windows-10-cross"]
},
{
"name": "make-aarch64-pc-windows-gnu-clang",
"inherits": ["make", "aarch64-pc-windows-gnu", "clang", "windows-10-cross"]
}
]
}

0 comments on commit a499172

Please sign in to comment.