-
Notifications
You must be signed in to change notification settings - Fork 30
163 lines (135 loc) · 4.32 KB
/
ci.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
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
name: PR Checks
# Pre-merge CI to run on push and pull_request events, even if this seems
# redundant, we avoid concurrency with the below configuration.
#
on:
pull_request:
workflow_dispatch:
# Use the concurrency feature to ensure we don't run redundant workflows
#
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
# Left to-do:
# - coverage
# - publishing docs to gh-pages
# - persistent artifact cache
# - overnight jobs
# - wsl tasks (TODO: Check if GitHub's Windows runners allow WSL)
#
# New opportunities:
# - run tests on mac (GitHub provides MacOS runners)
# - standardize WSL tasks by using GitHub-provided runners
jobs:
tests:
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.allow-failure || false }}
strategy:
fail-fast: false
matrix:
# The names here should map to a valid service defined in
# "../compose/ci.docker-compose.yml"
test-name:
- fedora-38
- fedora-39
- fedora-missing-deps
- ubuntu-20.04
- lint
- mypy
include:
- test-name: plugins-master
allow-failure: true
steps:
- name: Check out repository
uses: actions/checkout@v2
# BuildStream requires tags to be able to find its version.
with:
fetch-depth: 0
- name: Run tests with Docker Compose
run: |
${GITHUB_WORKSPACE}/.github/run-ci.sh ${{ matrix.test-name }}
# Matrix of tests which run against remote services which we bring up adjacently
service-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
# The names here map to valid services defined in "../compose/ci.docker-compose.yml",
# and they also map to corresponding filenames of services which are expected
# to be run in the background
test-name:
- buildbarn
- buildgrid
steps:
- name: Check out repository
uses: actions/checkout@v2
# BuildStream requires tags to be able to find its version.
with:
fetch-depth: 0
- name: Bring up the RE cluster
run: |
${GITHUB_WORKSPACE}/.github/run-ci.sh --service ${{ matrix.test-name }}
build_docs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v2
# BuildStream requires tags to be able to find its version.
with:
fetch-depth: 0
- name: Give `testuser` ownership of the source directory
run: sudo chown -R 1000:1000 ${GITHUB_WORKSPACE}
- name: Build documentation using Docker Compose
run: |
docker compose \
--env-file ${GITHUB_WORKSPACE}/.github/common.env \
--file ${GITHUB_WORKSPACE}/.github/compose/ci.docker-compose.yml \
run \
docs
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: docs
path: doc/build/html
build_wheels:
name: Build Python wheel packages on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch latest BuildBox release
run: ${GITHUB_WORKSPACE}/.github/wheel-helpers/fetch-latest-buildbox-release.sh
- name: Build wheels
run: pipx run cibuildwheel==v2.16.2
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
test_wheels:
name: "Test Python packages: ${{ matrix.test-name }}"
needs: [build_wheels]
runs-on: ubuntu-20.04
strategy:
matrix:
# The names here should map to a valid service defined in
# "../compose/ci.docker-compose.yml"
test-name:
- wheels-manylinux_2_28-cp38
- wheels-manylinux_2_28-cp39
- wheels-manylinux_2_28-cp310
- wheels-manylinux_2_28-cp311
- wheels-manylinux_2_28-cp312
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: wheels
path: ./wheelhouse
- name: Run tests with Docker Compose
run: |
${GITHUB_WORKSPACE}/.github/run-ci.sh ${{ matrix.test-name }}