-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.33 KB
/
canary-ubuntu.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
name: canary-ubuntu
on:
push:
branches:
- dev
pull_request:
branches:
- main
jobs:
build-ubuntu-arm:
runs-on: ubuntu-latest
env:
TARGET: x86_64-unknown-linux-musl
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
target: ${{ env.TARGET }}
- name: Build binary
run: |
sudo apt-get install pkg-config libssl-dev musl-gcc
cargo build --verbose --release --target ${{ env.TARGET }}
env:
RUST_BACKTRACE: full
- name: Strip binary (linux and macos)
run: |
for file in snm snx node npm pnpm yarn; do
strip "target/${{ env.TARGET }}/release/$file"
done
- name: Build archive
shell: bash
run: |
mkdir archive
cp LICENSE README.md target/${{ env.TARGET }}/release/{node,npm,pnpm,yarn,snm,snx} archive/
tar -czf ${{ env.TARGET }}.tar.gz -C archive LICENSE README.md node npm pnpm yarn snm snx
ls -l
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: ${{ env.TARGET }}.tar.gz
path: ${{ env.TARGET }}.tar.gz