-
Notifications
You must be signed in to change notification settings - Fork 17
179 lines (144 loc) · 5.97 KB
/
releases.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
name: Releases
on:
push:
tags:
- '*'
env:
CARGO_TERM_COLOR: always
OCTASINE_SEMVER_VERSION: "v0.9"
jobs:
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
command: check licenses
arguments: --all-features --workspace
build-macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Install latest Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Setup Rust dependency caching
uses: Swatinem/rust-cache@v2
# It's unclear if xtask will be affected by env vars
- name: Build and bundle plugin
run: |
echo -e "[octasine]\nname = \"OctaSine $OCTASINE_SEMVER_VERSION\"" > bundler.toml
export SDKROOT=$(xcrun -sdk macosx12.3 --show-sdk-path)
echo "SDKROOT=$SDKROOT"
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx12.3 --show-sdk-platform-version)
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
cargo xtask bundle-universal -p octasine --release --verbose --features "vst2"
cargo xtask bundle-universal -p octasine --release --verbose --features "clap"
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
shell: bash
- name: Install cargo-about
run: cargo install --debug --locked cargo-about
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Create release zip
run: |
mkdir releases
mkdir -p "release-tmp/OctaSine/VST2"
mkdir -p "release-tmp/OctaSine/CLAP"
cd release-tmp
cp -r "../target/bundled/OctaSine $OCTASINE_SEMVER_VERSION.vst" "OctaSine/VST2/OctaSine $OCTASINE_SEMVER_VERSION.vst"
cp -r "../target/bundled/OctaSine $OCTASINE_SEMVER_VERSION.clap" "OctaSine/CLAP/OctaSine $OCTASINE_SEMVER_VERSION.clap"
cargo-about generate -o "OctaSine/LICENSES.html" "../about.hbs" -m "../octasine/Cargo.toml"
zip -9 -r "../releases/OctaSine-${{ steps.get_version.outputs.VERSION }}-macOS.zip" "OctaSine"
shell: bash
- uses: ncipollo/release-action@v1
with:
artifacts: "releases/*.zip"
draft: true
allowUpdates: true
artifactErrorsFailBuild: true
token: ${{ secrets.GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install latest Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust dependency caching
uses: Swatinem/rust-cache@v2
- name: Setup MSVC shell
uses: ilammy/msvc-dev-cmd@v1
- name: Build and bundle plugin (VST2)
run: cargo xtask bundle -p octasine --release --verbose --features "vst2"
- name: Build and bundle plugin (clap)
run: cargo xtask bundle -p octasine --release --verbose --features "clap"
- name: Install cargo-about
run: cargo install --debug --locked cargo-about
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Create release file
run: |
mkdir releases
New-Item "tmp\OctaSine" -ItemType Directory -ea 0
New-Item "tmp\OctaSine\VST2" -ItemType Directory -ea 0
New-Item "tmp\OctaSine\CLAP" -ItemType Directory -ea 0
Copy-Item "LICENSE" -Destination "tmp\OctaSine\LICENSE.txt"
cargo-about generate -o "tmp\OctaSine\LICENSES.html" "about.hbs" -m "octasine\Cargo.toml"
$version = $env:OCTASINE_SEMVER_VERSION
Copy-Item "target\bundled\octasine.dll" -Destination "tmp\OctaSine\VST2\OctaSine $version.dll"
Copy-Item "target\bundled\octasine.clap" -Destination "tmp\OctaSine\CLAP\OctaSine $version.clap"
Compress-Archive -Path "tmp\OctaSine" -DestinationPath releases\OctaSine-${{ steps.get_version.outputs.VERSION }}-Windows.zip -CompressionLevel Optimal
- uses: ncipollo/release-action@v1
with:
artifacts: "releases/*.zip"
draft: true
allowUpdates: true
artifactErrorsFailBuild: true
token: ${{ secrets.GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install baseview dependencies
run: |
sudo apt update
sudo apt install libgl-dev libx11-xcb-dev libxcb1-dev libxcb-dri2-0-dev libxcb-icccm4-dev libxcursor-dev libxkbcommon-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Install latest Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust dependency caching
uses: Swatinem/rust-cache@v2
- name: Build and bundle plugin (VST2)
run: cargo xtask bundle -p octasine --release --verbose --features "vst2"
- name: Build and bundle plugin (clap)
run: cargo xtask bundle -p octasine --release --verbose --features "clap"
- name: Install cargo-about
run: cargo install --debug --locked cargo-about
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Create release zip
run: |
mkdir releases
mkdir -p "release-tmp/OctaSine/VST2"
mkdir -p "release-tmp/OctaSine/CLAP"
cd release-tmp
cp -r ../target/bundled/octasine.so "OctaSine/VST2/OctaSine $OCTASINE_SEMVER_VERSION.so"
cp -r ../target/bundled/octasine.clap "OctaSine/CLAP/OctaSine $OCTASINE_SEMVER_VERSION.clap"
cargo-about generate -o "OctaSine/LICENSES.html" "../about.hbs" -m "../octasine/Cargo.toml"
zip -9 -r "../releases/OctaSine-${{ steps.get_version.outputs.VERSION }}-Ubuntu-20_04.zip" "OctaSine"
shell: bash
- uses: ncipollo/release-action@v1
with:
artifacts: "releases/*.zip"
draft: true
allowUpdates: true
artifactErrorsFailBuild: true
token: ${{ secrets.GITHUB_TOKEN }}