-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (79 loc) · 2.49 KB
/
linux.yml
File metadata and controls
87 lines (79 loc) · 2.49 KB
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
# Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license
name: Build on Linux
on:
pull_request:
push:
schedule:
- cron: '0 3 1 * *' # Once a month, 1st day of the month, at 3am
jobs:
linux:
name: Build (${{ matrix.cc }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- cc: gcc-11
cxx: g++-11
clang_major_version: null
clang_repo_suffix: null
runs-on: ubuntu-22.04
- cc: gcc-12
cxx: g++-12
clang_major_version: null
clang_repo_suffix: null
runs-on: ubuntu-22.04
- cc: clang-15
cxx: clang++-15
clang_major_version: 15
clang_repo_suffix: -15
runs-on: ubuntu-22.04
- cc: clang-16
cxx: clang++-16
clang_major_version: 16
clang_repo_suffix: -16
runs-on: ubuntu-22.04
- cc: clang-17
cxx: clang++-17
clang_major_version: 17
clang_repo_suffix:
runs-on: ubuntu-22.04
steps:
- name: Add Clang/LLVM repositories
if: "${{ contains(matrix.cxx, 'clang') }}"
run: |-
set -x
source /etc/os-release
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}${{ matrix.clang_repo_suffix }} main"
- name: Install build dependencies
run: |-
sudo apt-get update
sudo apt-get install --yes --no-install-recommends \
cmake \
libsfml-dev \
pkg-config
- name: Install build dependency Clang ${{ matrix.clang_major_version }}
if: "${{ contains(matrix.cxx, 'clang') }}"
run: |-
sudo apt-get install --yes --no-install-recommends -V \
clang-${{ matrix.clang_major_version }}
- name: Checkout Git branch
uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Configure with CMake'
run: |-
cmake_args=(
-DCMAKE_C_COMPILER="${{ matrix.cc }}"
-DCMAKE_CXX_COMPILER="${{ matrix.cxx }}"
-S ./
-B build/
)
set -x
cmake "${cmake_args[@]}"
- name: 'Build'
run: |-
set -x
make -C build -j$(nproc) VERBOSE=1