Skip to content

Commit cf2a738

Browse files
aa51513neevek
authored andcommitted
add Linux arm64 musl target and windows arm64 target
1 parent 56723ca commit cf2a738

File tree

1 file changed

+162
-13
lines changed

1 file changed

+162
-13
lines changed

.github/workflows/main.yml

Lines changed: 162 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- 'release/*'
77

88
jobs:
9-
linux-x86_64:
10-
name: Linux x86_64
9+
linux-gnu-x86_64:
10+
name: Linux gnu x86_64
1111
runs-on: ubuntu-20.04
1212
steps:
1313
- uses: actions/checkout@v2
@@ -16,18 +16,41 @@ jobs:
1616
toolchain: stable
1717
target: x86_64-unknown-linux-gnu
1818
override: true
19-
- run: rustup update && cargo build --all-features --release && mv target/release/omnip target/release/omnip-linux-x86_64
19+
- run: rustup update && cargo build --all-features --release && mv target/release/omnip target/release/omnip-linux-gnu-x86_64
2020
- name: Release
2121
uses: softprops/action-gh-release@v1
2222
if: startsWith(github.ref, 'refs/tags/')
2323
with:
2424
files: |
25-
target/release/omnip-linux-x86_64
25+
target/release/omnip-linux-gnu-x86_64
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
linux-musl-x86_64:
30+
name: Linux musl x86_64
31+
runs-on: ubuntu-20.04
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: stable
37+
target: x86_64-unknown-linux-musl
38+
override: true
39+
- run: sudo apt-get -y install musl-tools && rustup target add x86_64-unknown-linux-musl && rustup update
40+
- run: cargo install cross --git https://github.com/cross-rs/cross
41+
- run: cross build --all-features --release --target x86_64-unknown-linux-musl
42+
- run: mv target/x86_64-unknown-linux-musl/release/omnip target/x86_64-unknown-linux-musl/release/omnip-linux-musl-x86_64
43+
- name: Release
44+
uses: softprops/action-gh-release@v1
45+
if: startsWith(github.ref, 'refs/tags/')
46+
with:
47+
files: |
48+
target/x86_64-unknown-linux-musl/release/omnip-linux-musl-x86_64
2649
env:
2750
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2851

2952
windows-x86_64:
30-
name: Windows x86_64
53+
name: Windows msvc x86_64
3154
runs-on: windows-latest
3255
defaults:
3356
run:
@@ -49,6 +72,29 @@ jobs:
4972
env:
5073
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5174

75+
windows-arm64:
76+
name: Windows msvc ARM64
77+
runs-on: windows-latest
78+
defaults:
79+
run:
80+
shell: bash
81+
steps:
82+
- uses: actions/checkout@v2
83+
- uses: actions-rs/toolchain@v1
84+
with:
85+
toolchain: stable
86+
target: aarch64-pc-windows-msvc
87+
override: true
88+
- run: cargo build --target aarch64-pc-windows-msvc --all-features --release && mv target/aarch64-pc-windows-msvc/release/omnip.exe target/release/omnip-windows-arm64.exe
89+
- name: Release
90+
uses: softprops/action-gh-release@v1
91+
if: startsWith(github.ref, 'refs/tags/')
92+
with:
93+
files: |
94+
target/release/omnip-windows-arm64.exe
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
5298
darwin-x86_64:
5399
name: Darwin x86_64
54100
runs-on: macos-latest
@@ -89,8 +135,8 @@ jobs:
89135
env:
90136
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91137

92-
linux-armv7:
93-
name: Linux ARMv7
138+
linux-gnueabihf-armv7:
139+
name: Linux gnueabihf ARMv7
94140
runs-on: ubuntu-latest
95141
steps:
96142
- uses: actions/checkout@v2
@@ -99,18 +145,98 @@ jobs:
99145
toolchain: stable
100146
target: armv7-unknown-linux-gnueabihf
101147
override: true
102-
- run: rustup target add armv7-unknown-linux-gnueabihf && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target armv7-unknown-linux-gnueabihf && mv target/armv7-unknown-linux-gnueabihf/release/omnip target/armv7-unknown-linux-gnueabihf/release/omnip-linux-armv7
148+
- run: rustup target add armv7-unknown-linux-gnueabihf && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target armv7-unknown-linux-gnueabihf && mv target/armv7-unknown-linux-gnueabihf/release/omnip target/armv7-unknown-linux-gnueabihf/release/omnip-linux-gnueabihf-armv7
149+
- name: Release
150+
uses: softprops/action-gh-release@v1
151+
if: startsWith(github.ref, 'refs/tags/')
152+
with:
153+
files: |
154+
target/armv7-unknown-linux-gnueabihf/release/omnip-linux-gnueabihf-armv7
155+
env:
156+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157+
158+
linux-musleabihf-armv7:
159+
name: Linux musleabihf ARMv7
160+
runs-on: ubuntu-latest
161+
steps:
162+
- uses: actions/checkout@v2
163+
- uses: actions-rs/toolchain@v1
164+
with:
165+
toolchain: stable
166+
target: armv7-unknown-linux-musleabihf
167+
override: true
168+
- run: rustup target add armv7-unknown-linux-musleabihf && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target armv7-unknown-linux-musleabihf && mv target/armv7-unknown-linux-musleabihf/release/omnip target/armv7-unknown-linux-musleabihf/release/omnip-linux-musleabihf-armv7
169+
- name: Release
170+
uses: softprops/action-gh-release@v1
171+
if: startsWith(github.ref, 'refs/tags/')
172+
with:
173+
files: |
174+
target/armv7-unknown-linux-musleabihf/release/omnip-linux-musleabihf-armv7
175+
env:
176+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177+
178+
linux-musleabi-armv7:
179+
name: Linux musleabi ARMv7
180+
runs-on: ubuntu-latest
181+
steps:
182+
- uses: actions/checkout@v2
183+
- uses: actions-rs/toolchain@v1
184+
with:
185+
toolchain: stable
186+
target: armv7-unknown-linux-musleabi
187+
override: true
188+
- run: rustup target add armv7-unknown-linux-musleabi && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target armv7-unknown-linux-musleabi && mv target/armv7-unknown-linux-musleabi/release/omnip target/armv7-unknown-linux-musleabi/release/omnip-linux-musleabi-armv7
103189
- name: Release
104190
uses: softprops/action-gh-release@v1
105191
if: startsWith(github.ref, 'refs/tags/')
106192
with:
107193
files: |
108-
target/armv7-unknown-linux-gnueabihf/release/omnip-linux-armv7
194+
target/armv7-unknown-linux-musleabi/release/omnip-linux-musleabi-armv7
109195
env:
110196
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111197

