-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (56 loc) · 1.67 KB
/
build.yml
File metadata and controls
63 lines (56 loc) · 1.67 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
name: RTL Build
on:
push:
branches: [ release ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ release ]
paths-ignore:
- '**/*.md'
workflow_dispatch:
jobs:
build:
name: Build (${{ matrix.os }} / ${{ matrix.compiler }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
compiler: [gcc, clang, msvc]
exclude:
- os: windows-latest
compiler: gcc
- os: windows-latest
compiler: clang
- os: ubuntu-latest
compiler: msvc
steps:
- name: Checkout source
uses: actions/checkout@v4
# Linux builds
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y ninja-build g++ clang
- name: Configure (Linux)
if: runner.os == 'Linux'
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++;
else
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++;
fi
# Windows builds (MSVC)
- name: Configure (Windows / MSVC)
if: runner.os == 'Windows'
run: cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release
# Build
- name: Build
run: cmake --build build --config Release --parallel
# Upload artifacts per compiler
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: rtl-test-binaries-${{ matrix.compiler }}
path: bin/