diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c055218..f3be6cf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,7 +25,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-24.04, macos-latest, windows-latest] toolchain: [stable, nightly] cross-compiler: [clang-cl, clang] env: @@ -40,24 +40,23 @@ jobs: submodules: true - uses: seanmiddleditch/gha-setup-ninja@master - name: Install dependencies - if: matrix.os == 'macos-latest' + if: startsWith(matrix.os, 'macos') run: | brew install gnu-tar llvm echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Install dependencies - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get update - sudo apt-get install --quiet -y clang wine-stable winetricks - winetricks nocrashdialog + sudo apt-get install --quiet -y clang wine-stable - name: Install Clang - if: matrix.os == 'windows-latest' + if: startsWith(matrix.os, 'windows') run: choco install -y llvm - uses: dtolnay/rust-toolchain@master id: rustup with: toolchain: ${{ matrix.toolchain }} - components: llvm-tools-preview + components: llvm-tools - name: Cache cargo build uses: Swatinem/rust-cache@v2 - name: Cache test crates cargo build @@ -81,14 +80,13 @@ jobs: # Test CMake support cargo run --release xwin build --target x86_64-pc-windows-msvc --manifest-path tests/crfsuite-rs/Cargo.toml - name: xwin run - x86_64 - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu') run: | cargo run --release xwin run --target x86_64-pc-windows-msvc --manifest-path tests/hello-windows/Cargo.toml - # xwin test requires newer wine version - # - name: xwin test - x86_64 - # if: matrix.os == 'ubuntu-latest' - # run: | - # cargo run --release xwin test --target x86_64-pc-windows-msvc --manifest-path tests/hello-windows/Cargo.toml + - name: xwin test - x86_64 + if: startsWith(matrix.os, 'ubuntu') + run: | + cargo run --release xwin test --target x86_64-pc-windows-msvc --manifest-path tests/hello-windows/Cargo.toml - name: xwin build - aarch64 run: | rustup target add aarch64-pc-windows-msvc