-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (113 loc) · 4.46 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Build
on: [push]
permissions:
contents: write
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-debian-ubuntu.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package
working-directory: ${{github.workspace}}/build
run: cpack
- uses: actions/upload-artifact@v4
with:
name: LoopAuditioneer-${{github.ref_name}}-linux
path: ${{github.workspace}}/build/LoopAuditioneer*.tar.gz
build-appimage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-ubuntu-appimage.sh
- name: Read version file
shell: bash
working-directory: ${{github.workspace}}
id: read_version
run: |
VERSION_TXT=$(< version.txt)
echo "app_version=${VERSION_TXT}" >> $GITHUB_ENV
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DRTAUDIO_USE_JACK=OFF -DCMAKE_INSTALL_PREFIX=/usr
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
working-directory: ${{github.workspace}}/build
run: make install DESTDIR=AppDir
- name: Create Appimage
working-directory: ${{github.workspace}}/build
run: |
echo "DEPLOY_GTK_VERSION=3" >> $GITHUB_ENV
echo "APPIMAGE_EXTRACT_AND_RUN=1" >> $GITHUB_ENV
linuxdeploy-x86_64.AppImage --appdir AppDir -e ./bin/LoopAuditioneer -d ./share/LoopAuditioneer/applications/LoopAuditioneer.desktop -i ./share/icons/hicolor/256x256/apps/LoopAuditioneer.png --plugin gtk
appimagetool-x86_64.AppImage --no-appstream AppDir LoopAuditioneer-${{env.app_version}}.x86_64.AppImage
- uses: actions/upload-artifact@v4
with:
name: LoopAuditioneer-${{github.ref_name}}-AppImage
path: ${{github.workspace}}/build/LoopAuditioneer*.AppImage
crossbuild-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-ubuntu-cross.sh
- name: Get cross-compiled wxWidgets
run: |
wget https://github.com/larspalo/WxWidgetsCross/releases/download/3.2.3-2.go/wxwidgets3-mingw-w64-static_3.2.3-2.go_all.deb
sudo apt-get install -y ./wxwidgets3-mingw-w64-static_3.2.3-2.go_all.deb
- name: Configure CMake
run: cmake -B ${{github.workspace}}/crossbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain.def
- name: Build
run: cmake --build ${{github.workspace}}/crossbuild --config ${{env.BUILD_TYPE}}
- name: Package
working-directory: ${{github.workspace}}/crossbuild
run: cpack
- uses: actions/upload-artifact@v4
with:
name: LoopAuditioneer-${{github.ref_name}}-windows
path: ${{github.workspace}}/crossbuild/LoopAuditioneer*.zip
release:
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
needs: [ build-linux, build-appimage, crossbuild-windows ]
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: LoopAuditioneer-${{github.ref_name}}-linux
- uses: actions/download-artifact@v4
with:
name: LoopAuditioneer-${{github.ref_name}}-AppImage
- uses: actions/download-artifact@v4
with:
name: LoopAuditioneer-${{github.ref_name}}-windows
- name: Remove Starting v From Tag
id: remove_v
run: |
TAG=${{github.ref_name}}
echo "release_version=${TAG#v}" >> $GITHUB_ENV
- name: Populate Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
body: Release files created from GitHub action runners.
files: |
LoopAuditioneer-${{env.release_version}}-linux.x86_64.tar.gz
LoopAuditioneer-${{env.release_version}}.x86_64.AppImage
LoopAuditioneer-${{env.release_version}}-windows.x86_64.zip