-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (79 loc) · 2.49 KB
/
develop-blobtk.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
name: develop-blobtk
on:
push:
branches:
# - main
- feature/*
tags:
- "*"
env:
VERSION: 0.5.8
jobs:
macos-binary:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin
- name: Build
working-directory: ./rust
run: |
cargo build --target=x86_64-apple-darwin --release
- name: Rename binary
run: |
mv ./rust/target/x86_64-apple-darwin/release/blobtk ./rust/target/x86_64-apple-darwin/release/blobtk-macos-x64
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: binaries
path: rust/target/x86_64-apple-darwin/release/blobtk-macos-*
macos-binary-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Build
working-directory: ./rust
run: |
cargo build --target=aarch64-apple-darwin --release
- name: Rename binary
run: |
mv ./rust/target/aarch64-apple-darwin/release/blobtk ./rust/target/aarch64-apple-darwin/release/blobtk-macos-arm64
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: binaries
path: rust/target/aarch64-apple-darwin/release/blobtk-macos-*
linux-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install static libraries for C
run: sudo apt-get install -y libc6-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu
- name: Build
working-directory: ./rust
run: RUSTFLAGS="-C target-feature=+crt-static -C relocation-model=static" cargo build --target x86_64-unknown-linux-gnu --release
- name: Rename binary
run: |
mv ./rust/target/x86_64-unknown-linux-gnu/release/blobtk ./rust/target/release/blobtk-linux
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: binaries
path: ./rust/target/release/blobtk-*