CI: test all supported platforms #3
Workflow file for this run
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: Check | |
on: | |
- push | |
- pull_request | |
env: | |
CARGO_NET_RETRY: 10 | |
CI: 1 | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
build: | |
name: CI (Windows) | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
target: | |
- x86_64-pc-windows-msvc | |
env: | |
CARGO_BUILD_TARGET: ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
target: ${{ matrix.target }} | |
profile: minimal | |
override: true | |
components: clippy | |
- name: Install System packages | |
run: | | |
python -m pip install pefile | |
- name: Clippy | |
run: cargo clippy | |
env: | |
RUSTFLAGS: "-D warnings -A clippy::missing_safety_doc" | |
- name: Test | |
run: cargo test --lib -- --test-threads 1 | |
env: | |
RUSTFLAGS: "" | |
- name: Check C | |
run: | | |
scripts/check.sh \ | |
"./release.sh | tee /tmp/code.c" \ | |
"cc -w /tmp/code.c -o /tmp/bin" | |
- name: Check Rust | |
run: | | |
scripts/check.sh \ | |
"./release-rs.sh | tee /tmp/code.rs" \ | |
"rustc +stable -O -A dead-code /tmp/code.rs -o /tmp/bin" |