-
Notifications
You must be signed in to change notification settings - Fork 74
207 lines (201 loc) · 8.19 KB
/
publish.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
198
199
200
201
202
203
204
205
206
207
name: Publish
on:
push:
tags:
- '*'
workflow_dispatch:
env:
QSV_KIND: prebuilt
jobs:
analyze-tags:
runs-on: ubuntu-22.04
outputs:
previous-tag: ${{ steps.previoustag.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
#▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼#
- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
#▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲#
# - name: delete git repo
# run: rm -rf qsv
publish:
name: Publish for ${{ matrix.job.target }}
needs: analyze-tags
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
rust: [stable]
job:
- os: ubuntu-22.04
os-name: linux
target: x86_64-unknown-linux-gnu
architecture: x86_64
use-cross: false
addl-build-args: --features=apply,generate,luau,fetch,foreach,self_update,geocode,polars
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
- os: ubuntu-22.04
os-name: linux
target: x86_64-unknown-linux-musl
architecture: x86_64
musl-prep: true
use-cross: false
addl-build-args: --features=apply,generate,fetch,foreach,self_update
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
- os: ubuntu-22.04
os-name: linux
target: i686-unknown-linux-gnu
architecture: i686
use-cross: true
addl-build-args: --features=apply,generate,fetch,foreach,self_update
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags:
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-msvc
architecture: x86_64
use-cross: false
addl-build-args: --features=apply,luau,fetch,self_update,geocode,polars
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
- os: windows-latest
os-name: windows
target: i686-pc-windows-msvc
architecture: i686
use-cross: true
addl-build-args: --features=apply,generate,fetch,self_update
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags:
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-gnu
architecture: x86_64
use-cross: false
addl-build-args: --features=apply,generate,luau,fetch,self_update,geocode,polars
default-features: --no-default-features
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
# - os: macos-12
# os-name: macos
# target: x86_64-apple-darwin
# architecture: x86_64
# use-cross: false
# addl-build-args: --features=apply,generate,luau,fetch,foreach,self_update,polars
# default-features: --no-default-features
# addl-qsvlite-features:
# addl-qsvdp-features: luau
# - os: macos-12
# os-name: macos
# target: aarch64-apple-darwin
# architecture: aarch64
# use-cross: true
# addl-build-args: --features=apply,generate,fetch,foreach,self_update
# default-features: --no-default-features
# addl-qsvlite-features:
# addl-qsvdp-features:
- os: ubuntu-22.04
os-name: linux
target: aarch64-unknown-linux-gnu
architecture: aarch64
use-cross: true
addl-build-args: --features=apply,generate,fetch,foreach,self_update
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags:
# - os: ubuntu-20.04
# os-name: linux
# target: arm-unknown-linux-gnueabihf
# architecture: arm
# use-cross: true
# addl-build-args: --features=apply,generate,luau,fetch,foreach,self_update
# default-features: --no-default-features
# - os: ubuntu-20.04
# os-name: linux
# target: arm-unknown-linux-musleabihf
# architecture: arm
# use-cross: true
# addl-build-args: --features=apply,generate,luau,fetch,foreach,self_update
# default-features: --no-default-features
steps:
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
target: ${{ matrix.job.target }}
override: true
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ needs.analyze-tags.outputs.previous-tag }}
- name: build prep for x86_64-unknown-linux-musl
if: ${{ matrix.job.musl-prep }}
run: |
sudo apt-get install musl-tools musl-dev
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
- name: Build qsv
# env:
# RUSTFLAGS: --emit=asm
env:
RUSTFLAGS: ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --locked --bin qsv --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable ${{ matrix.job.default-features }}
- name: Build qsvlite
env:
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --locked --bin qsvlite --features=lite,self_update,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }}
- name: Build qsvdp
env:
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --locked --bin qsvdp --features=datapusher_plus,${{ matrix.job.addl-qsvdp-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }}
- name: Copy binaries to working dir
shell: bash
run: |
mkdir qsv-${{ needs.analyze-tags.outputs.previous-tag }}
rm target/${{ matrix.job.target }}/release/*.d
cp -v target/${{ matrix.job.target }}/release/qsv* qsv-${{ needs.analyze-tags.outputs.previous-tag }}
- name: Create README
shell: bash
run: |
cat docs/publishing_assets/README.txt docs/publishing_assets/qsv-${{ matrix.job.target }}.txt > qsv-${{ needs.analyze-tags.outputs.previous-tag }}/README
- name: zip up binaries
run: 7z a -tzip qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip ./qsv-${{ needs.analyze-tags.outputs.previous-tag }}/* -mx=9 -mmt=on
- name: Upload zipped binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip
asset_name: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip
overwrite: true
tag: ${{ needs.analyze-tags.outputs.previous-tag }}