Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate binary for aarch64-unknown-linux-gnu #53

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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