|
6 | 6 |
|
7 | 7 | name: Upload additional release assets
|
8 | 8 | jobs:
|
| 9 | + ubuntu-22.04-package: |
| 10 | + runs-on: ubuntu-22.04 |
| 11 | + env: |
| 12 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v3 |
| 15 | + with: |
| 16 | + submodules: recursive |
| 17 | + - name: Fetch dependencies |
| 18 | + run: | |
| 19 | + sudo apt-get update |
| 20 | + sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache z3 |
| 21 | + - name: Confirm z3 solver is available and log the version installed |
| 22 | + run: z3 --version |
| 23 | + - name: Download cvc-5 from the releases page and make sure it can be deployed |
| 24 | + run: | |
| 25 | + wget -O cvc5 https://github.com/cvc5/cvc5/releases/download/cvc5-${{env.cvc5-version}}/cvc5-Linux |
| 26 | + chmod u+x cvc5 |
| 27 | + mv cvc5 /usr/local/bin |
| 28 | + cvc5 --version |
| 29 | + - name: Prepare ccache |
| 30 | + uses: actions/cache@v3 |
| 31 | + with: |
| 32 | + path: .ccache |
| 33 | + key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG |
| 34 | + restore-keys: |
| 35 | + ${{ runner.os }}-22.04-Release-${{ github.ref }} |
| 36 | + ${{ runner.os }}-22.04-Release |
| 37 | + - name: ccache environment |
| 38 | + run: | |
| 39 | + echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV |
| 40 | + echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV |
| 41 | + - name: Configure CMake |
| 42 | + run: cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ |
| 43 | + - name: Zero ccache stats and limit in size |
| 44 | + run: ccache -z --max-size=500M |
| 45 | + - name: Build using Ninja |
| 46 | + run: ninja -C build -j2 |
| 47 | + - name: Print ccache stats |
| 48 | + run: ccache -s |
| 49 | + - name: Run CTest |
| 50 | + run: cd build; ctest . -V -L CORE -C Release -j2 |
| 51 | + - name: Create packages |
| 52 | + id: create_packages |
| 53 | + run: | |
| 54 | + cd build |
| 55 | + ninja package |
| 56 | + deb_package_name="$(ls *.deb)" |
| 57 | + echo "deb_package=./build/$deb_package_name" >> $GITHUB_OUTPUT |
| 58 | + echo "deb_package_name=ubuntu-22.04-$deb_package_name" >> $GITHUB_OUTPUT |
| 59 | + - name: Get release info |
| 60 | + id: get_release_info |
| 61 | + uses: bruceadams/[email protected] |
| 62 | + - name: Upload binary packages |
| 63 | + uses: actions/upload-release-asset@v1 |
| 64 | + with: |
| 65 | + upload_url: ${{ steps.get_release_info.outputs.upload_url }} |
| 66 | + asset_path: ${{ steps.create_packages.outputs.deb_package }} |
| 67 | + asset_name: ${{ steps.create_packages.outputs.deb_package_name }} |
| 68 | + asset_content_type: application/x-deb |
| 69 | + - name: Slack notification of CI status |
| 70 | + uses: rtCamp/action-slack-notify@v2 |
| 71 | + if: success() || failure() |
| 72 | + env: |
| 73 | + SLACK_CHANNEL: team_open_source |
| 74 | + SLACK_COLOR: ${{ job.status }} |
| 75 | + SLACK_USERNAME: Github Actions CI bot |
| 76 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
| 77 | + SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 22.04 package built and uploaded successfully' || 'Ubuntu 22.04 package build failed' }}" |
| 78 | + |
9 | 79 | ubuntu-20_04-package:
|
10 | 80 | runs-on: ubuntu-20.04
|
11 | 81 | env:
|
|
46 | 116 | - name: Zero ccache stats and limit in size
|
47 | 117 | run: ccache -z --max-size=500M
|
48 | 118 | - name: Build using Ninja
|
49 |
| - run: | |
50 |
| - cd build |
51 |
| - ninja -j2 |
| 119 | + run: ninja -C build -j2 |
52 | 120 | - name: Print ccache stats
|
53 | 121 | run: ccache -s
|
54 | 122 | - name: Run CTest
|
@@ -134,9 +202,7 @@ jobs:
|
134 | 202 | - name: Zero ccache stats and limit in size
|
135 | 203 | run: ccache -z --max-size=500M
|
136 | 204 | - name: Build using Ninja
|
137 |
| - run: | |
138 |
| - cd build |
139 |
| - ninja -j2 |
| 205 | + run: ninja -C build -j2 |
140 | 206 | - name: Print ccache stats
|
141 | 207 | run: ccache -s
|
142 | 208 | - name: Run CTest
|
|
0 commit comments