-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (62 loc) · 2.13 KB
/
build-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
- wasm32-unknown-unknown
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
vsversion: 2022
- name: Install Rust toolchain
run: |
rustup toolchain install nightly --target ${{ matrix.target }} --profile default --component clippy
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: 21
- name: Install System packages
run: |
python -m pip install pefile
- name: Clippy
run: cargo clippy --all-targets -- -D warnings -A clippy::missing_safety_doc
- name: Rustfmt
run: cargo fmt --check --all
- name: Test
if: ${{ matrix.target != 'wasm32-unknown-unknown' }}
run: cargo test --no-fail-fast -- --test-threads 1
- name: Check cargo build
if: ${{ matrix.target != 'wasm32-unknown-unknown' }}
run: |
python .\scripts\ci.py ${{ runner.temp }} _ CargoDev 0 .\tests\ci-dev.json
- name: Check cargo build --release
if: ${{ matrix.target != 'wasm32-unknown-unknown' }}
run: |
python .\scripts\ci.py ${{ runner.temp }} _ CargoRelease 0 .\tests\ci.json
- name: Check C (x86_64)
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
run: |
python .\scripts\ci.py ${{ runner.temp }} .\release-64bit-windows.cmd C 64 .\tests\ci.json
- name: Check Rust (x86_64)
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
run: |
python .\scripts\ci.py ${{ runner.temp }} .\release-64bit-windows-rs.cmd Rust 64 .\tests\ci.json
- name: Check wasm32
if: ${{ matrix.target == 'wasm32-unknown-unknown' }}
run: |
python .\scripts\ci.py ${{ runner.temp }} .\release-wasm32.cmd JavaScript 32 .\tests\ci.json