-
Notifications
You must be signed in to change notification settings - Fork 1
199 lines (165 loc) · 6.3 KB
/
cd.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: CD
on:
- push
- pull_request
env:
OSX_QT_VERSION: 6.7.0
jobs:
build-win:
name: win build (msys2)
if: github.event_name == 'push'
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-cmake make mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-charts mingw-w64-x86_64-qt6-svg mingw-w64-x86_64-qt6-tools mingw-w64-x86_64-nsis zip unzip
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Configure
run: |
mkdir build
cd build
cmake ..
- name: Build
run: |
cd build
cmake --build .
- name: Package
id: package
run: |
cd build
VERSION_NAME=`git describe`
../.github/scripts/package_msys.sh
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload zip to GitHub Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-win-qt6-zip
path: ./build/package-zip/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.zip
- name: Upload to GitHub Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-win-qt6-exe
path: ./build/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.exe
- name: Release exe
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: |
./build/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.exe
./build/package-zip/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
###################################
build-linux-release:
name: linux appimage
if: false
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Updates
run: sudo apt-get update
- name: Dependencies
run: sudo apt-get install qtbase5-dev libqt5charts5-dev qt5-default cmake
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=appdir/usr ..
- name: Build
run: |
cd build
cmake --build .
- name: Package
id: package
run: |
cd build
VERSION_NAME=`git describe`
. ../.github/scripts/package_linux.sh
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload to Github Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-linux
path: DataExplorer-linux-${{ steps.package.outputs.VERSION_NAME }}-x86_64.AppImage
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: DataExplorer-linux-${{ steps.package.outputs.VERSION_NAME }}-x86_64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
############################
macosx:
name: Mac OS X
runs-on: macos-11
if: true
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Install Dependencies
run: |
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
sudo tar xvf ./QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz -C /usr/local
rm QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
sudo tar xvf ./QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz -C /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin --strip-components=1
rm QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtCharts-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
sudo tar xvf ./QtCharts-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz -C /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin --strip-components=1
rm QtCharts-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
- name: Configure
run: |
mkdir build
cd build
/usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/qt-cmake ..
- name: Build
run: cmake --build build
- name: Workarounds
run: |
mkdir -p texstudio.app/Contents/Frameworks
cp /usr/local/lib/libbrotlicommon.1.dylib texstudio.app/Contents/Frameworks
- name: Package
id: package
run: |
cd build
/usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/macdeployqt dataexplorer.app -dmg
VERSION_NAME=`git describe`
cp dataexplorer.dmg dataexplorer-osx-${VERSION_NAME}.dmg
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload to Github artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-osx
path: build/dataexplorer-osx-${{ steps.package.outputs.VERSION_NAME }}.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: build/dataexplorer-osx-${{ steps.package.outputs.VERSION_NAME }}.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}