forked from rrwick/Bandage
-
Notifications
You must be signed in to change notification settings - Fork 10
168 lines (139 loc) · 5.35 KB
/
snapshots.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
name: build-snapshots
on:
workflow_dispatch:
push:
tags:
- "v*.*"
branches: [ dev ]
env:
BUILD_TYPE: Release
QT_QPA_PLATFORM: offscreen
XDG_RUNTIME_DIR: '/tmp/runtime-runner'
QT_VERSION: 6.2.*
jobs:
build-linux:
if: ${{ false }} # disable for now
runs-on: ubuntu-20.04
name: '🐧 Ubuntu 20.04'
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: '⚙️ Install dependencies'
run: sudo apt-get install -y appstream
- name: '⚙️ Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr
- name: '🚧 Build'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j8
- name: '⚙️ Make AppDir'
working-directory: ${{github.workspace}}/build
run: make install DESTDIR=AppDir
- name: '⚙️ Install Linuxdeploy'
working-directory: ${{github.workspace}}/build
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy*.AppImage
- name: '📦 Make AppImage'
working-directory: ${{github.workspace}}/build
run: |
export EXTRA_PLATFORM_PLUGINS="libqoffscreen.so;libqminimal.so"
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
mv BandageNG*.AppImage BandageNG-Linux-${{steps.commit.outputs.short}}.AppImage
shell: bash
- name: '📤 Upload artifact: AppImage'
uses: actions/upload-artifact@v3
with:
name: BandageNG-Linux-${{steps.commit.outputs.short}}.AppImage
path: ${{github.workspace}}/build/BandageNG*.AppImage
build-mac:
if: ${{ false }} # disable for now
runs-on: macos-latest
name: '🍎 macOS'
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: '⚙️ Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_INSTALL_PREFIX=/usr
- name: '🚧 Build'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j8
- name: '📦 Make DMG'
working-directory: ${{github.workspace}}/build
run: |
macdeployqt BandageNG.app -dmg
mv *.dmg BandageNG-macOS-${{steps.commit.outputs.short}}.dmg
- name: '📤 Upload artifact: DMG'
uses: actions/upload-artifact@v3
with:
name: BandageNG-macOS-${{steps.commit.outputs.short}}.dmg
path: ${{github.workspace}}/build/BandageNG*.dmg
build-windows:
runs-on: windows-latest
name: '🧊 Windows'
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: '⚙️ Configure MSVC'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
spectre: true
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: '⚙️ Install Zlib'
run: |
C:\msys64\usr\bin\pacman -S zlib-devel --noconfirm
- name: '⚙️ Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_LIBRARY_PATH=C:\msys64\usr\lib
- name: '🚧 Build'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j8
# Upload continuous build
upload:
if: ${{ false }} # disable for now
name: '🗂 Create release and upload artifacts'
needs:
- build-linux
- build-mac
runs-on: ubuntu-20.04
steps:
- name: '⚙️ Install dependencies'
run: sudo apt-get install -y libfuse2
- name: '📥 Download artifacts'
uses: actions/download-artifact@v3
- name: '🗂 Inspect directory after downloading artifacts'
run: ls -alFR
- name: '🚀 Create release and upload artifacts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage **/BandageNG-Linux-*.AppImage
./pyuploadtool-x86_64.AppImage **/BandageNG-macOS-*.dmg