src/Makefile: rough hacks to make a libyajl.dylib for macos #59
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: | |
os: [ ubuntu-latest, macos-latest, macos-11 ] # ubuntu-18.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: | |
- os: macos-11 | |
# it's clang anyway | |
cc: gcc | |
- os: macos-11 | |
# make is gmake | |
make: make | |
- os: macos-11 | |
docs: yes | |
- os: macos-latest | |
# it's clang anyway | |
cc: gcc | |
- os: macos-latest | |
# make is gmake | |
make: make | |
- os: macos-latest | |
docs: yes | |
- os: ubuntu-18.04 | |
# it's gmake | |
make: make | |
- os: ubuntu-18.04 | |
# errors in header files | |
docs: yes | |
- os: ubuntu-latest | |
# it's gmake | |
make: make | |
- os: ubuntu-latest | |
# see if there are still errors in header files | |
docs: no | |
- os: netbsd-latest | |
# xxx or we could also install bmake and bootstrap-mk-files | |
make: bmake | |
- os: netbsd-latest | |
cc: clang | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: whoami | |
run: uname -a | |
- name: dependencies (Ubuntu-latest) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install bmake cxref | |
- name: dependencies (Ubuntu-18.04) | |
if: matrix.os == 'ubuntu-18.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install bmake cxref | |
- name: dependencies (MacOS-latest) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew update | |
brew install bmake | |
- name: dependencies (MacOS-11) | |
if: matrix.os == 'macos-11' | |
run: | | |
brew update | |
brew install bmake | |
- name: dependencies (NetBSD-latest) | |
if: matrix.os == 'netbsd-latest' | |
run: | | |
pkgin install cxref clang | |
- name: showversions | |
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 }} regress ${{ matrix.sanitizer }}=yes MKDOC=${{ matrix.docs }} |