-
-
Notifications
You must be signed in to change notification settings - Fork 27
140 lines (115 loc) · 4.95 KB
/
rust_build.yml
File metadata and controls
140 lines (115 loc) · 4.95 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
name: Rust Build
on:
workflow_dispatch:
env:
RUST_BACKTRACE: full
EXPECT_RUST_BINARY_NAME: WindSend-S-Rust
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: aarch64-pc-windows-msvc
- name: Install NASM for tokio-rustls(aws-lc-rs) on Windows
uses: ilammy/setup-nasm@v1
- name: Install ninja-build tool for tokio-rustls(aws-lc-rs) on Windows
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Build windows-amd64
working-directory: ./windSend-rs
run: cargo build --verbose --release
- name: Build aarch64-pc-windows-msvc
working-directory: ./windSend-rs
run: cargo build --target aarch64-pc-windows-msvc --verbose --release
- name: Rename All Binary
run: |
mv ./windSend-rs/target/aarch64-pc-windows-msvc/release/wind_send.exe ./windSend-rs/target/aarch64-pc-windows-msvc/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe
mv ./windSend-rs/target/release/wind_send.exe ./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: windSend-rs-windows
path: |
./windSend-rs/target/aarch64-pc-windows-msvc/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe
./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: aarch64-unknown-linux-gnu
- name: Install dependencies on Ubuntu
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libxdo-dev libappindicator3-dev
# run: sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build linux-amd64
working-directory: ./windSend-rs
run: cargo build --verbose --release
# - name: Build aarch64-unknown-linux-gnu
# working-directory: ./windSend-rs
# run: cargo build --target aarch64-unknown-linux-gnu --verbose --release
- name: Rename All Binary
run: mv ./windSend-rs/target/release/wind_send ./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: windSend-rs-linux
path: |
./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
- name: Build macos-amd64
working-directory: ./windSend-rs
run: cargo build --verbose --release
- name: Build aarch64-apple-darwin
working-directory: ./windSend-rs
run: cargo build --target aarch64-apple-darwin --verbose --release
- name: Rename All Binary
run: |
mv ./windSend-rs/target/aarch64-apple-darwin/release/wind_send ./windSend-rs/target/aarch64-apple-darwin/release/${{ env.EXPECT_RUST_BINARY_NAME }}
mv ./windSend-rs/target/release/wind_send ./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: windSend-rs-macos
path: |
./windSend-rs/target/aarch64-apple-darwin/release/${{ env.EXPECT_RUST_BINARY_NAME }}
./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}
build-x86_64-unknown-linux-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- name: Install dependencies on Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libxdo-dev libappindicator3-dev
sudo apt-get install -y pkg-config libssl-dev build-essential linux-libc-dev
sudo apt-get install -y musl-dev musl-tools
- name: Build x86_64-unknown-linux-musl
working-directory: ./windSend-rs
run: cargo build --target x86_64-unknown-linux-musl --verbose --release
- name: Rename All Binary
run: mv ./windSend-rs/target/x86_64-unknown-linux-musl/release/wind_send ./windSend-rs/target/x86_64-unknown-linux-musl/release/${{ env.EXPECT_RUST_BINARY_NAME }}
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: windSend-rs-x86_64-unknown-linux-musl
path: |
./windSend-rs/target/x86_64-unknown-linux-musl/release/${{ env.EXPECT_RUST_BINARY_NAME }}