mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-25 04:35:17 +00:00
c334d2da21
## Description - Uses `--locked` to ensure we only use deps from the lock file - Adds cooldown period to dependabot - pins actions versions - introduces zizimor and pinact ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the --> <!-- PR. --> ## Change checklist <!-- Remove any that are not relevant. --> - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. - [ ] This PR was created by a human that thought critically about the proposed change and wrote an as clear and concise description as they could. - [ ] This PR isn't slop, and is carefully crafted to do have the intented effect. - [ ] `cargo make` passes locally. --------- Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
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
|
|
|
|
# Default to read-only; jobs that need more grant it explicitly.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
wine_test:
|
|
name: Wine Sanity Check
|
|
runs-on: [self-hosted, linux, X64]
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- 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@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
|
|
with:
|
|
toolchain: stable
|
|
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 --locked --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
|