forked from mne-tools/mne-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (145 loc) · 5.69 KB
/
buildqtbinaries.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: BuildQtBinaries
on:
push:
branches:
# Change this to the branch name which you are developing on to trigger the workflow
- generateqt
jobs:
GenerateLinuxStaticBinaries:
runs-on: ubuntu-18.04
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install OpenGL
run: |
sudo apt-get install build-essential libgl1-mesa-dev
- name: Compile static Qt version
run: |
# Clone Qt5 repo
cd ..
git clone https://code.qt.io/qt/qt5.git -b 5.15.2
cd qt5
./init-repository -f --module-subset=qtbase,qtcharts,qtsvg,qt3d
# Create shadow build folder
cd ..
mkdir qt5_shadow
cd qt5_shadow
# Configure Qt5
../qt5/configure -static -release -prefix "../Qt5_binaries" -skip webengine -nomake tools -nomake tests -nomake examples -no-dbus -no-ssl -no-pch -opensource -confirm-license -bundled-xcb-xinput -qt-libpng -qt-pcre
make module-qtbase module-qtsvg module-qtcharts module-qt3d -j4
make install -j4
- name: Package binaries
run: |
# Create archive of the pre-built Qt binaries
tar cfvz qt5_5152_static_binaries_linux.tar.gz ../Qt5_binaries/.
- uses: actions/upload-artifact@v1
with:
name: qt5_5152_static_binaries_linux.tar.gz
path: qt5_5152_static_binaries_linux.tar.gz
GenerateMacOSStaticBinaries:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Compile static Qt version
run: |
# Clone Qt5 repo
cd ..
git clone https://code.qt.io/qt/qt5.git -b 5.15.2
cd qt5
./init-repository -f --module-subset=qtbase,qtcharts,qtsvg,qt3d
# Create shadow build folder
cd ..
mkdir qt5_shadow
cd qt5_shadow
# Configure Qt5
../qt5/configure -static -release -prefix "../Qt5_binaries" -skip webengine -nomake tools -nomake tests -nomake examples -no-dbus -no-ssl -no-pch -opensource -confirm-license
make module-qtbase module-qtsvg module-qtcharts module-qt3d -j4
make install -j4
- name: Package binaries
run: |
# Create archive of the pre-built Qt binaries
tar cfvz qt5_5152_static_binaries_macos.tar.gz ../Qt5_binaries/.
- uses: actions/upload-artifact@v1
with:
name: qt5_5152_static_binaries_macos.tar.gz
path: qt5_5152_static_binaries_macos.tar.gz
GenerateWinStaticBinaries:
runs-on: windows-2019
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install Python 3.7 version
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Install jom
run: |
Invoke-WebRequest https://www.dropbox.com/s/gbf8sdx8wqxcrnd/jom.zip?dl=1 -OutFile .\jom.zip
expand-archive -path "jom.zip"
echo "D:\a\mne-cpp\mne-cpp\jom" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Compile static Qt version
run: |
# Clone Qt5 repo
cd ..
git clone https://code.qt.io/qt/qt5.git -b 5.15.2
cd qt5
perl init-repository -f --module-subset=qtbase,qtcharts,qtsvg,qt3d
# Create shadow build folder
cd ..
mkdir qt5_shadow
cd qt5_shadow
# Setup the compiler
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
# Configure Qt5
..\qt5\configure.bat -release -static -no-pch -optimize-size -opengl desktop -platform win32-msvc -prefix "..\Qt5_binaries" -skip webengine -nomake tools -nomake tests -nomake examples -opensource -confirm-license
jom -j4
nmake install
- name: Package binaries
run: |
# Create archive of the pre-built Qt binaries
7z a qt5_5152_static_binaries_win.zip ..\Qt5_binaries
- uses: actions/upload-artifact@v1
with:
name: qt5_5152_static_binaries_win.zip
path: qt5_5152_static_binaries_win.zip
GenerateWasmBinaries:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup emscripten compiler
run: |
cd ..
# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git
# Enter that directory and pull
cd emsdk
git pull
# Download and install the latest SDK tools.
./emsdk install 1.39.7
- name: Compile wasm Qt version
run: |
cd ..
# Make the "latest" emscripten SDK "active" for the current user.
./emsdk/emsdk activate 1.39.7
# Activate PATH and other environment variables in the current terminal
source ./emsdk/emsdk_env.sh
# Clone Qt5 repo
git clone https://code.qt.io/qt/qt5.git -b 5.15.2
cd qt5
./init-repository -f --module-subset=qtbase,qtcharts,qtsvg
# Configure Qt5
./configure -xplatform wasm-emscripten -feature-thread -skip webengine -nomake tests -nomake examples -no-dbus -no-ssl -no-pch -opensource -confirm-license -prefix "$PWD/../Qt5_binaries"
make module-qtbase module-qtsvg module-qtcharts -j4
make install -j4
- name: Package binaries
run: |
# Create archive of the pre-built Qt binaries
tar cfvz qt5_5152_static_binaries_wasm.tar.gz ../Qt5_binaries/.
- uses: actions/upload-artifact@v1
with:
name: qt5_5152_static_binaries_wasm.tar.gz
path: qt5_5152_static_binaries_wasm.tar.gz