-
Notifications
You must be signed in to change notification settings - Fork 0
136 lines (112 loc) · 3.97 KB
/
AppBuild.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
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
131
132
133
134
135
136
name: Frontend build, and deploy to GitHub Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CLANG_VERSION: 17
EMSDK_VERSION: 3.1.37
QT_VERSION: 6.6.3
QT_ROOT: ${{ github.workspace }}/Qt
CONAN_VERSION: 2.5.0
AQT_VERSION: ==3.1.11
PY7ZR_VERSION: ==0.20.2
jobs:
build:
timeout-minutes: 120
strategy:
matrix:
build_profile: [desktop_dev, desktop_release, wasm_release]
concurrency:
group: AppBuild-${{ github.workflow }}-${{ github.ref }}-${{ matrix.build_profile }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ env.CLANG_VERSION }} all
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: 16
- name: Install latest cmake and ninja
uses: lukka/get-cmake@latest
- name: Install Conan package manager
uses: turtlebrowser/get-conan@main
with:
version: ${{ env.CONAN_VERSION }}
- name: Install Qt gcc_64
uses: jurplel/install-qt-action@v4
with:
aqtversion: ${{ env.AQT_VERSION }}
py7zrversion: ${{ env.PY7ZR_VERSION }}
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
arch: 'gcc_64'
modules: 'qtimageformats qt5compat qtshadertools'
archives: 'qttranslations qttools qtsvg qtdeclarative qtbase icu'
cache: true
- name: Install Emsdk
if: matrix.build_profile == 'wasm_release'
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSDK_VERSION }}
no-cache: true
- name: Install Qt wasm multithread
if: matrix.build_profile == 'wasm_release'
uses: jurplel/install-qt-action@v4
with:
aqtversion: ${{ env.AQT_VERSION }}
py7zrversion: ${{ env.PY7ZR_VERSION }}
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
arch: 'wasm_singlethread'
modules: 'qtimageformats qt5compat qtshadertools'
archives: 'qttranslations qttools qtsvg qtdeclarative qtbase icu'
cache: true
- name: Print dependencies versions
run: |
echo "::notice file=,line=1,col=1::Clang version: $(clang --version | head -n 1)"
echo "::notice file=,line=1,col=1::Conan version: $(conan --version)"
echo "::notice file=,line=1,col=1::CMake version: $(cmake --version | head -n 1)"
- name: Create default Conan profile
run: conan profile detect
- name: Conan install dependencies
run: ./project.py --install --preset ${{ matrix.build_profile }}
- name: CMake configure
run: ./project.py --configure --preset ${{ matrix.build_profile }}
- name: Cmake build
run: ./project.py --build --preset ${{ matrix.build_profile }}
- name: CTest
if: matrix.build_profile != 'wasm_release'
run: ./project.py --test --preset ${{ matrix.build_profile }}
# - name: Test Report
# if: matrix.build_profile != 'wasm_release' && (success() || failure())
# uses: dorny/test-reporter@v1
# with:
# name: CTest Results
# path: build/${{ matrix.build_profile }}/ctest.xml
# reporter: java-junit
- name: Upload artifact
if: matrix.build_profile == 'wasm_release' && github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-pages-artifact@v3
with:
path: ${{github.workspace}}/build/wasm_release/deploy
deploy:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4