-
Notifications
You must be signed in to change notification settings - Fork 105
61 lines (52 loc) · 1.66 KB
/
PR.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
name: PR
on:
pull_request:
# branches: [master, vara-stage-1, vara-stage-2, vara-stage-3]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
TERM: xterm-256color
BINARYEN_VERSION: version_111
jobs:
status:
runs-on: ubuntu-latest
outputs:
cache: ${{ steps.check-commit-message.outputs.cache }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check Commit Message
id: check-commit-message
run: |
MESSAGE=$(git show -s --format=%s)
CACHE=true
if [[ $MESSAGE == *"[skip-cache]"* ]]; then
CACHE=""
fi
echo "cache: ${CACHE}"
echo "cache=${CACHE}" >> $GITHUB_OUTPUT
- name: Set sccache path
if: ${{ steps.check-commit-message.outputs.cache }}
run: |
sccache_path="/mnt/sccache/$(echo ${GITHUB_REF#refs/heads/} | tr / _)"
echo "cache=$sccache_path" >> $GITHUB_OUTPUT
check:
needs: status
uses: ./.github/workflows/check.yml
with:
cache: ${{ needs.status.outputs.cache }}
build:
needs: status
if: >-
contains(github.event.pull_request.labels.*.name, 'A0-pleasereview')
|| contains(github.event.pull_request.labels.*.name, 'A4-insubstantial')
|| contains(github.event.pull_request.labels.*.name, 'A2-mergeoncegreen')
uses: ./.github/workflows/build.yml
with:
cache: ${{ needs.status.outputs.cache }}
macos: ${{ contains(github.event.pull_request.labels.*.name, 'E2-forcemacos') }}