diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaaf053..ad54029 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ env: jobs: linux-native: + timeout-minutes: 3 runs-on: ${{ matrix.machine.os }} if: success() || failure() strategy: @@ -46,6 +47,7 @@ jobs: run: cargo test --target ${{ matrix.machine.arch }}-unknown-linux-${{ matrix.libc }} --release --no-default-features linux-cross: + timeout-minutes: 5 runs-on: ubuntu-latest if: success() || failure() strategy: @@ -60,6 +62,7 @@ jobs: - arm-unknown-linux-musleabi - arm-unknown-linux-musleabihf - armv7-unknown-linux-gnueabihf + - i686-pc-windows-gnu # runs under wine, Itanium - i686-unknown-linux-gnu - i686-unknown-linux-musl - loongarch64-unknown-linux-gnu @@ -71,6 +74,7 @@ jobs: - riscv64gc-unknown-linux-gnu - s390x-unknown-linux-gnu - sparc64-unknown-linux-gnu + - x86_64-pc-windows-gnu # runs under wine, Itanium steps: - name: Checkout uses: actions/checkout@v4 @@ -91,7 +95,59 @@ jobs: - name: Test without std (release) run: cross test --target ${{ matrix.target }} --release --no-default-features + xwin-cross: + timeout-minutes: 10 + runs-on: ${{ matrix.machine.os }} + if: success() || failure() + strategy: + fail-fast: false + matrix: + machine: + - os: ubuntu-latest + xwin_arch: x86_64 + arch: amd64 + target: x86_64-pc-windows-msvc + - os: ubuntu-latest + xwin_arch: x86 + arch: i386 + target: i686-pc-windows-msvc + # XXX: Wine is hanging during initial startup on arm64??? + # - os: ubuntu-24.04-arm + # xwin_arch: aarch64 + # arch: arm64 + # target: aarch64-pc-windows-msvc + env: + XWIN_ARCH: ${{ matrix.machine.xwin_arch }} + WINEDEBUG: fixme+all,err+all + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Rust + run: rustup update nightly && rustup default nightly && rustup target add ${{ matrix.machine.target }} + - name: Install cargo-xwin + run: cargo install --locked cargo-xwin + - name: Install wine + run: | + set -exuo pipefail + sudo dpkg --add-architecture ${{ matrix.machine.arch }} + sudo apt-get update + sudo apt install wine:${{ matrix.machine.arch }} + wineboot + - name: Test with panic backend (debug) + run: LITHIUM_BACKEND=panic cargo xwin test --target ${{ matrix.machine.target }} + - name: Test with SEH backend (debug) + run: LITHIUM_BACKEND=seh cargo xwin test --target ${{ matrix.machine.target }} + - name: Test without std (debug) + run: cargo xwin test --target ${{ matrix.machine.target }} --no-default-features + - name: Test with panic backend (release) + run: LITHIUM_BACKEND=panic cargo xwin test --target ${{ matrix.machine.target }} --release + - name: Test with SEH backend (release) + run: LITHIUM_BACKEND=seh cargo xwin test --target ${{ matrix.machine.target }} --release + - name: Test without std (release) + run: cargo xwin test --target ${{ matrix.machine.target }} --release --no-default-features + emscripten: + timeout-minutes: 5 runs-on: ubuntu-latest if: success() || failure() steps: @@ -111,6 +167,7 @@ jobs: run: LITHIUM_BACKEND=emscripten cross test --target wasm32-unknown-emscripten --release wasi: + timeout-minutes: 3 runs-on: ubuntu-latest if: success() || failure() steps: @@ -141,6 +198,7 @@ jobs: # run: ci/cargo-wasi test --target wasm32-wasip1 --release --no-default-features darwin: + timeout-minutes: 3 runs-on: ${{ matrix.os }} if: success() || failure() strategy: @@ -168,6 +226,7 @@ jobs: run: cargo test --release windows: + timeout-minutes: 5 runs-on: windows-latest if: success() || failure() strategy: @@ -191,7 +250,6 @@ jobs: if: matrix.abi == 'gnu' run: set LITHIUM_BACKEND=itanium && cargo test - name: Test without std (debug) - if: matrix.abi == 'msvc' run: cargo test --no-default-features - name: Test with panic backend (release) run: set LITHIUM_BACKEND=panic && cargo test --release @@ -202,10 +260,10 @@ jobs: if: matrix.abi == 'gnu' run: set LITHIUM_BACKEND=itanium && cargo test --release - name: Test without std (release) - if: matrix.abi == 'msvc' run: cargo test --release --no-default-features miri-linux: + timeout-minutes: 5 runs-on: ubuntu-latest if: success() || failure() strategy: @@ -232,6 +290,7 @@ jobs: run: cargo miri test --target ${{ matrix.target }} --no-default-features valgrind: + timeout-minutes: 5 runs-on: ubuntu-latest env: RUSTC_BOOTSTRAP: '1' @@ -259,6 +318,7 @@ jobs: run: cargo valgrind test --release --no-default-features test-stable: + timeout-minutes: 3 runs-on: ubuntu-latest if: success() || failure() steps: @@ -272,6 +332,7 @@ jobs: run: cargo test --release lint: + timeout-minutes: 1 runs-on: ubuntu-latest strategy: fail-fast: false