-
Notifications
You must be signed in to change notification settings - Fork 3
157 lines (155 loc) · 4.93 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
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 MKDOC=${{ matrix.docs }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# latest runners: ubuntu-latest, ubuntu-22.04, ubuntu-20.04, macos-latest, macos-12, macos-11
os: [ ubuntu-latest, ubuntu-20.04, macos-latest, macos-11 ] # ubuntu-22.04, netbsd!!!, freebsd!!!, openbsd!!!
cc: [ gcc, clang ]
make: [ bmake, make ]
sanitizer: [ NO_SANI, USE_ASAN, USE_UBSAN, USE_LEAKSAN ]
docs: [ yes, no ]
# 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!
#
# MacOS-11.x
- os: macos-11
# it's clang anyway
cc: gcc
- os: macos-11
# make is gmake
make: make
- os: macos-11
docs: yes
- 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: yes
- os: macos-12
parallel: ''
#
# MacOS-latest
- os: macos-latest
# it's clang anyway
cc: gcc
- os: macos-latest
# make is gmake
make: make
- os: macos-latest
docs: yes
- os: macos-latest
parallel: ''
#
# Ubuntu 22.04
- os: ubuntu-22.04
# it's gmake
make: make
- os: ubuntu-22.04
docs: no
- 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: yes
- os: ubuntu-20.04
# BMake 20181221 seems to run SUBDIR in parallel, but doesn't
# support .WAIT in the list!
parallel: '-j 3'
#
# Ubuntu Latest
- os: ubuntu-latest
# it's gmake
make: make
- os: ubuntu-latest
docs: no
- 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: no
- 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 MKDOC=${{ matrix.docs }}
- name: distribution without parallel
# XXX no BMake seems to handle parallel installs well yet....
if: ${{ startsWith(matrix.make, 'bmake') }}
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} install MKDOC=${{ 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 MKDOC=${{ matrix.docs }} DESTDIR=$(pwd -P)/dist
- name: regression
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} ${{ matrix.parallel }} regress MKDOC=${{ matrix.docs }}