2022-01-16 21:05:41 -07:00
|
|
|
name: linux
|
|
|
|
|
2022-12-16 12:36:13 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2022-01-16 21:05:41 -07:00
|
|
|
|
|
|
|
# Set permissions at the job level.
|
|
|
|
permissions: {}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
2023-05-12 13:00:32 -06:00
|
|
|
runs-on: ubuntu-22.04
|
2022-01-16 21:05:41 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
compiler: [clang, gcc]
|
|
|
|
steps:
|
2022-12-06 16:41:11 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-16 21:05:41 -07:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2022-12-06 16:41:11 -07:00
|
|
|
- uses: actions/setup-python@v4
|
2022-01-16 21:05:41 -07:00
|
|
|
with:
|
|
|
|
python-version: '3.9'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-05-14 07:11:15 -06:00
|
|
|
python -m pip install --upgrade meson PyYAML
|
2022-03-20 05:50:12 -06:00
|
|
|
sudo apt update
|
2022-01-16 21:05:41 -07:00
|
|
|
sudo apt install -y \
|
|
|
|
doxygen libxcb-xkb-dev valgrind ninja-build \
|
|
|
|
libwayland-dev wayland-protocols bison graphviz
|
|
|
|
- name: Setup
|
|
|
|
run: |
|
2023-05-12 13:00:32 -06:00
|
|
|
# -gdwarf-4 - see https://github.com/llvm/llvm-project/issues/56550.
|
2023-05-07 18:35:16 -06:00
|
|
|
CFLAGS='-gdwarf-4' meson setup build -Denable-cool-uris=true
|
2022-01-16 21:05:41 -07:00
|
|
|
env:
|
|
|
|
CC: ${{ matrix.compiler }}
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
meson compile -C build
|
|
|
|
- name: Test
|
2022-07-14 21:07:26 -06:00
|
|
|
run:
|
|
|
|
meson test -C build --print-errorlogs --no-suite python-tests
|
|
|
|
- name: Test with valgrind
|
2022-01-16 21:05:41 -07:00
|
|
|
run:
|
|
|
|
meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests
|
2022-07-14 21:01:52 -06:00
|
|
|
- name: Upload test logs
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: test logs
|
|
|
|
path: |
|
|
|
|
build/meson-logs/
|
2023-05-07 18:35:16 -06:00
|
|
|
- name: Store doxygen docs for use by the pages workflow
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: doxygen-docs
|
|
|
|
path: |
|
|
|
|
build/html/
|