-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (60 loc) · 1.53 KB
/
build.yml
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
name: Build
on:
workflow_dispatch:
push:
branches:
- main
# - dev
pull_request:
env:
QT_RELEASE_VER_UBUNTU: 6.8.0
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.8.0"
modules: "qtcharts"
cache: true
- name: Get number of CPU cores
if: runner.os != 'Windows'
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Setup Visual Studio Tools
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: Install jom
if: runner.os == 'Windows'
run: choco install jom
- name: Setup Linux
if: runner.os == 'Linux'
run: |
echo "DISTRIBUTION=AppImage" >> "$GITHUB_ENV"
sudo apt-get install libxkbcommon-dev libxkbcommon-x11-0 fuse libxcb-cursor-dev
- name: Run QMake
run: |
mkdir build
cd build
qmake ../PAL.pro "DISTRIBUTION=$DISTRIBUTION"
- name: Compile for Windows
if: runner.os == 'Windows'
run: |
cd build
jom
- name: Compile for Linux/macOS
if: runner.os != 'Windows'
run: |
cd build
make -k -j${{ steps.cpu-cores.outputs.count }}