forked from libbpf/blazesym
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.26 KB
/
build-cli.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
name: Build blazecli
on:
workflow_call:
inputs:
upload-release:
description: 'The release to upload artifacts to, if any'
default: ''
required: false
type: string
workflow_dispatch:
jobs:
build:
name: Build blazecli
runs-on: ubuntu-latest
strategy:
matrix:
# Please update the test workflow cross-compile matrix when adding a new
# target here.
target: [
aarch64-linux-android,
arm-linux-androideabi,
armv7-linux-androideabi,
i686-unknown-linux-gnu,
x86_64-unknown-linux-musl,
]
steps:
- uses: actions/checkout@v4
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- run: |
cargo install --path=cli --root=. --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: blazecli-${{ matrix.target }}
path: bin/blazecli
- if: ${{ inputs.upload-release != '' }}
name: Upload release asset
env:
GH_TOKEN: ${{ github.token }}
run: |
mv bin/blazecli blazecli-${{ matrix.target }}
gh release upload ${{ inputs.upload-release }} blazecli-${{ matrix.target }}