From 0d973a0c06e37870159f451b54ccb7206946e3b0 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 20 Jan 2025 12:23:51 +0000 Subject: [PATCH] Add aarch64 (Arm 64-bit) CI job Run regression tests and build release package using GitHub's newly (publicly) available aarch64 runner. --- .github/workflows/pull-request-checks.yaml | 54 ++++++++++++++++ .github/workflows/release-packages.yaml | 71 ++++++++++++++++++++++ 2 files changed, 125 insertions(+) diff --git a/.github/workflows/pull-request-checks.yaml b/.github/workflows/pull-request-checks.yaml index 6cf41a2d5b1..ac4cd61889e 100644 --- a/.github/workflows/pull-request-checks.yaml +++ b/.github/workflows/pull-request-checks.yaml @@ -451,6 +451,60 @@ jobs: - name: Run tests run: cd build; ctest . -V -L CORE -j${{env.linux-vcpus}} + # This job takes approximately 17 to 41 minutes + check-ubuntu-24_04-arm-cmake-gcc: + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Fetch dependencies + env: + # This is needed in addition to -yq to prevent apt-get from asking for + # user input + DEBIAN_FRONTEND: noninteractive + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3 + - name: Confirm z3 solver is available and log the version installed + run: z3 --version + - name: Download cvc-5 from the releases page and make sure it can be deployed + run: | + wget https://github.com/cvc5/cvc5/releases/download/cvc5-${{env.cvc5-version}}/cvc5-Linux-arm64-static.zip + unzip -j -d /usr/local/bin cvc5-Linux-arm64-static.zip cvc5-Linux-arm64-static/bin/cvc5 + rm cvc5-Linux-arm64-static.zip + cvc5 --version + - name: Prepare ccache + uses: actions/cache@v4 + with: + save-always: true + path: .ccache + key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-PR + restore-keys: | + ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }} + ${{ runner.os }}-24.04-Arm-Release + - name: ccache environment + run: | + echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV + echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV + - name: Configure using CMake + run: cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -Dsat_impl="minisat2;cadical" + - name: Check that doc task works + run: ninja -C build doc + - name: Zero ccache stats and limit in size + run: ccache -z --max-size=500M + - name: Build with Ninja + run: ninja -C build -j${{env.linux-vcpus}} + - name: Print ccache stats + run: ccache -s + - name: Check if package building works + run: | + cd build + ninja package + ls *.deb + - name: Run tests + run: cd build; ctest . -V -L CORE -j${{env.linux-vcpus}} + # This job takes approximately 14 to 60 minutes check-ubuntu-22_04-cmake-gcc-32bit: runs-on: ubuntu-22.04 diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index 78fd4b4df75..e9687f766b1 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -77,6 +77,77 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 24.04 package built and uploaded successfully' || 'Ubuntu 24.04 package build failed' }}" + ubuntu-24_04-arm-package: + runs-on: ubuntu-24.04-arm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Fetch dependencies + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache z3 + - name: Confirm z3 solver is available and log the version installed + run: z3 --version + - name: Download cvc-5 from the releases page and make sure it can be deployed + run: | + wget https://github.com/cvc5/cvc5/releases/download/cvc5-${{env.cvc5-version}}/cvc5-Linux-arm64-static.zip + unzip -j -d /usr/local/bin cvc5-Linux-arm64-static.zip cvc5-Linux-arm64-static/bin/cvc5 + rm cvc5-Linux-arm64-static.zip + cvc5 --version + - name: Prepare ccache + uses: actions/cache@v4 + with: + save-always: true + path: .ccache + key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG + restore-keys: + ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }} + ${{ runner.os }}-24.04-Arm-Release + - name: ccache environment + run: | + echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV + echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV + - name: Configure CMake + run: cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -Dsat_impl="minisat2;cadical" + - name: Zero ccache stats and limit in size + run: ccache -z --max-size=500M + - name: Build using Ninja + run: ninja -C build -j4 + - name: Print ccache stats + run: ccache -s + - name: Run CTest + run: cd build; ctest . -V -L CORE -C Release -j4 + - name: Create packages + id: create_packages + run: | + cd build + ninja package + deb_package_name="$(ls *.deb)" + echo "deb_package=./build/$deb_package_name" >> $GITHUB_OUTPUT + echo "deb_package_name=ubuntu-24.04-arm64-$deb_package_name" >> $GITHUB_OUTPUT + - name: Get release info + id: get_release_info + uses: bruceadams/get-release@v1.3.2 + - name: Upload binary packages + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.get_release_info.outputs.upload_url }} + asset_path: ${{ steps.create_packages.outputs.deb_package }} + asset_name: ${{ steps.create_packages.outputs.deb_package_name }} + asset_content_type: application/x-deb + - name: Slack notification of CI status + uses: rtCamp/action-slack-notify@v2 + if: success() || failure() + env: + SLACK_CHANNEL: aws-cbmc + SLACK_COLOR: ${{ job.status }} + SLACK_USERNAME: Github Actions CI bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 24.04 Arm package built and uploaded successfully' || 'Ubuntu 24.04 Arm package build failed' }}" + ubuntu-22_04-package: runs-on: ubuntu-22.04 env: