-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (48 loc) · 1.25 KB
/
build.yaml
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
name: Build
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
release:
types: [published]
workflow_call:
jobs:
# ---------------------------------------------------------------------------
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch:
#- aarch64-apple-darwin
#- aarch64-unknown-linux-gnu
#- aarch64-unknown-linux-musl
#- x86_64-apple-darwin
#- x86_64-pc-windows-gnu
- x86_64-unknown-linux-gnu
#- x86_64-unknown-linux-musl
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.74.0
- name: build
run: |
cargo build --release --all-features --target ${{ matrix.arch }}
- name: compress with upx
uses: crazy-max/ghaction-upx@v3
with:
version: v4.1.0
files: |
target/${{ matrix.arch }}/release/rebar
args: --best --lzma
- name: upload binary
uses: actions/upload-artifact@v3
with:
name: rebar-${{ matrix.arch }}
path: target/${{ matrix.arch }}/release/rebar