-
Notifications
You must be signed in to change notification settings - Fork 46
197 lines (164 loc) · 7.77 KB
/
choreo.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
name: Choreo / Build
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
env:
MACOSX_DEPLOYMENT_TARGET: 13.3
strategy:
fail-fast: false
matrix:
include:
- artifact-name: Windows-x86_64
os: windows-2022
tauri-build-flags: --target x86_64-pc-windows-msvc -v -- --workspace
- artifact-name: Windows-aarch64
os: windows-2022
tauri-build-flags: --target aarch64-pc-windows-msvc -v -- --workspace
- artifact-name: macOS-x86_64
os: macOS-14
tauri-build-flags: --target x86_64-apple-darwin -v -- --workspace
- artifact-name: macOS-aarch64
os: macOS-14
tauri-build-flags: --target aarch64-apple-darwin -v -- --workspace
- artifact-name: Linux-x86_64
os: ubuntu-22.04
tauri-build-flags: --target x86_64-unknown-linux-gnu -v -- --workspace
name: "${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -q
sudo apt-get install -y \
build-essential \
curl \
file \
libayatana-appindicator3-dev \
libgtk-3-dev \
librsvg2-dev \
libssl-dev \
libwebkit2gtk-4.0-dev \
wget
- name: Install Node.js dependencies
run: pnpm install
continue-on-error: true
- name: Set up Windows aarch64 Rust compiler
if: matrix.artifact-name == 'Windows-aarch64'
run: rustup target install aarch64-pc-windows-msvc
- name: Set up macOS x86_64 Rust compiler
if: matrix.artifact-name == 'macOS-x86_64'
run: rustup target add x86_64-apple-darwin
- run: sudo xcode-select -switch /Applications/Xcode_15.3.app
if: startsWith(matrix.os, 'macOS')
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.5
- name: Build package
run: pnpm run tauri build ${{ matrix.tauri-build-flags }}
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: true
- name: Package artifacts (Windows x86_64)
if: matrix.artifact-name == 'Windows-x86_64'
run: |
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}-standalone.zip -Path target/x86_64-pc-windows-msvc/release/choreo.exe,target/x86_64-pc-windows-msvc/release/choreo-cli.exe
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}.zip -Path ${{ matrix.artifact-name }}-standalone.zip,target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Package artifacts (Windows aarch64)
if: matrix.artifact-name == 'Windows-aarch64'
run: |
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}-standalone.zip -Path target/aarch64-pc-windows-msvc/release/choreo.exe,target/aarch64-pc-windows-msvc/release/choreo-cli.exe
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}.zip -Path ${{ matrix.artifact-name }}-standalone.zip,target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Package artifacts (macOS x86_64)
if: matrix.artifact-name == 'macOS-x86_64'
# Tauri incorrectly capitalizes the executable name on macOS, so we
# manually rename it
run: |
cp target/x86_64-apple-darwin/release/Choreo choreo
zip -j ${{ matrix.artifact-name }}-standalone.zip choreo target/x86_64-apple-darwin/release/choreo-cli
zip -j ${{ matrix.artifact-name }}.zip ${{ matrix.artifact-name }}-standalone.zip target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
- name: Package artifacts (macOS aarch64)
if: matrix.artifact-name == 'macOS-aarch64'
# Tauri incorrectly capitalizes the executable name on macOS, so we
# manually rename it
run: |
cp target/aarch64-apple-darwin/release/Choreo choreo
zip -j ${{ matrix.artifact-name }}-standalone.zip choreo target/aarch64-apple-darwin/release/choreo-cli
zip -j ${{ matrix.artifact-name }}.zip ${{ matrix.artifact-name }}-standalone.zip target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
- name: Package artifacts (Linux x86_64)
if: matrix.artifact-name == 'Linux-x86_64'
run: |
zip -j ${{ matrix.artifact-name }}-standalone.zip target/x86_64-unknown-linux-gnu/release/choreo target/x86_64-unknown-linux-gnu/release/choreo-cli
zip -j ${{ matrix.artifact-name }}.zip ${{ matrix.artifact-name }}-standalone.zip target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm
# Zipping manually works around upload-artifact stripping execute
# permissions from files
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-name }}.zip
release:
name: Create draft release
needs: [build]
runs-on: ubuntu-24.04
if: |
github.repository_owner == 'SleipnirGroup' &&
startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download prebuilt binaries
uses: actions/download-artifact@v4
with:
path: pkg
- name: Display structure of downloaded files
run: ls -R
- name: Rename Windows x86_64 artifacts
working-directory: pkg/Windows-x86_64
run: |
unzip -o Windows-x86_64.zip
rm Windows-x86_64.zip
mv Windows-x86_64-standalone.zip Choreo-${{ github.ref_name }}-Windows-x86_64-standalone.zip
mv Choreo_*_x64-setup.exe Choreo-${{ github.ref_name }}-Windows-x86_64-setup.exe
- name: Rename Windows aarch64 artifacts
working-directory: pkg/Windows-aarch64
run: |
unzip -o Windows-aarch64.zip
rm Windows-aarch64.zip
mv Windows-aarch64-standalone.zip Choreo-${{ github.ref_name }}-Windows-aarch64-standalone.zip
mv Choreo_*_arm64-setup.exe Choreo-${{ github.ref_name }}-Windows-aarch64-setup.exe
- name: Rename macOS x86_64 artifacts
working-directory: pkg/macOS-x86_64
run: |
unzip -o macOS-x86_64.zip
rm macOS-x86_64.zip
mv macOS-x86_64-standalone.zip Choreo-${{ github.ref_name }}-macOS-x86_64-standalone.zip
mv Choreo_*_x64.dmg Choreo-${{ github.ref_name }}-macOS-x86_64.dmg
- name: Rename macOS aarch64 artifacts
working-directory: pkg/macOS-aarch64
run: |
unzip -o macOS-aarch64.zip
rm macOS-aarch64.zip
mv macOS-aarch64-standalone.zip Choreo-${{ github.ref_name }}-macOS-aarch64-standalone.zip
mv Choreo_*_aarch64.dmg Choreo-${{ github.ref_name }}-macOS-aarch64.dmg
- name: Rename Linux x86_64 artifacts
working-directory: pkg/Linux-x86_64
run: |
unzip -o Linux-x86_64.zip
rm Linux-x86_64.zip
mv Linux-x86_64-standalone.zip Choreo-${{ github.ref_name }}-Linux-x86_64-standalone.zip
mv choreo_*_amd64.AppImage Choreo-${{ github.ref_name }}-Linux-x86_64.AppImage
mv choreo_*_amd64.deb Choreo-${{ github.ref_name }}-Linux-x86_64.deb
mv choreo-*.x86_64.rpm Choreo-${{ github.ref_name }}-Linux-x86_64.rpm
- name: Display structure of renamed files
run: ls -R
- uses: ncipollo/release-action@v1
with:
name: Choreo ${{ github.ref_name }}
tag: ${{ github.ref_name }}
artifacts: "pkg/**/*"
draft: true
prerelease: true