WIP: Add macOS CI #7
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: Main link-grammar CI | |
on: | |
push: | |
branches: [ master, macos-ci ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install packages | |
id: info | |
run: | | |
case $RUNNER_OS in | |
Linux) | |
sudo apt-get install autoconf autoconf-archive automake flex libpcre2-dev libtool | |
cpus=$(nproc) | |
;; | |
macOS) | |
brew install autoconf autoconf-archive automake pcre2 libtool | |
cpus=$(sysctl -n hw.activecpu) | |
;; | |
*) | |
cpus=1 | |
esac | |
echo "cpus=$cpus" >> "$GITHUB_OUTPUT" | |
- name: autogen | |
run: ./autogen.sh --no-configure | |
- name: configure | |
run: ./configure --disable-silent-rules | |
- name: make | |
run: make -j${{ steps.info.outputs.cpus }} | |
- name: make check | |
run: make check -j${{ steps.info.outputs.cpus }} | |
- name: make distcheck | |
run: make distcheck -j${{ steps.info.outputs.cpus }} |