Skip to content

Commit

Permalink
Add workflow to generate binary for aarch64-unknown-linux-gnu (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez authored Jun 29, 2022
1 parent d8f8da2 commit 49a78a6
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/arm_linux_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
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: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: ${{ inputs.target }}

- uses: Swatinem/rust-cache@v1

- uses: actions-rs/cargo@v1
with:
command: build
use-cross: true
args: --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 }}
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
jobs:
# Linux

aarch64-unknown-linux-gnu:
uses: ./.github/workflows/arm_linux_package.yml
with:
runs_on: ubuntu-18.04
target: aarch64-unknown-linux-gnu

x86_64-unknown-linux-gnu:
uses: ./.github/workflows/package.yml
with:
Expand Down Expand Up @@ -47,4 +53,4 @@ jobs:
with:
runs_on: windows-latest
target: x86_64-pc-windows-msvc
extension: .exe
extension: .exe

0 comments on commit 49a78a6

Please sign in to comment.