-
Notifications
You must be signed in to change notification settings - Fork 23
112 lines (97 loc) · 3.12 KB
/
build.yml
File metadata and controls
112 lines (97 loc) · 3.12 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: ${{ matrix.os-name }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-latest
os-name: Windows
qt-arch: win64_msvc2019_64
- runner: ubuntu-22.04
os-name: Ubuntu
steps:
- uses: actions/checkout@v5
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install Qt (Windows)
if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v4
with:
version: '6.7.0'
arch: ${{ matrix.qt-arch }}
dir: 'C:\'
cache: true
- name: Install Qt (Ubuntu)
if: runner.os == 'Linux'
uses: jurplel/install-qt-action@v4
with:
version: '6.7.0'
arch: linux_gcc_64
dir: '${{ github.workspace }}'
modules: 'qtwaylandcompositor'
cache: true
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -y \
cmake \
build-essential \
chrpath \
patchelf \
libxcb-xinerama0 \
libxcb-cursor-dev \
mesa-common-dev \
libglu1-mesa-dev \
libgl1-mesa-dev \
libx11-xcb-dev \
libxkbcommon-x11-dev \
libwayland-dev
- name: Pre-build (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd build
python pre_build.py --vs 2022 --qt 6.7.0 --qt-root C:\Qt
- name: Pre-build (Ubuntu)
if: runner.os == 'Linux'
run: |
cd build
python3 pre_build.py --qt 6.7.0 --qt-root "${{ github.workspace }}/Qt"
- name: Build Release (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cmake --build build\win\vs2022 --config Release --target RadeonRaytracingAnalyzer RraBackendTest --parallel %NUMBER_OF_PROCESSORS%
- name: Build Release (Ubuntu)
if: runner.os == 'Linux'
run: |
cmake --build build/linux/make/release --target RadeonRaytracingAnalyzer RraBackendTest --parallel $(nproc)
- name: Build Debug tests (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cmake --build build\win\vs2022 --config Debug --target RraBackendTest --parallel %NUMBER_OF_PROCESSORS%
- name: Build Debug tests (Ubuntu)
if: runner.os == 'Linux'
run: |
cmake --build build/linux/make/debug --target RraBackendTest --parallel $(nproc)
- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: cmd
run: for %%f in (samples\*.rra) do (build\win\debug\RraBackendTest-d.exe --rra %%f || exit /b 1)
- name: Run tests (Ubuntu)
if: runner.os == 'Linux'
run: for f in samples/*.rra; do build/linux/debug/RraBackendTest-d --rra "$f"; done