-
Notifications
You must be signed in to change notification settings - Fork 8
88 lines (80 loc) · 2.02 KB
/
build.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
push:
branches:
- '*'
# Manual builds and PRs in all branches
pull_request:
branches:
- '*'
workflow_dispatch:
branches:
- '*'
jobs:
build:
name: Build
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
name: [
Arch,
Debian
]
include:
- name: Arch
os: ubuntu-latest
container: archlinux:base-devel
- name: Debian
os: ubuntu-latest
container: debian:testing
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Arch Linux dependencies
if: matrix.name == 'Arch'
run: |
pacman-key --init
pacman -Syu --noconfirm
packages=(
clang
cmake
git
libxml2
qt6-base
qt6-tools
)
pacman -S --noconfirm ${packages[@]}
- name: Install Debian Testing dependencies
if: matrix.name == 'Debian'
run: |
apt-get update
apt-get upgrade -y
apt-get install -y cmake clang g++ gcc git \
libglib2.0 libgl1-mesa-dev libxml2-dev pkg-config \
qt6-base-dev qt6-l10n-tools \
qt6-tools-dev qt6-tools-dev-tools
# These builds are executed on all runners
- name: Build with gcc
run: |
export CC=gcc
export CXX=g++
cmake \
-D CMAKE_BUILD_TYPE=Release \
-B build-gcc \
-S .
cmake --build build-gcc --verbose
- name: Build with clang
run: |
export CC=clang
export CXX=clang++
cmake \
-D CMAKE_BUILD_TYPE=Release \
-B build-clang \
-S .
cmake --build build-clang --verbose
- name: Run tests
run: |
ctest --verbose --force-new-ctest-process --test-dir build-gcc