-
Notifications
You must be signed in to change notification settings - Fork 130
100 lines (80 loc) · 2.3 KB
/
main.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
merge_group:
types: [checks_requested]
jobs:
linux-ci:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
features: ["unstable", "unstable force-inprocess", "unstable memfd"]
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: rustfmt
run: cargo fmt --check
- name: clippy
run: cargo clippy --features "${{ matrix.features }}"
- name: Cargo build
run: cargo build --features "${{ matrix.features }}"
- name: Cargo test
run: cargo test --features "${{ matrix.features }}"
env:
RUST_BACKTRACE: 1
mac-ci:
name: macOS
runs-on: macos-latest
strategy:
matrix:
features: ["unstable", "unstable force-inprocess"]
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Cargo build
run: cargo build --features "${{ matrix.features }}"
- name: Cargo test
run: cargo test --features "${{ matrix.features }}"
env:
RUST_BACKTRACE: 1
windows-ci:
name: Windows
runs-on: windows-latest
strategy:
matrix:
features: ["unstable", "unstable force-inprocess", "unstable windows-shared-memory-equality"]
target: ["x86_64-pc-windows-msvc", "i686-pc-windows-msvc"]
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- name: Cargo build
run: cargo build --features "${{ matrix.features }}" --target ${{ matrix.target }}
- name: Cargo test
run: cargo test --features "${{ matrix.features }}" --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1
build_result:
name: Result
runs-on: ubuntu-latest
needs:
- "linux-ci"
- "mac-ci"
- "windows-ci"
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"