mirror of
https://github.com/n0-computer/noq.git
synced 2026-11-16 21:32:21 +00:00
ci: add testing on wine (#393)
* feat(ci): wine testing * capture all exe --------- Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
This commit is contained in:
@@ -4,3 +4,6 @@ rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
|
||||
[target.x86_64-pc-windows-gnu]
|
||||
linker = "x86_64-w64-mingw32-gcc"
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
name: Wine Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: wine-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
RUSTFLAGS: -Dwarnings
|
||||
|
||||
jobs:
|
||||
wine_test:
|
||||
name: Wine Sanity Check
|
||||
runs-on: [self-hosted, linux, X64]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Wine
|
||||
run: |
|
||||
# Use WineHQ for newer Wine with bcryptprimitives.dll support
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo mkdir -pm755 /etc/apt/keyrings
|
||||
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
||||
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --install-recommends winehq-stable || sudo apt-get install -y wine64 wine32
|
||||
# Initialize Wine prefix
|
||||
WINEARCH=win64 wineboot --init
|
||||
|
||||
- name: Install Rust + mingw target
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: x86_64-pc-windows-gnu
|
||||
|
||||
- name: Install mingw-w64
|
||||
run: sudo apt-get install -y mingw-w64
|
||||
|
||||
- name: Build tests
|
||||
# Release mode required - debug builds exceed mingw's export ordinal limit (~65k symbols)
|
||||
run: cargo build --target x86_64-pc-windows-gnu --tests --release
|
||||
|
||||
- name: List available tests
|
||||
run: |
|
||||
for exe in target/x86_64-pc-windows-gnu/release/deps/*.exe; do
|
||||
echo "=== Tests in $exe ==="
|
||||
wine "$exe" --list
|
||||
done
|
||||
|
||||
- name: Run tests under Wine
|
||||
run: |
|
||||
for exe in target/x86_64-pc-windows-gnu/release/deps/*.exe; do
|
||||
echo "=== Running $exe ==="
|
||||
wine "$exe" --test-threads=1
|
||||
done
|
||||
Reference in New Issue
Block a user