-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (42 loc) · 1.05 KB
/
checks.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
name: Checks
on:
push:
branches:
- '**'
pull_request:
branches: ["main"]
merge_group:
workflow_run:
workflows: ["Update rust-overlay"]
types:
- completed
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
env:
TARGET_BRANCH: ${{ github.ref }}
strategy:
matrix:
rust:
- base
- stable
- beta
- nightly
steps:
- name: Switch to rust-overlay branch if triggered by update
if: ${{ github.event_name == 'workflow_run' }}
run: echo "TARGET_BRANCH=rust-overlay" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ env.TARGET_BRANCH }}
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@v6
- name: Run checks
run: nix build .#checks.x86_64-linux.${{ matrix.rust }}