Skip to content

Commit

Permalink
[CI] Build arm64 Ubuntu binaries on docker as opposed to the bare met…
Browse files Browse the repository at this point in the history
…al runner (2) (#129)

* Build arm64 Ubuntu binaries on docker as opposed to bare metal to let Docker handle
cleanup and not mess up anything on the runner itself

* Fix VERSION file lookup

* Set default shell on Ubuntu arm64 job

* Remove sudo call in install prerequisites
as we're already running as root
in the container

* CI Fixes

* CI Fixes

* CI Fixes

* CI Fixes

* MT Ubuntu build

* Switch back to building from master
  • Loading branch information
haorldbchi authored Oct 21, 2021
1 parent 181242d commit 9abf442
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ jobs:
if-no-files-found: error

build-ubuntu-arm64:
runs-on: [ ARM64 ]
runs-on: [ARM64]
container:
image: ubuntu:20.04
defaults:
run:
shell: bash
steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand All @@ -103,20 +108,23 @@ jobs:
- name: Get Version Number
id: version_number
run: |
version=$(cat ${{ github.workspace }}/VERSION)
version=$(cat VERSION)
echo "::set-output name=BB_VERSION::$version"
echo "::set-output name=BB_ARTIFACT_NAME::bladebit-v${version}-ubuntu-arm64.tar.gz"
- name: Install Prerequisites
run: sudo apt install -y libgmp-dev libnuma-dev
run: |
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y build-essential git cmake libgmp-dev libnuma-dev
- name: Build
env:
BB_ARTIFACT_NAME: ${{ steps.version_number.outputs.BB_ARTIFACT_NAME }}
run: |
mkdir build && cd build
cmake ..
cmake --build . --target bladebit --config Release
cmake --build . --target bladebit --config Release -j $(nproc --all)
chmod +x ./bladebit
tar -czvf $BB_ARTIFACT_NAME bladebit
mkdir ../bin
Expand All @@ -130,10 +138,6 @@ jobs:
path: ${{ github.workspace }}/bin/${{ steps.version_number.outputs.BB_ARTIFACT_NAME }}
if-no-files-found: error

- name: Clean Up
run: |
rm -rf ${{ github.workspace }}/*
build-centos-arm64:
runs-on: [ARM64]
container:
Expand Down

0 comments on commit 9abf442

Please sign in to comment.