Makefile: try avoiding parallel builds for older sjg Mk-files #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] | |
# XXX this isn't the ideal way to handle a binary option? | |
docs: [ yes, no ] | |
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 | |
# 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 | |
# MacOS-latest | |
- os: macos-latest | |
# it's clang anyway | |
cc: gcc | |
- os: macos-latest | |
# make is gmake | |
make: make | |
- os: macos-latest | |
docs: yes | |
# Ubuntu 22.04 | |
- os: ubuntu-22.04 | |
# it's gmake | |
make: make | |
- os: ubuntu-22.04 | |
docs: no | |
# 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 | |
# Ubuntu Latest | |
- os: ubuntu-latest | |
# it's gmake | |
make: make | |
- os: ubuntu-latest | |
docs: no | |
# NetBSD | |
- os: netbsd-latest | |
# xxx or we could also install bmake | |
make: bmake | |
- os: netbsd-latest | |
cc: clang | |
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 }} -j 3 CC=${{ matrix.cc }} ${{ matrix.sanitizer }}=yes MKDOC=${{ matrix.docs }} | |
- name: distribution | |
run: MAKEOBJDIRPREFIX=$(pwd -P)/build DESTDIR=$(pwd -P)/dist ${{ matrix.make }} -j 3 install MKDOC=${{ matrix.docs }} | |
- name: regression | |
run: MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} -j 3 regress ${{ matrix.sanitizer }}=yes MKDOC=${{ matrix.docs }} |