This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (70 loc) · 2.26 KB
/
rust.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
name: Build Test
on:
push:
branches:
- master
paths:
- .github/workflows/**
- src/**
- Cargo.toml
jobs:
test:
name: build project
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: rust_install
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: install_cross
run: |
cargo install cross --git https://github.com/cross-rs/cross
- name: build
run: |
cross build --target i686-pc-windows-gnu --release
cross build --target aarch64-unknown-linux-musl --release
cross build --target i686-unknown-linux-musl --release
cross build --target armv7-unknown-linux-musleabi --release
cross build --target aarch64-linux-android --release
- name: before_upload
run: |
mkdir Release
cp target/i686-pc-windows-gnu/release/kook_onebot.exe Release/kook_onebot_windows_i686.exe
cp target/aarch64-unknown-linux-musl/release/kook_onebot Release/kook_onebot_linux_aarch64
cp target/i686-unknown-linux-musl/release/kook_onebot Release/kook_onebot_linux_i686
cp target/armv7-unknown-linux-musleabi/release/kook_onebot Release/kook_onebot_linux_armv7
cp target/aarch64-linux-android/release/kook_onebot Release/kook_onebot_android_aarch64
- name: upload file1
uses: actions/upload-artifact@v3
with:
name: kook_onebot_windows_i686.exe
path:
Release/kook_onebot_windows_i686.exe
- name: upload file2
uses: actions/upload-artifact@v3
with:
name: kook_onebot_linux_aarch64
path:
Release/kook_onebot_linux_aarch64
- name: upload file3
uses: actions/upload-artifact@v3
with:
name: kook_onebot_linux_i686
path:
Release/kook_onebot_linux_i686
- name: upload file4
uses: actions/upload-artifact@v3
with:
name: kook_onebot_linux_armv7
path:
Release/kook_onebot_linux_armv7
- name: upload file file5
uses: actions/upload-artifact@v3
with:
name: kook_onebot_android_aarch64
path:
Release/kook_onebot_android_aarch64