-
Notifications
You must be signed in to change notification settings - Fork 6
171 lines (164 loc) · 5.67 KB
/
build-and-test.yml
File metadata and controls
171 lines (164 loc) · 5.67 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Build and Test
on:
pull_request:
schedule:
# Runs at 3:00 AM UTC every day
- cron: '0 3 * * *'
workflow_dispatch:
inputs:
machine:
description: 'Select machine'
required: true
type: choice
options:
- raspberrypi3-mesa
- raspberrypi4-64-mesa
- raspberrypi5
- wandboard-mesa
wpe_version:
description: 'Select WPEWebKit version'
required: true
type: choice
options:
- '2_50'
- nightly
# Opt into Node.js 24 for actions (avoids deprecation warning)
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
timestamp:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/timestamp
define-matrix:
runs-on: ubuntu-22.04
outputs:
machine: ${{ steps.define.outputs.machines }}
wpe_version: ${{ steps.define.outputs.wpe_version }}
steps:
- name: Define matrix values
id: define
run: |
if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.pull_request.draft }}" == "true" ]; then
echo 'machines=["raspberrypi5"]' >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" == "pull_request" ]; then
echo 'machines=["raspberrypi3-mesa", "raspberrypi5", "wandboard-mesa"]' >> $GITHUB_OUTPUT
elif [ -n "${{ github.event.inputs.machine }}" ]; then
echo "machines=[\"${{ github.event.inputs.machine }}\"]" >> $GITHUB_OUTPUT
else
echo 'machines=["raspberrypi5"]' >> $GITHUB_OUTPUT
fi
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo 'wpe_version=["2_50"]' >> $GITHUB_OUTPUT
elif [ -n "${{ github.event.inputs.wpe_version }}" ]; then
echo "wpe_version=[\"${{ github.event.inputs.wpe_version }}\"]" >> $GITHUB_OUTPUT
else
echo 'wpe_version=["nightly"]' >> $GITHUB_OUTPUT
fi
scarthgap-repo-init:
strategy:
fail-fast: false
matrix:
machine: ${{ fromJSON(needs.define-matrix.outputs.machine) }}
wpe_version: ${{ fromJSON(needs.define-matrix.outputs.wpe_version) }}
yocto_rel: ['scarthgap']
continue-on-error: true
runs-on: ubuntu-22.04
needs: [define-matrix]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/kas-checkout
with:
machine: ${{ matrix.machine }}
repo_release: ${{ matrix.yocto_rel }}
wpe_version: ${{ matrix.wpe_version }}
buildhistory-collect-srcrevs:
strategy:
fail-fast: false
matrix:
machine: ${{ fromJSON(needs.define-matrix.outputs.machine) }}
wpe_version: ${{ fromJSON(needs.define-matrix.outputs.wpe_version) }}
yocto_rel: ['scarthgap']
continue-on-error: true
runs-on: [self-hosted, builder]
needs: [define-matrix, scarthgap-repo-init, timestamp]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/s3-configure
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_HOST_BASE: ${{ secrets.S3_HOST_BASE }}
with:
access_key: ${S3_ACCESS_KEY}
secret_key: ${S3_SECRET_KEY}
host_base: ${S3_HOST_BASE}
- uses: ./.github/actions/buildhistory-collect-srcrevs
env:
S3_STORAGE: ${{ secrets.S3_STORAGE }}
with:
machine: ${{ matrix.machine }}
repo_release: ${{ matrix.yocto_rel }}
s3_storage: ${S3_STORAGE}
wpe_version: ${{ matrix.wpe_version }}
build:
strategy:
fail-fast: false
matrix:
machine: ${{ fromJSON(needs.define-matrix.outputs.machine) }}
wpe_version: ${{ fromJSON(needs.define-matrix.outputs.wpe_version) }}
yocto_rel: ['scarthgap']
continue-on-error: true
runs-on: [self-hosted, builder]
needs: [define-matrix, scarthgap-repo-init]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/s3-configure
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_HOST_BASE: ${{ secrets.S3_HOST_BASE }}
with:
access_key: ${S3_ACCESS_KEY}
secret_key: ${S3_SECRET_KEY}
host_base: ${S3_HOST_BASE}
- uses: ./.github/actions/kas-build
env:
S3_STORAGE: ${{ secrets.S3_STORAGE }}
with:
machine: ${{ matrix.machine }}
repo_release: ${{ matrix.yocto_rel }}
s3_storage: ${S3_STORAGE}
wpe_version: ${{ matrix.wpe_version }}
test:
strategy:
fail-fast: false
matrix:
machine: ${{ fromJSON(needs.define-matrix.outputs.machine) }}
wpe_version: ${{ fromJSON(needs.define-matrix.outputs.wpe_version) }}
yocto_rel: ['scarthgap']
runs-on: [self-hosted, podman]
permissions:
pull-requests: write
needs: [define-matrix, build]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/s3-configure
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_HOST_BASE: ${{ secrets.S3_HOST_BASE }}
with:
access_key: ${S3_ACCESS_KEY}
secret_key: ${S3_SECRET_KEY}
host_base: ${S3_HOST_BASE}
- uses: ./.github/actions/podman-robot
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
S3_STORAGE: ${{ secrets.S3_STORAGE }}
with:
machine: ${{ matrix.machine }}
github_token: ${GITHUB_TOKEN}
s3_storage: ${S3_STORAGE}
wpe_version: ${{ matrix.wpe_version }}