-
Notifications
You must be signed in to change notification settings - Fork 1
167 lines (144 loc) · 4.66 KB
/
build.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Build binaries
on:
push:
branches:
- unstable
- stable
tags:
- '*'
pull_request:
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install cross compilers
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf -y
- name: Set up Rust for x86_64
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rust-src
- name: Build for x86_64
run: |
cargo build --release --target=x86_64-unknown-linux-gnu
strip target/x86_64-unknown-linux-gnu/release/aochatproxy
cp target/x86_64-unknown-linux-gnu/release/aochatproxy aochatproxy-linux-x86_64
- name: Set up Rust for aarch64
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: aarch64-unknown-linux-gnu
override: true
components: rust-src
- name: Build for aarch64
run: |
cargo build --release --target=aarch64-unknown-linux-gnu
aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/aochatproxy
cp target/aarch64-unknown-linux-gnu/release/aochatproxy aochatproxy-linux-aarch64
- name: Set up Rust for armv7
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: armv7-unknown-linux-gnueabihf
override: true
components: rust-src
- name: Build for armv7
run: |
cargo build --release --target=armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip target/armv7-unknown-linux-gnueabihf/release/aochatproxy
cp target/armv7-unknown-linux-gnueabihf/release/aochatproxy aochatproxy-linux-armv7
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: aochatproxy-linux
path: |
aochatproxy-linux-x86_64
aochatproxy-linux-aarch64
aochatproxy-linux-armv7
freebsd:
name: FreeBSD
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install toolchain
run: |
sudo apt install llvm clang -y
mkdir freebsd_sysroot
curl -s https://download.freebsd.org/ftp/releases/amd64/13.1-RELEASE/base.txz \
| tar -xJf - -C freebsd_sysroot ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc
- name: Set up Rust for FreeBSD x86_64
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: x86_64-unknown-freebsd
override: true
components: rust-src
- name: Build for FreeBSD x86_64
run: |
cargo build --release --target=x86_64-unknown-freebsd
strip target/x86_64-unknown-freebsd/release/aochatproxy
cp target/x86_64-unknown-freebsd/release/aochatproxy aochatproxy-freebsd-x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: aochatproxy-freebsd
path: |
aochatproxy-freebsd-x86_64
macos:
name: MacOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rust-src
- name: Build
run: |
cargo build --release --target=x86_64-apple-darwin
strip target/x86_64-apple-darwin/release/aochatproxy
cp target/x86_64-apple-darwin/release/aochatproxy aochatproxy-macos
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: aochatproxy-macos
path: |
aochatproxy-macos
windows:
name: Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rust-src
- name: Build
run: |
cargo build --release --target=x86_64-pc-windows-msvc
cp target/x86_64-pc-windows-msvc/release/aochatproxy.exe aochatproxy-windows.exe
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: aochatproxy-windows
path: |
aochatproxy-windows.exe