-
Notifications
You must be signed in to change notification settings - Fork 15
109 lines (96 loc) · 3.41 KB
/
careful.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
100
101
102
103
104
105
106
107
108
109
name: Careful Integration
on:
schedule:
- cron: "0 0 * * 5"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
careful:
name: Careful Test
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
rust: [nightly] # runs on nightly only
job:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
if: github.event_name != 'pull_request'
with:
fetch-depth: 0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
with:
toolchain: ${{ matrix.rust }}
- name: install cargo-careful
uses: taiki-e/install-action@7348990d6a11d92f3e482c9b1bb48cf31ab7f658 # v2
with:
tool: cargo-careful
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
- name: Run Cargo Careful
run: cargo +${{ matrix.rust }} careful test
# TODO: don't run miri for now, due to addition of workspace
#1 crates and we'll need to figure out if we want to run miri
# miri:
# name: Miri Test
# runs-on: ${{ matrix.job.os }}
# strategy:
# fail-fast: false
# matrix:
# rust: [nightly] # runs on nightly only
# job:
# - os: macos-latest
# - os: ubuntu-latest
# - os: windows-latest
# steps:
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# if: github.event_name != 'pull_request'
# with:
# fetch-depth: 0
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# if: github.event_name == 'pull_request'
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# fetch-depth: 0
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
# with:
# toolchain: ${{ matrix.rust }}
# components: miri
# - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
# - name: Run Cargo Clean
# run: cargo +${{ matrix.rust }} clean # miri needs clean builds
# - name: Patch Cargo.toml
# shell: bash
# run: |
# # Account for sha256_compress not being interpreted by miri
# # https://github.com/rust-lang/miri/issues/3066
# sed -i -e 's/^sha2 = { version.*/sha2 = "0"/g' ./Cargo.toml
# - name: Run Cargo Miri Setup
# run: cargo +${{ matrix.rust }} miri setup # keep output clean
# - name: Run Cargo Miri
# env:
# MIRIFLAGS: -Zmiri-disable-isolation
# run: cargo +${{ matrix.rust }} miri test -- --nocapture
result:
name: Result (Careful CI)
runs-on: ubuntu-latest
needs:
- careful
# - miri # FIXME: don't run miri for now, due to addition of workspace
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"