-
Notifications
You must be signed in to change notification settings - Fork 43
59 lines (48 loc) · 1.61 KB
/
arm_linux_package.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
name: Package
on:
workflow_call:
inputs:
runs_on:
required: true
type: string
target:
required: true
type: string
extension:
default: ""
type: string
jobs:
build:
name: Build static binaries
runs-on: ${{ inputs.runs_on }}
steps:
- uses: briansmith/actions-checkout@v2
with:
persist-credentials: false
- name: Install dependencies
run: |
wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-14 main'
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install qemu-user gcc-aarch64-linux-gnu libc6-dev-arm64-cross clang-14 llvm-14
- name: Set environment
run: |
export TARGET_CC=clang-14
export TARGET_AR=llvm-ar-14
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
target: ${{ inputs.target }}
- uses: Swatinem/rust-cache@v1
- run: cargo install cross
- run: cross build --release --all --target ${{ inputs.target }}
- uses: papeloto/action-zip@v1
with:
files: target/${{ inputs.target }}/release/ldproxy${{ inputs.extension }}
recursive: true
dest: ldproxy-${{ inputs.target }}.zip
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ldproxy-${{ inputs.target }}.zip
tag: ${{ github.ref }}