-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (51 loc) · 1.4 KB
/
rust.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
name: Rust
on:
push:
branches:
- master
paths:
- '.github/workflows/rust.yml'
- 'src/**/*.rs'
- 'tests/**/*.rs'
- 'Cargo.toml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
paths:
- '.github/workflows/rust.yml'
- 'src/**/*.rs'
- 'tests/**/*.rs'
- 'Cargo.toml'
jobs:
build:
runs-on: windows-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Install Rust Windows
if: runner.os == 'Windows'
run: |
if (Get-Command "rustup" -ErrorAction SilentlyContinue) {
rustup update
} else {
Invoke-WebRequest https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe -OutFile rustup-init.exe
./rustup-init.exe -y --profile minimal --default-toolchain stable
echo ::add-path::%USERPROFILE%\.cargo\bin
}
- name: Rust version
run: |
cargo --version
rustc --version
- name: Check std
run: cargo check --features std,monitor
- name: Test
run: cargo test --features monitor
env:
RUST_TEST_THREADS: 1
- name: Test x86
run: |
rustup target add i686-pc-windows-msvc
cargo test --target i686-pc-windows-msvc --features monitor
env:
RUST_TEST_THREADS: 1