-
Notifications
You must be signed in to change notification settings - Fork 1.6k
92 lines (84 loc) · 2.82 KB
/
pr-package-tests.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
name: PR - packaging tests run on-demand via label
on:
pull_request:
types:
- labeled
- opened
- reopened
- synchronize
branches:
- master
# Cancel any running on push
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
# This job provides this metadata for the other jobs to use.
pr-package-test-build-get-meta:
# This is a long test to run so only on-demand for certain PRs
if: contains(github.event.pull_request.labels.*.name, 'ok-package-test')
name: Get metadata to add to build
runs-on: ubuntu-latest
outputs:
date: ${{ steps.date.outputs.date }}
permissions:
contents: none
steps:
# For cron builds, i.e. nightly, we provide date and time as extra parameter to distinguish them.
- name: Get current date
id: date
run: echo "date=$(date '+%Y-%m-%d-%H_%M_%S')" >> $GITHUB_OUTPUT
- name: Debug event output
uses: hmarr/debug-action@v2
pr-package-test-build-generate-matrix:
name: PR - packages build matrix
needs:
- pr-package-test-build-get-meta
runs-on: ubuntu-latest
outputs:
build-matrix: ${{ steps.set-matrix.outputs.build-matrix }}
permissions:
contents: read
steps:
- name: Checkout repository, always latest for action
uses: actions/checkout@v3
# Set up the list of target to build so we can pass the JSON to the reusable job
- uses: ./.github/actions/generate-package-build-matrix
id: set-matrix
with:
ref: master
pr-package-test-build-packages:
name: PR - packages build Linux
needs:
- pr-package-test-build-get-meta
- pr-package-test-build-generate-matrix
uses: ./.github/workflows/call-build-linux-packages.yaml
with:
version: pr-${{ github.event.number }}
ref: ${{ github.ref }}
build_matrix: ${{ needs.pr-package-test-build-generate-matrix.outputs.build-matrix }}
unstable: ${{ needs.pr-package-test-build-get-meta.outputs.date }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
pr-package-test-build-windows-package:
name: PR - packages build Windows
needs:
- pr-package-test-build-get-meta
uses: ./.github/workflows/call-build-windows.yaml
with:
version: pr-${{ github.event.number }}
ref: ${{ github.ref }}
unstable: ${{ needs.pr-package-test-build-get-meta.outputs.date }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
pr-package-test-build-macos-package:
name: PR - packages build MacOS
needs:
- pr-package-test-build-get-meta
uses: ./.github/workflows/call-build-macos.yaml
with:
version: pr-${{ github.event.number }}
ref: ${{ github.ref }}
unstable: ${{ needs.pr-package-test-build-get-meta.outputs.date }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}