Test Windows gnullvm targets on CI #92
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: CI | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
linux-native: | |
timeout-minutes: 3 | |
runs-on: ${{ matrix.machine.os }} | |
if: success() || failure() | |
strategy: | |
fail-fast: false | |
matrix: | |
libc: [gnu, musl] | |
machine: | |
- os: ubuntu-latest | |
arch: x86_64 | |
- os: ubuntu-24.04-arm | |
arch: aarch64 | |
env: | |
target: ${{ matrix.machine.arch }}-unknown-linux-${{ matrix.libc }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Add target | |
run: rustup target add $target | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic cargo test --target $target | |
- name: Test with Itanium backend (debug) | |
run: LITHIUM_BACKEND=itanium cargo test --target $target | |
- name: Test with std thread locals (debug) | |
run: LITHIUM_THREAD_LOCAL=std cargo test --target $target | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic cargo test --target $target --release | |
- name: Test with Itanium backend (release) | |
run: LITHIUM_BACKEND=itanium cargo test --target $target --release | |
- name: Test with std thread locals (release) | |
run: LITHIUM_THREAD_LOCAL=std cargo test --target $target --release | |
linux-cross: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- aarch64-linux-android | |
- arm-linux-androideabi | |
- armv7-linux-androideabi | |
- arm-unknown-linux-gnueabi | |
- arm-unknown-linux-gnueabihf | |
- arm-unknown-linux-musleabi | |
- arm-unknown-linux-musleabihf | |
- armv7-unknown-linux-gnueabihf | |
- i686-unknown-linux-gnu | |
- i686-unknown-linux-musl | |
- loongarch64-unknown-linux-gnu | |
- loongarch64-unknown-linux-musl | |
- mips64-unknown-linux-gnuabi64 | |
- mips64el-unknown-linux-gnuabi64 | |
- powerpc64-unknown-linux-gnu | |
- powerpc64le-unknown-linux-gnu | |
- riscv64gc-unknown-linux-gnu | |
- s390x-unknown-linux-gnu | |
- sparc64-unknown-linux-gnu | |
env: | |
target: ${{ matrix.target }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Install Cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic cross test --target $target | |
- name: Test with Itanium backend (debug) | |
run: LITHIUM_BACKEND=itanium cross test --target $target | |
- name: Test with std thread locals (debug) | |
run: LITHIUM_THREAD_LOCAL=std cross test --target $target | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic cross test --target $target --release | |
- name: Test with Itanium backend (release) | |
run: LITHIUM_BACKEND=itanium cross test --target $target --release | |
- name: Test with std thread locals (release) | |
run: LITHIUM_THREAD_LOCAL=std cross test --target $target --release | |
emscripten: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
env: | |
target: wasm32-unknown-emscripten | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Install Cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic cross test --target $target | |
- name: Test with Itanium backend (debug) | |
run: RUSTFLAGS="-Z emscripten_wasm_eh" LITHIUM_BACKEND=itanium cross test --target $target -Z build-std | |
- name: Test with Emscripten backend (debug) | |
run: LITHIUM_BACKEND=emscripten cross test --target $target | |
- name: Test with std thread locals (debug) | |
run: LITHIUM_THREAD_LOCAL=std cross test --target $target | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic cross test --target $target --release | |
# XXX: https://github.com/rust-lang/rust/issues/132416 | |
# - name: Test with Itanium backend (release) | |
# run: RUSTFLAGS="-Z emscripten_wasm_eh" LITHIUM_BACKEND=itanium cross test --target $target --release -Z build-std | |
- name: Test with Emscripten backend (release) | |
run: LITHIUM_BACKEND=emscripten cross test --target $target --release | |
- name: Test with std thread locals (release) | |
run: LITHIUM_THREAD_LOCAL=std cross test --target $target --release | |
wasi: | |
timeout-minutes: 3 | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
env: | |
target: wasm32-wasip1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Add target | |
run: rustup target add $target | |
- name: Install rust-src | |
run: rustup component add rust-src | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic ci/cargo-wasi test --target $target | |
- name: Test with Itanium backend (debug) | |
run: LITHIUM_BACKEND=itanium ci/cargo-wasi test --target $target | |
- name: Test with std thread locals (debug) | |
run: LITHIUM_THREAD_LOCAL=std ci/cargo-wasi test --target $target | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic ci/cargo-wasi test --target $target --release | |
# XXX: Upstream bug at https://github.com/rust-lang/rust/issues/132416 | |
# - name: Test with Itanium backend (release) | |
# run: LITHIUM_BACKEND=itanium ci/cargo-wasi test --target $target --release | |
# - name: Test with std thread locals (release) | |
# run: LITHIUM_THREAD_LOCAL=std ci/cargo-wasi test --target $target --release | |
darwin: | |
timeout-minutes: 3 | |
runs-on: ${{ matrix.os }} | |
if: success() || failure() | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-13 # x86_64 | |
- macos-15 # aarch64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic cargo test | |
- name: Test with Itanium backend (debug) | |
run: LITHIUM_BACKEND=itanium cargo test | |
- name: Test with std thread locals (debug) | |
run: LITHIUM_THREAD_LOCAL=std cargo test | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic cargo test --release | |
- name: Test with Itanium backend (release) | |
run: LITHIUM_BACKEND=itanium cargo test --release | |
- name: Test with std thread locals (release) | |
run: LITHIUM_THREAD_LOCAL=std cargo test --release | |
windows: | |
timeout-minutes: 5 | |
runs-on: windows-latest | |
if: success() || failure() | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64, i686] | |
abi: [msvc, gnu, gnullvm] | |
env: | |
host: ${{ matrix.arch }}-pc-windows-${{ matrix.abi == 'gnullvm' && 'gnu' || matrix.abi }} | |
target: ${{ matrix.arch }}-pc-windows-${{ matrix.abi }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set default-host | |
run: rustup set default-host $host | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Configure target | |
if: matrix.abi == 'gnullvm' | |
run: > | |
echo "[target.${{ matrix.arch }}-pc-windows-gnullvm]" >~/.cargo/config.toml && | |
echo "linker = 'clang.exe'" >>~/.cargo/config.toml && | |
echo "rustflags = ['-C', 'link-arg=-fuse-ld=lld']" >>~/.cargo/config.toml | |
- name: Add target | |
if: matrix.abi == 'gnullvm' | |
run: rustup target add $target | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic ci/cargo-save "Test with panic backend (debug)" test --target $target | |
- name: Test with SEH backend (debug) | |
if: matrix.abi == 'msvc' | |
run: LITHIUM_BACKEND=seh ci/cargo-save "Test with SEH backend (debug)" test --target $target | |
- name: Test with Itanium backend (debug) | |
if: matrix.abi == 'gnu' || matrix.abi == 'gnullvm' | |
run: LITHIUM_BACKEND=itanium ci/cargo-save "Test with Itanium backend (debug)" test --target $target | |
- name: Test with std thread locals (debug) | |
if: matrix.abi == 'msvc' || matrix.abi == 'gnullvm' | |
run: LITHIUM_THREAD_LOCAL=std ci/cargo-save "Test with std thread locals (debug)" test --target $target | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic ci/cargo-save "Test with panic backend (release)" test --target $target --release | |
- name: Test with SEH backend (release) | |
if: matrix.abi == 'msvc' | |
run: LITHIUM_BACKEND=seh ci/cargo-save "Test with SEH backend (release)" test --target $target --release | |
- name: Test with Itanium backend (release) | |
if: matrix.abi == 'gnu' || matrix.abi == 'gnullvm' | |
run: LITHIUM_BACKEND=itanium ci/cargo-save "Test with Itanium backend (release)" test --target $target --release | |
- name: Test with std thread locals (release) | |
if: matrix.abi == 'msvc' || matrix.abi == 'gnullvm' | |
run: LITHIUM_THREAD_LOCAL=std ci/cargo-save "Test with std thread locals (release)" test --target $target --release | |
- name: Upload built tests for Wine | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-${{ env.target }} | |
path: saved-jobs | |
retention-days: 1 | |
wine: | |
timeout-minutes: 3 | |
runs-on: ${{ matrix.machine.os }} | |
needs: windows | |
strategy: | |
fail-fast: false | |
matrix: | |
machine: | |
- os: ubuntu-latest | |
ubuntu_arch: amd64 | |
rust_arch: x86_64 | |
- os: ubuntu-latest | |
ubuntu_arch: i386 | |
rust_arch: i686 | |
# XXX: Wine is hanging during initial startup on arm64??? | |
# - os: ubuntu-24.04-arm | |
# ubuntu_arch: arm64 | |
# rust_arch: aarch64 | |
abi: [msvc, gnu, gnullvm] | |
env: | |
WINEDEBUG: fixme+all,err+all # :ferrisClueless: | |
target: ${{ matrix.machine.rust_arch }}-pc-windows-${{ matrix.abi }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install wine | |
run: | | |
set -exuo pipefail | |
sudo dpkg --add-architecture ${{ matrix.machine.ubuntu_arch }} | |
sudo apt-get update | |
sudo apt install wine:${{ matrix.machine.ubuntu_arch }} | |
wineboot | |
- name: Download built tests | |
uses: actions/download-artifact@v4 | |
with: | |
name: tests-${{ env.target }} | |
path: saved-jobs | |
- name: Run tests | |
run: ci/run-saved-jobs | |
miri-linux: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- i686-unknown-linux-gnu | |
- powerpc64-unknown-linux-gnu | |
env: | |
target: ${{ matrix.target }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Install Miri | |
run: rustup component add miri | |
- name: Add target | |
run: rustup target add $target | |
- name: Test with panic backend | |
run: LITHIUM_BACKEND=panic cargo miri test --target $target | |
- name: Test with Itanium backend | |
run: LITHIUM_BACKEND=itanium cargo miri test --target $target | |
- name: Test with std thread locals | |
run: LITHIUM_THREAD_LOCAL=std cargo miri test --target $target | |
valgrind: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
env: | |
VALGRINDFLAGS: --suppressions=valgrind.supp | |
if: success() || failure() | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Install cargo valgrind | |
run: sudo apt-get update && sudo apt-get install valgrind && cargo install cargo-valgrind | |
- name: Test with panic backend (debug) | |
run: LITHIUM_BACKEND=panic cargo valgrind test | |
- name: Test with Itanium backend (debug) | |
run: LITHIUM_BACKEND=itanium cargo valgrind test | |
- name: Test with std thread locals (debug) | |
run: LITHIUM_THREAD_LOCAL=std cargo valgrind test | |
- name: Test with panic backend (release) | |
run: LITHIUM_BACKEND=panic cargo valgrind test --release | |
- name: Test with Itanium backend (release) | |
run: LITHIUM_BACKEND=itanium cargo valgrind test --release | |
- name: Test with std thread locals (release) | |
run: LITHIUM_THREAD_LOCAL=std cargo valgrind test --release | |
test-stable: | |
timeout-minutes: 3 | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable && rustup default stable | |
- name: Test with panic backend (debug) | |
run: cargo test | |
- name: Test with panic backend (release) | |
run: cargo test --release | |
lint: | |
timeout-minutes: 1 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [panic, itanium, seh, emscripten] | |
thread_local: [std, attribute] | |
env: | |
LITHIUM_BACKEND: ${{ matrix.backend }} | |
LITHIUM_THREAD_LOCAL: ${{ matrix.thread_local }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- name: Install rustfmt and clippy | |
run: rustup component add rustfmt clippy | |
- name: Rustfmt | |
run: cargo fmt -- --check | |
- name: Clippy | |
run: cargo clippy -- -D warnings |