-
Notifications
You must be signed in to change notification settings - Fork 15
58 lines (53 loc) · 1.52 KB
/
msrv.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
name: Check MSRV
on:
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.yml'
push:
branches:
- main
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.yml'
schedule:
- cron: "0 0 * * 0"
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
msrv:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
name: Check MSRV
runs-on: ubuntu-latest
strategy:
matrix:
crate: [rustic_core, rustic_backend]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install cargo-hack
uses: taiki-e/install-action@d5ead4fdbf0cb2a037f276e7dfb78bbb9dd0ab8c # v2
with:
tool: cargo-hack
- name: Run Cargo Hack
run: cargo hack check --rust-version -p ${{ matrix.crate }}
result:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
name: Result (MSRV)
runs-on: ubuntu-latest
needs: msrv
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"