-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkflow_binary_old.yml
68 lines (52 loc) · 2.59 KB
/
workflow_binary_old.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
name: Backend - Binary
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v3
- name: 🔧 Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: 🚀 Build the binaries
run: |
mkdir out
cd packages/backend
# Build linux 64-bit targets
cargo build --release --target x86_64-unknown-linux-gnu
RUSTFLAGS="-C target-feature=+crt-static" cargo build \
--release --target x86_64-unknown-linux-musl
# Build linux arm64 targets
cargo build --release --target aarch64-unknown-linux-gnu
RUSTFLAGS="-C target-feature=+crt-static" cargo build \
--release --target aarch64-unknown-linux-musl
# Build linux 32-bit targets
cargo build --release --target i686-unknown-linux-gnu
RUSTFLAGS="-C target-feature=+crt-static" cargo build \
--release --target i686-unknown-linux-musl
# Build linux arm32 targets
cargo build --release --target arm-unknown-linux-gnueabi
RUSTFLAGS="-C target-feature=+crt-static" cargo build \
--release --target arm-unknown-linux-musleabi
# Build linux armhf targets
cargo build --release --target arm-unknown-linux-gnueabihf
RUSTFLAGS="-C target-feature=+crt-static" cargo build \
--release --target arm-unknown-linux-musleabihf
# Copy the binaries
cp target/x86_64-unknown-linux-gnu/release/nodeforum ../../out/nodeforum-amd64
cp target/x86_64-unknown-linux-musl/release/nodeforum ../../out/nodeforum-amd64-static
cp target/aarch64-unknown-linux-gnu/release/nodeforum ../../out/nodeforum-arm64
cp target/aarch64-unknown-linux-musl/release/nodeforum ../../out/nodeforum-arm64-static
cp target/i686-unknown-linux-gnu/release/nodeforum ../../out/nodeforum-i686
cp target/i686-unknown-linux-musl/release/nodeforum ../../out/nodeforum-i686-static
cp target/arm-unknown-linux-gnueabi/release/nodeforum ../../out/nodeforum-arm32
cp target/arm-unknown-linux-musleabi/release/nodeforum ../../out/nodeforum-arm32-static
cp target/arm-unknown-linux-gnueabihf/release/nodeforum ../../out/nodeforum-armhf
cp target/arm-unknown-linux-musleabihf/release/nodeforum ../../out/nodeforum-armhf-static
- name: 📤 Upload artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: out/*