mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-28 08:01:15 +00:00
## Description We made these checks required, that means they need to be triggered by the merge group. ## API Changes n/a ## Notes & open questions none ## Change checklist - [x] Self-review. - [x] 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. - [x] Tests if relevant. - [x] All API changes documented.
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
name: Wine Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
merge_group:
|
|
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:
|
|
pick-runner:
|
|
uses: "$/.github/workflows/pick-runner.yml"
|
|
with:
|
|
min_free_runners: 3
|
|
secrets:
|
|
RUNNER_READ_TOKEN: ${{ secrets.RUNNER_READ_TOKEN }}
|
|
|
|
wine_test:
|
|
name: Wine Sanity Check
|
|
needs: pick-runner
|
|
runs-on: ${{ fromJSON(needs.pick-runner.outputs.overflow_1) }}
|
|
# runs-on: [self-hosted, linux, X64]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
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@e2a55d2ffb04f378e9626c28d38b36d230d1e12f # v1
|
|
with:
|
|
toolchain: stable
|
|
targets: x86_64-pc-windows-gnu
|
|
|
|
- name: Install mingw-w64
|
|
run: sudo apt-get install -y mingw-w64
|
|
|
|
- name: Install cargo-nextest
|
|
uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26
|
|
with:
|
|
tool: nextest
|
|
|
|
- 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 -p iroh --release
|
|
|
|
- name: Run tests under Wine
|
|
env:
|
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER: wine
|
|
run: >
|
|
cargo nextest run
|
|
--locked
|
|
--target x86_64-pc-windows-gnu
|
|
--profile wine
|
|
--release
|
|
-p iroh
|