-
Notifications
You must be signed in to change notification settings - Fork 2
212 lines (177 loc) · 4.79 KB
/
prepare-release.yml
File metadata and controls
212 lines (177 loc) · 4.79 KB
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
name: Prepare release
on:
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
prepare-release-ubuntu:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up Java toolchain
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up GraalVM
run: echo $GRAALVM_11_ROOT/bin >> $GITHUB_PATH
- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: '--release'
- name: Build dist-tar
uses: actions-rs/cargo@v1
with:
command: dist
args: 'build-tar'
- name: Upload dist-tar
uses: actions/upload-artifact@v2
with:
name: dist-tar-linux
path: target/dist/*.tar.gz
if-no-files-found: error
- name: Build dist-deb
uses: actions-rs/cargo@v1
with:
command: dist
args: 'build-deb'
- name: Upload dist-deb
uses: actions/upload-artifact@v2
with:
name: dist-deb
path: target/dist/*.deb
if-no-files-found: error
- name: Archive sources
run: .github/scripts/git-archive-all --format=tar.gz -o strix-src.tar.gz HEAD
- name: Upload sources
uses: actions/upload-artifact@v2
with:
name: dist-src
path: strix-src.tar.gz
if-no-files-found: error
prepare-release-centos:
runs-on: ubuntu-20.04
container:
image: centos:7
steps:
- name: Set up container
run: |
yum update -y
yum install -y git gcc zlib-devel centos-release-scl scl-utils rpm-build
# need to install this after install scl
yum install -y llvm-toolset-7
# update git to use checkout action with submodules
yum install -y \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum swap -y git git224-core
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up GraalVM
uses: ayltai/setup-graalvm@v1
with:
java-version: 11
graalvm-version: 21.1.0
native-image: true
- name: Build dist-rpm
run: scl enable llvm-toolset-7 'cargo dist build-rpm'
- name: Upload dist-rpm
uses: actions/upload-artifact@v2
with:
name: dist-rpm
path: target/dist/*.rpm
if-no-files-found: error
prepare-release-archlinux:
runs-on: ubuntu-20.04
container:
image: archlinux:base-devel
steps:
- name: Set up container
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm git clang
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up GraalVM
uses: ayltai/setup-graalvm@v1
with:
java-version: 11
graalvm-version: 21.1.0
native-image: true
# fix makepkg to run it as root
- name: Fix makepkg
run: sed -e 's/EUID == 0/0/' -i /usr/bin/makepkg
- name: Build dist-pkg
run: cargo dist build-pkg
- name: Upload dist-pkg
uses: actions/upload-artifact@v2
with:
name: dist-pkg
path: target/dist/*.pkg.tar.zst
if-no-files-found: error
prepare-release-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up GraalVM
uses: ayltai/setup-graalvm@v1
with:
java-version: 11
graalvm-version: 21.1.0
native-image: true
- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: '--release'
- name: Build dist-tar
uses: actions-rs/cargo@v1
with:
command: dist
args: 'build-tar'
- name: Upload dist-tar
uses: actions/upload-artifact@v2
with:
name: dist-tar-macos
path: target/dist/*.tar.gz
if-no-files-found: error