chore(workflows): make builds faster by only installing necessary tools (#265)

This commit is contained in:
Alex Zenla
2024-07-18 19:26:26 -07:00
committed by GitHub
parent 3bada811b2
commit 9bd8d1bb1d
3 changed files with 27 additions and 7 deletions

View File

@ -16,6 +16,7 @@ jobs:
- aarch64 - aarch64
env: env:
TARGET_ARCH: "${{ matrix.arch }}" TARGET_ARCH: "${{ matrix.arch }}"
CI_NEEDS_FPM: "1"
name: nightly full build ${{ matrix.arch }} name: nightly full build ${{ matrix.arch }}
steps: steps:
- name: harden runner - name: harden runner

View File

@ -21,6 +21,7 @@ jobs:
- aarch64 - aarch64
env: env:
TARGET_ARCH: "${{ matrix.arch }}" TARGET_ARCH: "${{ matrix.arch }}"
CI_NEEDS_FPM: "1"
name: release-assets services ${{ matrix.arch }} name: release-assets services ${{ matrix.arch }}
permissions: permissions:
contents: write contents: write

View File

@ -1,10 +1,28 @@
#!/bin/sh #!/bin/bash
set -e set -e
sudo apt-get update CROSS_RS_REV="7b79041c9278769eca57fae10c74741f5aa5c14b"
sudo apt-get install -y \ FPM_VERSION="1.15.1"
build-essential libssl-dev libelf-dev musl-dev \
flex bison bc protobuf-compiler musl-tools qemu-utils gcc-aarch64-linux-gnu
sudo gem install --no-document fpm PACKAGES=(build-essential musl-dev protobuf-compiler musl-tools)
cargo install cross --git https://github.com/cross-rs/cross
sudo apt-get update
if [ "${TARGET_ARCH}" = "aarch64" ]
then
PACKAGES+=(gcc-aarch64-linux-gnu)
fi
sudo apt-get install -y "${PACKAGES[@]}"
CROSS_COMPILE="$(./hack/build/cross-compile.sh)"
if [ "${CROSS_COMPILE}" = "1" ]
then
cargo install cross --git "https://github.com/cross-rs/cross.git" --rev "${CROSS_RS_REV}"
fi
if [ "${CI_NEEDS_FPM}" = "1" ]
then
sudo gem install --no-document fpm -v "${FPM_VERSION}"
fi