-
Notifications
You must be signed in to change notification settings - Fork 302
62 lines (57 loc) · 1.66 KB
/
ubuntu.yml
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
58
59
60
61
62
name: ubuntu
permissions:
contents: read
on: [push, pull_request]
env:
CFLAGS: -Wall -Werror
jobs:
test:
strategy:
matrix:
compiler: [clang-15, gcc]
os: [ubuntu-22.04, ubuntu-20.04]
build: [meson, autotools]
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
DISTRO: ${{ matrix.os }}
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Install toolchain'
if: ${{ (matrix.compiler == 'clang-15') }}
run: .github/workflows/install-clang.sh 15
- name: 'Install prerequisites'
run: |
sudo apt-get update
sudo apt-get install -y \
libdrm-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libx11-dev \
libx11-xcb-dev \
libxcb-dri3-dev \
libxext-dev \
libxfixes-dev \
libwayland-dev \
meson
- name: 'Print compiler version'
run: ${{ matrix.compiler }} --version
- name: 'Configure (meson)'
if: ${{ (matrix.build == 'meson') }}
run: meson setup ./builddir --prefix=/usr
- name: 'Build (meson)'
if: ${{ (matrix.build == 'meson') }}
run: meson compile -C ./builddir || ninja -C ./builddir
- name: 'Install (meson)'
if: ${{ (matrix.build == 'meson') }}
run: sudo meson install -C ./builddir
- name: 'Configure (autotools)'
if: ${{ (matrix.build == 'autotools') }}
run: ./autogen.sh --prefix=/usr
- name: 'Build (autotools)'
if: ${{ (matrix.build == 'autotools') }}
run: make
- name: 'Build and Install (autotools)'
if: ${{ (matrix.build == 'autotools') }}
run: sudo make install