From 15a49ac146cf332d47461dbcd33b877b893f7d87 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 18 Jan 2024 22:00:12 -0600 Subject: [PATCH] github: add macOS to our build set Do a little bit of action cleanup while we are at it. Signed-off-by: Kyle Evans --- .github/workflows/build.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2995948..e088ea5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,26 +10,41 @@ permissions: jobs: build: - name: Build ${{ matrix.os }}@lua${{ matrix.lua }} + name: Build ${{ matrix.os }} (lua${{ matrix.lua }}) runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04] + os: [ubuntu-20.04, ubuntu-22.04, macos-latest] lua: [5.2, 5.3, 5.4] include: - os: ubuntu-20.04 + lua_incdir: /usr/include/lua${{ matrix.lua }} + lua_lib: -llua${{ matrix.lua }} - os: ubuntu-22.04 + lua_incdir: /usr/include/lua${{ matrix.lua }} + lua_lib: -llua${{ matrix.lua }} + - os: macos-latest + lua: 5.4 + pkgs: bmake lua@5.4 + lua_incdir: /opt/homebrew/Cellar/lua/5.4.6/include/lua + lua_lib: -L/opt/homebrew/Cellar/lua/5.4.6/lib -llua${{ matrix.lua }} exclude: - os: ubuntu-20.04 lua: 5.4 steps: - name: checkout uses: actions/checkout@v4 - - name: install system packages + - name: install system packages (Ubuntu) + if: runner.os == 'Linux' run: | sudo apt-get update --quiet || true sudo apt-get -yq --no-install-suggests --no-install-recommends install bmake liblua${{ matrix.lua }}-dev - - name: linux build + - name: install system packages (macOS) + if: runner.os == 'macOS' + run: | + brew update --quiet || true + brew install ${{ matrix.pkgs }} + - name: build orch(1) run: | - env ORCHLUA_PATH=/usr/share/orch LUA_INCDIR=/usr/include/lua${{ matrix.lua }} \ - LUA_LIB=-llua${{ matrix.lua }} bmake + env ORCHLUA_PATH=/usr/share/orch LUA_INCDIR=${{ matrix.lua_incdir }} \ + LUA_LIB=${{ matrix.lua_lib }} bmake