diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index bcfb24520d..11ca26cb17 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -28,6 +28,9 @@ jobs: container: fossa/haskell-static-alpine:ghc-9.8.2 project-file: cabal.project.ci.linux ghc: '9.8.2' + # Linux builds are run in Alpine, which builds them statically; + # using jemalloc reduces the performance impact of this + # over the default libc allocator (which performs very poorly in static builds). # Non-Linux environments generally don't need `jemalloc` # and in particular Windows doesn't support it rust-features: jemalloc @@ -93,9 +96,6 @@ jobs: cabal --version || echo "no cabal" ghcup --version || echo "no ghcup" - # Linux builds are run in Alpine, which builds them statically; - # using jemalloc reduces the performance impact of this - # over the default libc allocator (which performs very poorly in static builds). - name: Build Rust dependencies if: ${{ matrix.os != 'LinuxARM' }} env: @@ -172,7 +172,7 @@ jobs: if: ${{ matrix.os == 'LinuxARM' }} uses: docker://fossa/haskell-static-alpine:ghc-9.8.2 with: - args: ./.github/workflows/scripts/build-arm.sh ${{ runner.os }} ${{ matrix.project-file }} + args: ./.github/workflows/scripts/build-arm.sh ${{ runner.os }} ${{ matrix.project-file }} ${{ matrix.rust-features }} - name: Build and Unit Test if: ${{ matrix.os != 'LinuxARM' }} diff --git a/.github/workflows/scripts/build-arm.sh b/.github/workflows/scripts/build-arm.sh index d6aafe65d6..acc4e426cf 100755 --- a/.github/workflows/scripts/build-arm.sh +++ b/.github/workflows/scripts/build-arm.sh @@ -4,22 +4,23 @@ set -e set -x if [ $# -lt 2 ] ; then - echo "Usage: ./build-arm.sh " + echo "Usage: ./build-arm.sh [FEATURES]" exit 1 fi RUNNER_OS=$1 PROJECT_FILE=$2 +FEATURES=$3 # Install rust tooling curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal -. "/home/runner/.cargo/env" +. "$HOME/.cargo/env" rustc -V cargo -V # Build Rust binaries -cargo build --features jemalloc --release +cargo build ${FEATURES:+--features $FEATURES} jemalloc --release cargo test --release