-
Notifications
You must be signed in to change notification settings - Fork 98
157 lines (134 loc) · 5.15 KB
/
packaging.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
name: Packaging
# Runs on new tags and manually (workflow_dispatch).
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
# create-release -------------------------------------------------------------
create-release:
name: Create release
runs-on: ubuntu-20.04
outputs: # Output contains the upload url. Will be reused on upload release
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
# Linux ----------------------------------------------------------------------
linux:
name: Linux
runs-on: ubuntu-20.04
timeout-minutes: 60
needs: create-release
steps:
- name: Download repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: bash ./.github/scripts/linux/install-deps.sh
- name: Generate Makefile
run: cmake -S . -B build/ -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-class-memaccess -DWITH_VST3=ON
- name: Build
run: cmake --build build/ -j 2
- name: Make package
run: bash ./.github/scripts/linux/make-package.sh ${{ github.ref_name }}
- name: Upload release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: dist/Giada-${{ github.ref_name }}-x86_64.AppImage
asset_name: Giada-${{ github.ref_name }}-x86_64.AppImage
asset_content_type: application/x-executable
# Windows --------------------------------------------------------------------
windows:
name: Windows
runs-on: windows-2019
timeout-minutes: 60
needs: create-release
steps:
- name: Download repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
shell: bash
run: bash ./.github/scripts/windows/install-deps.sh
- name: Generate Makefile
shell: bash
run: cmake -S . -B build/ -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DWITH_VST3=ON
- name: Build
shell: bash
run: cmake --build build/ --config Release -j 2
- name: Make package
run: bash ./.github/scripts/windows/make-package.sh ${{ github.ref_name }}
- name: Upload release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: dist/giada-${{ github.ref_name }}-x86_64-windows.zip
asset_name: giada-${{ github.ref_name }}-x86_64-windows.zip
asset_content_type: application/zip
# macOS ----------------------------------------------------------------------
macos:
name: macOS
runs-on: macos-11
timeout-minutes: 60
needs: create-release
steps:
- name: Download repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Generate Makefile
run: cmake -S . -B build/ -G "Xcode" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_CXX_FLAGS="-x objective-c++" -DWITH_VST3=ON
- name: Build
run: cmake --build build/ --config Release -j 2
- name: Make package
run: bash ./.github/scripts/macos/make-package.sh ${{ github.ref_name }}
- name: Upload release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: dist/giada-${{ github.ref_name }}-x86_64-macos.zip
asset_name: giada-${{ github.ref_name }}-x86_64-macos.zip
asset_content_type: application/zip
# source ---------------------------------------------------------------------
source:
name: Source
runs-on: ubuntu-20.04
timeout-minutes: 60
needs: create-release
steps:
- name: Download repository
uses: actions/checkout@v2
- name: Make source package
run: python3 ./.github/scripts/make-src.py ${{ github.ref_name }}
- name: Upload release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: dist/giada-${{ github.ref_name }}-src.tar.gz
asset_name: giada-${{ github.ref_name }}-src.tar.gz
asset_content_type: application/gzip