-
Notifications
You must be signed in to change notification settings - Fork 91
123 lines (99 loc) · 3.41 KB
/
build_binary.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
name: Binary Release Build
on:
push:
branches:
# - release/** # testing
env:
CARGO_TERM_COLOR: always
jobs:
linux_x86:
name: Linux x86
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build in Docker
run: |
# Get the latest stable rust toolchain version available
TOOLCHAIN=$(curl -s 'https://static.rust-lang.org/dist/channel-rust-stable.toml' | awk '/\[pkg.rust\]/ {getline;print;}' | sed -r 's/^version = "([0-9.]+) .*/\1/')
scripts/docker-build-linux.sh "$TOOLCHAIN"
env:
BUILD_ARCH: x86_64
RELAY_FEATURES:
- name: Bundle Debug File
run: |
cd target/x86_64-unknown-linux-gnu/release/
zip relay-Linux-x86_64-debug.zip relay.debug
mv relay relay-Linux-x86_64
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: target/x86_64-unknown-linux-gnu/release/relay-Linux-x86_64*
linux_arm:
name: Linux ARM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build in Docker
run: |
# Get the latest stable rust toolchain version available
TOOLCHAIN=$(curl -s 'https://static.rust-lang.org/dist/channel-rust-stable.toml' | awk '/\[pkg.rust\]/ {getline;print;}' | sed -r 's/^version = "([0-9.]+) .*/\1/')
scripts/docker-build-linux.sh "$TOOLCHAIN"
env:
BUILD_ARCH: aarch64
RELAY_FEATURES:
- name: Bundle Debug File
run: |
cd target/aarch64-unknown-linux-gnu/release/
zip relay-Linux-aarch64-debug.zip relay.debug
mv relay relay-Linux-aarch64
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: target/aarch64-unknown-linux-gnu/release/relay-Linux-aarch64*
macos:
name: macOS
runs-on: macos-11
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust Toolchain
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Run Cargo Build
run: cargo build --manifest-path=relay/Cargo.toml --release
env:
CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO: packed
- name: Bundle dSYM
run: |
cd target/release
mv relay relay-Darwin-x86_64
zip -r relay-Darwin-x86_64-dsym.zip relay.dSYM
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: target/release/relay-Darwin-x86_64*
windows:
name: Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust Toolchain
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Run Cargo Build
run: cargo build --manifest-path=relay/Cargo.toml --release
- name: Bundle PDB
run: |
Install-Module 7Zip4PowerShell -Force -Verbose
cd target/release
7z a relay-Windows-x86_64-pdb.zip relay.pdb
mv relay.exe relay-Windows-x86_64.exe
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: target/release/relay-Windows-x86_64*