-
-
Notifications
You must be signed in to change notification settings - Fork 2
130 lines (110 loc) · 3.64 KB
/
Copy pathpr-ci.yml
File metadata and controls
130 lines (110 loc) · 3.64 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: pr-ci
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pr-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: build-test-${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install Meson + Ninja
shell: bash
run: python -m pip install --upgrade pip meson ninja
- name: Setup MSVC
if: matrix.os == 'windows-latest'
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.10.1"
arch: ${{ matrix.os == 'windows-latest' && 'win64_msvc2022_64' || matrix.os == 'macos-latest' && 'clang_64' || 'linux_gcc_64' }}
modules: qtmultimedia qtimageformats
- name: Configure macOS Runtime Paths
if: matrix.os == 'macos-latest'
shell: bash
run: |
echo "DYLD_FRAMEWORK_PATH=${QT_ROOT_DIR}/lib" >> "$GITHUB_ENV"
echo "DYLD_LIBRARY_PATH=${QT_ROOT_DIR}/lib" >> "$GITHUB_ENV"
echo "DYLD_FALLBACK_FRAMEWORK_PATH=${QT_ROOT_DIR}/lib" >> "$GITHUB_ENV"
- name: Configure (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
env:
CC: cl
CXX: cl
run: >
meson setup builddir
--backend ninja
--buildtype=debugoptimized
-Dvulkan_preview=disabled
-Dgithub_repo=${{ github.repository }}
-Dupdate_channel=dev
- name: Configure (Unix)
if: matrix.os != 'windows-latest'
shell: bash
run: >
meson setup builddir
--backend ninja
--buildtype=debugoptimized
-Dvulkan_preview=disabled
-Dgithub_repo=${{ github.repository }}
-Dupdate_channel=dev
- name: Build (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: meson compile -C builddir
- name: Build (Unix)
if: matrix.os != 'windows-latest'
shell: bash
run: meson compile -C builddir
- name: Run Support Matrix Fixtures (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: meson test -C builddir support-matrix-fixtures --print-errorlogs
- name: Run Support Matrix Fixtures (Unix)
if: matrix.os != 'windows-latest'
shell: bash
run: meson test -C builddir support-matrix-fixtures --print-errorlogs
- name: Run Meson Tests (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: meson test -C builddir --print-errorlogs
- name: Run Meson Tests (Unix)
if: matrix.os != 'windows-latest'
shell: bash
run: meson test -C builddir --print-errorlogs
- name: Validate CLI Binary (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
python scripts/validate_build.py `
--binary "builddir/src/pakfu.exe" `
--expected-version "$((Get-Content VERSION -Raw).Trim())"
- name: Validate CLI Binary (Unix)
if: matrix.os != 'windows-latest'
shell: bash
run: |
python scripts/validate_build.py \
--binary "builddir/src/pakfu" \
--expected-version "$(cat VERSION)"