| 1 |
name: macos |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
- 'releases/**' |
| 8 |
pull_request: |
| 9 |
branches: |
| 10 |
- master |
| 11 |
- 'releases/**' |
| 12 |
|
| 13 |
# Set permissions at the job level. |
| 14 |
permissions: {} |
| 15 |
|
| 16 |
jobs: |
| 17 |
macos: |
| 18 |
runs-on: macos-13 |
| 19 |
permissions: |
| 20 |
contents: read |
| 21 |
steps: |
| 22 |
- uses: actions/checkout@v5 |
| 23 |
with: |
| 24 |
persist-credentials: false |
| 25 |
- uses: actions/setup-python@v5 |
| 26 |
with: |
| 27 |
python-version: '3.12' |
| 28 |
- name: Install dependencies |
| 29 |
run: | |
| 30 |
brew install bison libxml2 meson ninja xkeyboardconfig xorg-server |
| 31 |
brew link bison --force |
| 32 |
brew link libxml2 --force |
| 33 |
# https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments |
| 34 |
python3 -m venv venv |
| 35 |
source venv/bin/activate |
| 36 |
# Jinja2 is needed for merge-modes tests |
| 37 |
pip3 install PyYaml Jinja2 |
| 38 |
env: |
| 39 |
HOMEBREW_NO_AUTO_UPDATE: 1 |
| 40 |
HOMEBREW_NO_INSTALL_CLEANUP: 1 |
| 41 |
- name: Setup |
| 42 |
run: | |
| 43 |
source venv/bin/activate |
| 44 |
PATH="/usr/local/opt/bison/bin:${PATH}" \ |
| 45 |
meson setup \ |
| 46 |
-Denable-wayland=false \ |
| 47 |
-Denable-x11=true \ |
| 48 |
-Dxkb-config-root="$(brew --prefix xkeyboardconfig)/share/X11/xkb" \ |
| 49 |
-Dx-locale-root="$(brew --prefix xorg-server)/share/X11/locale" \ |
| 50 |
build |
| 51 |
- name: Build |
| 52 |
run: | |
| 53 |
source venv/bin/activate |
| 54 |
PATH="/usr/local/opt/bison/bin:${PATH}" meson compile -C build |
| 55 |
- name: Test |
| 56 |
run: | |
| 57 |
source venv/bin/activate |
| 58 |
meson test -C build --print-errorlogs |