-
Notifications
You must be signed in to change notification settings - Fork 3
190 lines (188 loc) · 6.03 KB
/
c.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: C CI
# xxx could be written as: "on: [push, pull_request]"
on:
push:
branches: [ bsdmake ]
pull_request:
branches: [ bsdmake ]
jobs:
regressionTest:
name: "${{ matrix.os }} ${{ matrix.make }} CC=${{ matrix.cc }} ${{ matrix.sanitizer }}=yes CXREF=${{ matrix.docs }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
# latest runners: ubuntu-latest, ubuntu-22.04, ubuntu-20.04, macos-latest, macos-12, macos-11, macos-13?, macos-14?
# N.B.: We want netbsd!!!, freebsd!!!, openbsd!!!
os: [ ubuntu-latest, ubuntu-20.04, macos-14, macos-13, macos-latest, macos-11 ]
cc: [ gcc, clang ]
make: [ bmake, make ]
sanitizer: [ NO_SANI, USE_ASAN, USE_UBSAN, USE_LEAKSAN ]
docs: [ cxref, true ]
# XXX this isn't the ideal way to handle a binary option?
parallel: [ '-j 3', '' ]
exclude:
#
# N.B.: here we _EXCLUDE_ the matrix options we don't want!
#
# xxx Travis has "include:", does it work here?
#
# MacOS-11.x
- os: macos-11
# it's clang anyway
cc: gcc
- os: macos-11
# make is gmake
make: make
- os: macos-11
docs: cxref
- os: macos-11
parallel: ''
#
# MacOS-12.x
- os: macos-12
# it's clang anyway
cc: gcc
- os: macos-12
# make is gmake
make: make
- os: macos-12
docs: cxref
- os: macos-12
parallel: ''
#
# MacOS-13.x
- os: macos-13
# it's clang anyway
cc: gcc
- os: macos-13
# make is gmake
make: make
- os: macos-13
docs: cxref
- os: macos-13
parallel: ''
#
# MacOS-14.x
- os: macos-14
# it's clang anyway
cc: gcc
- os: macos-14
# make is gmake
make: make
- os: macos-14
docs: cxref
- os: macos-14
parallel: ''
#
# MacOS-latest
- os: macos-latest
# it's clang anyway
cc: gcc
- os: macos-latest
# make is gmake
make: make
- os: macos-latest
docs: cxref
- os: macos-latest
parallel: ''
#
# Ubuntu 22.04
- os: ubuntu-22.04
# it's gmake
make: make
- os: ubuntu-22.04
docs: true
- os: ubuntu-22.04
parallel: ''
#
# Ubuntu 20.04
- os: ubuntu-20.04
# it's gmake
make: make
- os: ubuntu-20.04
# cxref trips an error in a system header
# /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21: cxref: syntax error, unexpected IDENTIFIER, expecting ')'
docs: cxref
- os: ubuntu-20.04
# BMake 20181221 seems to run SUBDIR in parallel, but doesn't
# support .WAIT in the list!
parallel: '-j 3'
- os: ubuntu-20.04
# gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 with
# -fsanitize=leak is broken (at least for example/parse_config):
# https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/2038386
sanitizer: USE_LEAKSAN
#
# Ubuntu Latest
- os: ubuntu-latest
# it's gmake
make: make
- os: ubuntu-latest
docs: true
- os: ubuntu-latest
parallel: ''
#
# NetBSD
- os: netbsd-latest
# xxx or we could also install bmake
make: bmake
- os: netbsd-latest
cc: clang
- os: netbsd-latest
docs: true
- os: netbsd-latest
parallel: ''
steps:
- name: Checkout
uses: actions/checkout@v4
- name: whoami
run: uname -a
- name: macos id
if: ${{ startsWith(matrix.os, 'macos') }}
run: sw_vers
- name: ubuntu dependencies
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install bmake cxref
- name: macOS dependencies
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
ls -l /Developer/usr/bin/bsdmake || true
# n.b.: cxref is in macports.... which apparently can be installed like this:
# wget https://github.com/macports/macports-base/releases/download/v2.9.1/MacPorts-2.9.1-14-Sonoma.pkg
# sudo installer -pkg ./MacPorts-2.9.1-14-Sonoma.pkg -target /
brew update
brew install bmake
- name: netbsd_dependencies
if: ${{ startsWith(matrix.os, 'netbsd') }}
run: |
# pkg_add pkgin
pkgin install cxref
- name: toolchain versions
run: |
${{ matrix.make }} -V MAKE_VERSION
${{ matrix.cc }} --version
- name: builddir
run: rm -rf build && mkdir build
- name: showenv
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} showenv
env | sort
- name: build
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} ${{ matrix.parallel }} CC=${{ matrix.cc }} ${{ matrix.sanitizer }}=yes CXREF=${{ matrix.docs }}
- name: distribution without parallel
# XXX BMake does not seem to handle parallel installs well yet....
if: ${{ startsWith(matrix.make, 'bmake') }}
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} install CXREF=${{ matrix.docs }} DESTDIR=$(pwd -P)/dist
- name: distribution in parallel
if: ${{ ! startsWith(matrix.make, 'bmake') }}
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} ${{ matrix.parallel }} install CXREF=${{ matrix.docs }} DESTDIR=$(pwd -P)/dist
- name: regression
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} ${{ matrix.parallel }} regress CXREF=${{ matrix.docs }}