-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (72 loc) · 2.05 KB
/
Copy pathci.yml
File metadata and controls
83 lines (72 loc) · 2.05 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
name: CI
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows / MSVC
os: windows-latest
- name: Linux / GCC
os: ubuntu-latest
- name: macOS / Clang
os: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Linux packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libgl1-mesa-dev
- name: Install macOS packages
if: runner.os == 'macOS'
run: brew install ninja
- name: Setup MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.0'
modules: 'qtserialport qt5compat'
cache: true
- name: Configure
shell: pwsh
run: |
$qtPrefix = $env:QT_ROOT_DIR
if (-not $qtPrefix -and $env:Qt6_DIR) {
$qtPrefix = (Resolve-Path (Join-Path $env:Qt6_DIR "../../..")).Path
}
if (-not $qtPrefix) {
throw "Qt prefix was not found."
}
cmake -S . -B build/ci -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$qtPrefix"
- name: Build
run: cmake --build build/ci --parallel
- name: Check artifact
shell: pwsh
run: |
$exe = if ($env:RUNNER_OS -eq "Windows") {
"build/ci/FluentSerialAssistant.exe"
} elseif ($env:RUNNER_OS -eq "macOS") {
"build/ci/FluentSerialAssistant.app/Contents/MacOS/FluentSerialAssistant"
} else {
"build/ci/FluentSerialAssistant"
}
if (!(Test-Path $exe)) {
throw "Build output was not found: $exe"
}