From 29d5c2c33bd56d8468bbb372eddf0c87ecd6cc4d Mon Sep 17 00:00:00 2001 From: Thomas Spriggs Date: Wed, 25 Jan 2023 11:43:19 +0000 Subject: [PATCH 1/3] Add Ubuntu 22.04 release package Because 22.04 is the current LTS release of Ubuntu. --- .github/workflows/release-packages.yaml | 75 +++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index 2fd1e7b385e..ea1b73547d5 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -6,6 +6,81 @@ env: name: Upload additional release assets jobs: + ubuntu-22.04-package: + runs-on: ubuntu-22.04 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + 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 -O cvc5 https://github.com/cvc5/cvc5/releases/download/cvc5-${{env.cvc5-version}}/cvc5-Linux + chmod u+x cvc5 + mv cvc5 /usr/local/bin + cvc5 --version + - name: Prepare ccache + uses: actions/cache@v3 + with: + path: .ccache + key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG + restore-keys: + ${{ runner.os }}-22.04-Release-${{ github.ref }} + ${{ runner.os }}-22.04-Release + - name: ccache environment + run: | + echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV + echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV + - name: Configure CMake + run: | + mkdir build + cd build + cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release + - name: Zero ccache stats and limit in size + run: ccache -z --max-size=500M + - name: Build using Ninja + run: | + cd build + ninja -j2 + - name: Print ccache stats + run: ccache -s + - name: Run CTest + run: cd build; ctest . -V -L CORE -C Release -j2 + - 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-22.04-$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: team_open_source + SLACK_COLOR: ${{ job.status }} + SLACK_USERNAME: Github Actions CI bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 22.04 package built and uploaded successfully' || 'Ubuntu 22.04 package build failed' }}" + ubuntu-20_04-package: runs-on: ubuntu-20.04 env: From 00cbf05de397ceab4ea0f9cfc09592b4b965c3eb Mon Sep 17 00:00:00 2001 From: Thomas Spriggs Date: Wed, 25 Jan 2023 16:34:03 +0000 Subject: [PATCH 2/3] Update Ubuntu 22.04 cmake package job to match PR job In order to ensure better use of ccache. --- .github/workflows/release-packages.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index ea1b73547d5..813cc990270 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -39,10 +39,7 @@ jobs: echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release + run: cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ - name: Zero ccache stats and limit in size run: ccache -z --max-size=500M - name: Build using Ninja From cd3dd1ecdb9fde2dba147b92a56a060ca7ced903 Mon Sep 17 00:00:00 2001 From: Thomas Spriggs Date: Wed, 25 Jan 2023 16:39:41 +0000 Subject: [PATCH 3/3] Update package jobs to invoke ninja using `-C build` Because this saves vertical space in the `.yaml` file. --- .github/workflows/release-packages.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index 813cc990270..54a1121e220 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -43,9 +43,7 @@ jobs: - name: Zero ccache stats and limit in size run: ccache -z --max-size=500M - name: Build using Ninja - run: | - cd build - ninja -j2 + run: ninja -C build -j2 - name: Print ccache stats run: ccache -s - name: Run CTest @@ -118,9 +116,7 @@ jobs: - name: Zero ccache stats and limit in size run: ccache -z --max-size=500M - name: Build using Ninja - run: | - cd build - ninja -j2 + run: ninja -C build -j2 - name: Print ccache stats run: ccache -s - name: Run CTest @@ -206,9 +202,7 @@ jobs: - name: Zero ccache stats and limit in size run: ccache -z --max-size=500M - name: Build using Ninja - run: | - cd build - ninja -j2 + run: ninja -C build -j2 - name: Print ccache stats run: ccache -s - name: Run CTest