-
-
Notifications
You must be signed in to change notification settings - Fork 2
113 lines (106 loc) · 3.11 KB
/
full_ci.yaml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: full CI
on:
push:
branches: [ "main" ]
merge_group:
pull_request:
types: [opened, synchronize, reopened]
jobs:
style_check:
name: Style check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Check style
run: sh ci/style.sh
build_channels_linux:
name: Build Channels Linux
runs-on: ubuntu-22.04
env:
OS: linux
RUSTFLAGS: -D warnings
strategy:
fail-fast: true
max-parallel: 2
matrix:
toolchain:
- stable
- 1.74.0
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
- name: Execute run.sh
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/run.sh
build_channels_macos:
name: Build Channels macOS
env:
OS: macos
RUSTFLAGS: -D warnings
strategy:
fail-fast: true
max-parallel: 2
matrix:
target:
- { toolchain: stable, os: macos-14 }
- { toolchain: 1.74.0, os: macos-14 }
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Execute build.sh
run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/run.sh
build_channels_windows:
name: Build Channels Windows
runs-on: windows-2019
env:
OS: windows
RUSTFLAGS: -D warnings
strategy:
fail-fast: true
matrix:
toolchain:
- stable
- 1.74.0
target:
- x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- name: Self-update rustup
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
shell: bash
- name: Execute build.sh
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/run.sh
shell: bash
check_cfg:
name: "Check #[cfg]s"
runs-on: ubuntu-22.04
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
- name: Build with check-cfg
run: LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
# protection, rather than having to add each job separately.
success:
name: success
runs-on: ubuntu-22.04
needs:
- style_check
- build_channels_linux
- build_channels_macos
- build_channels_windows
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'