From 6623b1dc458633d344c83a4ba8f0310f9c6a3090 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sat, 23 Jan 2021 01:50:17 +0100 Subject: [PATCH] Fix CI on macOS Apple supplies version 2.3 (from 2006!!), which doesn't support `%empty`. --- .github/actions/install_deps.sh | 4 +++- .github/workflows/testing.yml | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/install_deps.sh b/.github/actions/install_deps.sh index 1066d6af4..a53f5f9a7 100755 --- a/.github/actions/install_deps.sh +++ b/.github/actions/install_deps.sh @@ -4,7 +4,9 @@ case `echo $1 | cut -d '-' -f 1` in sudo apt-get install -yq bison libpng-dev pkg-config ;; macos) - brew install libpng pkg-config md5sha1sum + brew install bison libpng pkg-config md5sha1sum + # For the version check below exclusively, re-do this before building + export PATH="/usr/local/opt/bison/bin:$PATH" ;; *) echo "WARNING: Cannot install deps for OS '$1'" diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3682d54fe..f27ae9e3c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -27,13 +27,18 @@ jobs: shell: bash run: | ./.github/actions/install_deps.sh ${{ matrix.os }} + # The `export` lines are to allow working on macOS... + # Apple's base version is severely outdated, not even supporting -Wall, + # but it overrides Homebrew's version nonetheless... - name: Build & install using Make run: | + export PATH="/usr/local/opt/bison/bin:$PATH" make ${{ matrix.target }} -j Q= CC=${{ matrix.cc }} sudo make install -j Q= if: matrix.buildsys == 'make' - name: Build & install using CMake run: | + export PATH="/usr/local/opt/bison/bin:$PATH" cmake -S . -B build -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${{ matrix.cc }} ${{ matrix.cmakevars }} cmake --build build cp build/src/rgb{asm,link,fix,gfx} .