2021-03-01 18:03:35 +00:00
|
|
|
name: Build and test on macOS
|
2022-12-26 18:54:10 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
2022-10-13 20:32:01 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2021-03-01 18:03:35 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
2022-09-10 15:19:52 +00:00
|
|
|
- macos-11
|
|
|
|
- macos-12
|
2021-03-01 18:03:35 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
brew install \
|
2023-02-17 02:41:27 +00:00
|
|
|
cmake \
|
2021-03-01 18:03:35 +00:00
|
|
|
freetype \
|
|
|
|
gettext \
|
|
|
|
imlib2 \
|
|
|
|
lcov \
|
|
|
|
librsvg \
|
|
|
|
libxft \
|
|
|
|
libxinerama \
|
2022-12-25 13:21:38 +00:00
|
|
|
lua \
|
|
|
|
ninja
|
2023-02-17 02:47:03 +00:00
|
|
|
pkg-config \
|
2021-03-01 18:03:35 +00:00
|
|
|
- name: Checkout
|
2022-10-13 20:47:26 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-03-01 18:03:35 +00:00
|
|
|
- name: Configure with CMake
|
|
|
|
run: |
|
2022-10-06 18:38:20 +00:00
|
|
|
set -x
|
2021-03-01 18:03:35 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2022-12-25 13:21:38 +00:00
|
|
|
cmake .. -G Ninja \
|
2021-03-01 18:03:35 +00:00
|
|
|
-DMAINTAINER_MODE=ON \
|
2022-12-09 17:28:40 +00:00
|
|
|
-DBUILD_WAYLAND=OFF \
|
2021-03-01 18:03:35 +00:00
|
|
|
-DBUILD_TESTS=ON
|
|
|
|
- name: Compile
|
2022-12-26 18:54:10 +00:00
|
|
|
run: cmake --build build
|
2021-03-01 18:03:35 +00:00
|
|
|
- name: Test
|
|
|
|
working-directory: build
|
2022-12-26 18:54:10 +00:00
|
|
|
run: ctest
|