Skip to content

Workflow file for this run

on: [push, pull_request]
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
msvc:
name: MSVC
strategy:
fail-fast: false
matrix:
rust_version: [stable, 1.64.0]
target:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc
- aarch64-pc-windows-msvc
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
targets: ${{ matrix.target }}
- run: pip install "pefile==2023.2.7"
- run: cargo build --verbose --release --target ${{ matrix.target }}
# Runner is x86_64, can only run i686 and x86_64
- if: contains(matrix.target, '86')
run: cargo test --verbose --release --target ${{ matrix.target }}
- if: contains(matrix.target, '86')
run: cargo run --verbose --release --target ${{ matrix.target }} -- empty-resource.rc
# Embed resources into a cross-compiled binary, and check.
- run: cargo build --release --target "${{ matrix.target }}" --manifest-path "example/version/Cargo.toml"
- run: python3 example/version/test.py "example/version/target/${{ matrix.target }}/release/embed-resource-example-version.exe"
- if: contains(matrix.target, '86')
run: "example/version/target/${{ matrix.target }}/release/embed-resource-example-version.exe"