-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (38 loc) · 1.59 KB
/
build_linux_static_libs.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
name: Build static libs for Linux
on: [ 'workflow_dispatch']
jobs:
build_libs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install x86_64 (amd64) Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: x86_64-unknown-linux-gnu
- name: Build static lib for x86_64 target
run: cargo build --target=x86_64-unknown-linux-gnu --release
- name: Install aarch64 (arm64) Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: aarch64-unknown-linux-gnu
- name: Build static lib for aarch64 target
run: cargo build --target=aarch64-unknown-linux-gnu --release
- name: Rename static libraries
run: |
cp target/aarch64-unknown-linux-gnu/release/libsummarizer.a libsummarizer-aarch64-unknown-linux-gnu.a
cp target/x86_64-unknown-linux-gnu/release/libsummarizer.a libsummarizer-x86_64-unknown-linux-gnu.a
- name: Upload x86_64 static library as artifact of the build
uses: actions/upload-artifact@v3
with:
name: libsummarizer-x86_64-unknown-linux-gnu
path: libsummarizer-x86_64-unknown-linux-gnu.a
- name: Upload aarch64 static library as artifact of the build
uses: actions/upload-artifact@v3
with:
name: libsummarizer-aarch64-unknown-linux-gnu
path: libsummarizer-aarch64-unknown-linux-gnu.a