1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
name: Meson
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-format:
name: Clang-format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format-20
- name: Check format
run: clang-format-20 -n --Werror src/*c src/*.h tests/*.c tests/*.h
build:
name: Ubuntu tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on Ubuntu
run: sudo apt-get update && sudo apt-get install -y meson check libudev-dev libxkbcommon-dev libdrm-dev libgbm-dev libegl1-mesa-dev libgles-dev libpango1.0-dev libsystemd-dev jq
- name: Compile and install libtsm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LIBTSM: "https://api.github.com/repos/kmscon/libtsm/releases/latest"
run: |
tar_url=$(curl -s --request GET --header "Authorization: Bearer $GH_TOKEN" --url $LIBTSM | jq -r .tarball_url)
curl --request GET -s -L -o libtsm.tar.gz --header "Authorization: Bearer $GH_TOKEN" --url $tar_url
mkdir libtsm
tar -xf libtsm.tar.gz -C libtsm --strip 1
cd libtsm
meson setup build
cd build
meson compile
sudo meson install
- name: Configure Meson
run: meson setup build
- name: Build
working-directory: ./build
run: meson compile
- name: Test
working-directory: ./build
run: meson test
|