Skip to content

Commit

Permalink
Add generic linux aarch64 package to extra-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lepapareil committed Apr 25, 2024
1 parent ff7ff95 commit 214e7b8
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/extra-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
description: 'Push to winget'
type: boolean
default: false
package-generic-linux-aarch64:
description: 'Create generic linux aarch64 package'
type: boolean
default: false

concurrency: extra-package

Expand Down Expand Up @@ -76,3 +80,53 @@ jobs:
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile .\wingetcreate.exe
.\wingetcreate.exe version
.\bin\release\push_package_to_winget.ps1 "$env:RELEASE_VERSION" "$env:WINGET_TOKEN"
package-generic-linux-aarch64:
if: github.event.inputs.package-generic-linux-aarch64 == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: ${{ inputs.branch }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build, Test units and Integration tests
uses: addnab/docker-run-action@v3
with:
image: ubuntu:22.04
options: --platform linux/arm64/v8 --volume ${{ github.workspace }}:/work --workdir /work --privileged --env CARGO_TERM_COLOR=always
run: |
set -e
echo "::group::Install Prerequisites"
bin/install_prerequisites_docker_ubuntu.sh
sudo apt-get install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross
./bin/export_cross_compile_env.sh
echo "::endgroup::"
echo "::group::Install Rust"
bin/install_rust.sh
. "$HOME/.cargo/env"
echo "::endgroup::"
echo "::group::Environment"
bin/environment.sh
echo "::endgroup::"
echo "::group::Build"
./bin/release/release.sh
cp -frp target/$CARGO_BUILD_TARGET/release/hurl ./target/release/
cp -frp target/$CARGO_BUILD_TARGET/release/hurlfmt ./target/release/
echo "::endgroup::"
echo "::group::Get version"
export VERSION=$(bin/release/get_version.sh)
echo "::endgroup::"
echo "::group::Create man"
bin/release/man.sh
echo "::endgroup::"
echo "::group::Create tarball"
bin/release/create_tarball.sh
bin/release/sha256sum.sh --write target/upload/hurl-$VERSION-aarch64-unknown-linux-gnu.tar.gz
echo "::endgroup::"
- name: Archive production artifacts
uses: actions/[email protected]
with:
name: release-generic-linux-aarch64-artifacts
path: target/upload/*
7 changes: 6 additions & 1 deletion bin/export_cross_compile_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
set -Eeuo pipefail

PKG_CONFIG_ALLOW_CROSS=1
CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
export PKG_CONFIG_ALLOW_CROSS CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER CC_aarch64_unknown_linux_gnu CXX_aarch64_unknown_linux_gnu
export PKG_CONFIG_ALLOW_CROSS \
CARGO_BUILD_TARGET \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER \
CC_aarch64_unknown_linux_gnu \
CXX_aarch64_unknown_linux_gnu

0 comments on commit 214e7b8

Please sign in to comment.