-
Notifications
You must be signed in to change notification settings - Fork 59
129 lines (124 loc) · 4.22 KB
/
continuous-building.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
name: Continuous Building
on:
- push
- pull_request
jobs:
build-and-upload:
name: Build & upload the artifact
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- macos-13
- windows-2022
use-asan:
- YES
- NO
exclude:
- os: windows-2022
use-asan: YES
env:
USE_ASAN: ${{ matrix.use-asan }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Linux: Install Qt5'
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
sudo apt install qtbase5-dev libqt5svg5-dev
- name: 'Linux: Install TBB and Embree, if using distro packages'
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
sudo apt install libtbb-dev libembree-dev
echo "USE_SYSTEM_TBB_AND_EMBREE=1" >> $GITHUB_ENV
- name: 'Linux: Build the artifact'
if: startsWith(matrix.os, 'ubuntu-')
run: ./build-linux-64.sh
- name: 'Linux: Prepare the artifact'
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
mkdir ericw-tools-linux
unzip build-linux/*-Linux.zip -d ericw-tools-linux
- name: 'Linux: Upload the artifact'
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.use-asan == 'NO' }}
uses: actions/upload-artifact@v4
with:
path: ericw-tools-linux/
name: ericw-tools-${{ github.sha }}-linux
if-no-files-found: error
- name: 'Linux: Create GitHub Release and upload build'
uses: softprops/action-gh-release@v1
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.use-asan == 'NO' && startsWith(github.ref, 'refs/tags/') }}
with:
draft: true
files: |
build-linux/*-Linux.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'macOS: Install Qt5'
if: ${{ startsWith(matrix.os, 'macos-') }}
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
- name: 'macOS: Build the artifact'
if: startsWith(matrix.os, 'macos-')
run: ./build-osx.sh
- name: 'macOS: Prepare the artifact'
if: ${{ startsWith(matrix.os, 'macos-') }}
run: |
mkdir ericw-tools-macos
unzip build-osx/*-Darwin.zip -d ericw-tools-macos
- name: 'macOS: Upload the artifact'
if: ${{ startsWith(matrix.os, 'macos-') && matrix.use-asan == 'NO' }}
uses: actions/upload-artifact@v4
with:
path: ericw-tools-macos/
name: ericw-tools-${{ github.sha }}-macos
if-no-files-found: error
- name: 'macOS: Create GitHub Release and upload build'
uses: softprops/action-gh-release@v1
if: ${{ startsWith(matrix.os, 'macos-') && matrix.use-asan == 'NO' && startsWith(github.ref, 'refs/tags/') }}
with:
draft: true
files: |
build-osx/*-Darwin.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Windows: Setup MSVC environment'
if: startsWith(matrix.os, 'windows-')
uses: ilammy/msvc-dev-cmd@v1
- name: 'Windows: Install Qt5'
if: ${{ startsWith(matrix.os, 'windows-') }}
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
arch: win64_msvc2019_64
- name: 'Windows: Build the artifact'
if: startsWith(matrix.os, 'windows-')
run: .\build-windows.ps1
- name: 'Windows: Prepare the artifact'
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
7z x build-windows\*-win64.zip -o"ericw-tools-windows\" -y
shell: pwsh
- name: 'Windows: Upload the artifact'
if: ${{ startsWith(matrix.os, 'windows-') && matrix.use-asan == 'NO' }}
uses: actions/upload-artifact@v4
with:
path: ericw-tools-windows/
name: ericw-tools-${{ github.sha }}-windows
if-no-files-found: error
- name: 'Windows: Create GitHub Release and upload build'
uses: softprops/action-gh-release@v1
if: ${{ startsWith(matrix.os, 'windows-') && matrix.use-asan == 'NO' && startsWith(github.ref, 'refs/tags/') }}
with:
draft: true
files: |
build-windows/*-win64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}