112-
linux-aarch64:
113-
name: Linux Aarch64
198+
linux-gnueabi-armv7:
199+
name: Linux gnueabi ARMv7
200+
runs-on: ubuntu-latest
201+
steps:
202+
- uses: actions/checkout@v2
203+
- uses: actions-rs/toolchain@v1
204+
with:
205+
toolchain: stable
206+
target: armv7-unknown-linux-gnueabi
207+
override: true
208+
- run: rustup target add armv7-unknown-linux-gnueabi && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target armv7-unknown-linux-gnueabi && mv target/armv7-unknown-linux-gnueabi/release/omnip target/armv7-unknown-linux-gnueabi/release/omnip-linux-gnueabi-armv7
209+
- name: Release
210+
uses: softprops/action-gh-release@v1
211+
if: startsWith(github.ref, 'refs/tags/')
212+
with:
213+
files: |
214+
target/armv7-unknown-linux-gnueabi/release/omnip-linux-gnueabi-armv7
215+
env:
216+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
217+
218+
linux-musleabi-armv5:
219+
name: Linux musleabi ARMv5
220+
runs-on: ubuntu-latest
221+
steps:
222+
- uses: actions/checkout@v2
223+
- uses: actions-rs/toolchain@v1
224+
with:
225+
toolchain: stable
226+
target: arm-unknown-linux-musleabi
227+
override: true
228+
- run: rustup target add arm-unknown-linux-musleabi && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target arm-unknown-linux-musleabi && mv target/arm-unknown-linux-musleabi/release/omnip target/arm-unknown-linux-musleabi/release/omnip-linux-musleabi-armv5
229+
- name: Release
230+
uses: softprops/action-gh-release@v1
231+
if: startsWith(github.ref, 'refs/tags/')
232+
with:
233+
files: |
234+
target/arm-unknown-linux-musleabi/release/omnip-linux-musleabi-armv5
235+
env:
236+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237+
238+
linux-gnu-aarch64:
239+
name: Linux gnu Aarch64
114240
runs-on: ubuntu-latest
115241
steps:
116242
- uses: actions/checkout@v2
@@ -119,12 +245,35 @@ jobs:
119245
toolchain: stable
120246
target: aarch64-unknown-linux-gnu
121247
override: true
122-
- run: rustup target add aarch64-unknown-linux-gnu && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target aarch64-unknown-linux-gnu && mv target/aarch64-unknown-linux-gnu/release/omnip target/aarch64-unknown-linux-gnu/release/omnip-linux-aarch64
248+
- run: rustup target add aarch64-unknown-linux-gnu && rustup update && cargo install cross --git https://github.com/cross-rs/cross && cross build --all-features --release --target aarch64-unknown-linux-gnu && mv target/aarch64-unknown-linux-gnu/release/omnip target/aarch64-unknown-linux-gnu/release/omnip-linux-gnu-aarch64
249+
- name: Release
250+
uses: softprops/action-gh-release@v1
251+
if: startsWith(github.ref, 'refs/tags/')
252+
with:
253+
files: |
254+
target/aarch64-unknown-linux-gnu/release/omnip-linux-gnu-aarch64
255+
env:
256+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
257+
258+
linux-musl-aarch64:
259+
name: Linux musl Aarch64
260+
runs-on: ubuntu-latest
261+
steps:
262+
- uses: actions/checkout@v2
263+
- uses: actions-rs/toolchain@v1
264+
with:
265+
toolchain: stable
266+
target: aarch64-unknown-linux-musl
267+
override: true
268+
- run: sudo apt-get -y install musl-tools && rustup target add aarch64-unknown-linux-musl && rustup update
269+
- run: cargo install cross --git https://github.com/cross-rs/cross
270+
- run: cross build --all-features --release --target aarch64-unknown-linux-musl
271+
- run: mv target/aarch64-unknown-linux-musl/release/omnip target/aarch64-unknown-linux-musl/release/omnip-linux-musl-aarch64
123272
- name: Release
124273
uses: softprops/action-gh-release@v1
125274
if: startsWith(github.ref, 'refs/tags/')
126275
with:
127276
files: |
128-
target/aarch64-unknown-linux-gnu/release/omnip-linux-aarch64
277+
target/aarch64-unknown-linux-musl/release/omnip-linux-musl-aarch64
129278
env:
130279
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)