-
Notifications
You must be signed in to change notification settings - Fork 10
130 lines (104 loc) · 3.32 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
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: Build and Release on Tag
on:
push:
tags:
- v*
jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get install -y build-essential libgl1-mesa-dev and libglvnd-dev cmake qt6-base-dev
mkdir build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake -DCMAKE_BUILD_TYPE=Release ..
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
make -j4
- name: Archive Artifact
working-directory: ${{github.workspace}}/build
shell: bash
run: |
tar -czvf NDSFactory-${{ github.ref_name }}-Linux-x64.tar.gz NDSFactory ../README.md ../LICENSE
- name: Release on GitHub
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: "build/NDSFactory-${{ github.ref_name }}-Linux-x64.tar.gz"
build-macos:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Create Build Environment
run: |
mkdir build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake -DCMAKE_BUILD_TYPE=Release ..
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
make -j4
macdeployqt NDSFactory.app
- name: Archive Artifact
working-directory: ${{github.workspace}}/build
shell: bash
run: |
zip -r NDSFactory-${{ github.ref_name }}-macOS.zip NDSFactory.app ../README.md ../LICENSE
- name: Release on GitHub
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: "build/NDSFactory-${{ github.ref_name }}-macOS.zip"
build-windows:
runs-on: windows-latest
steps:
- uses: actions/[email protected]
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Create Build Environment
run: |
mkdir build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: |
cmake ..
- name: Build
working-directory: ${{github.workspace}}/build
run: |
cmake --build . -j4 --config Release
mkdir .\Release\prod
move .\Release\NDSFactory.exe .\Release\prod
windeployqt .\Release\prod\NDSFactory.exe
- name: Archive Artifact
working-directory: ${{github.workspace}}/build/Release
run: |
xcopy ..\..\README.md .\prod
xcopy ..\..\LICENSE .\prod
powershell "Compress-Archive -Path .\prod\* -DestinationPath .\NDSFactory-${{ github.ref_name }}-Windows-x64.zip"
- name: Release on GitHub
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: "build/Release/NDSFactory-${{ github.ref_name }}-Windows-x64.zip"