Skip to content

Commit e0b348e

Browse files
Merge pull request #7502 from thomasspriggs/tas/Ubuntu2204_package
Add Ubuntu 22.04 release package
2 parents cbef34e + cd3dd1e commit e0b348e

File tree

1 file changed

+72
-6
lines changed

1 file changed

+72
-6
lines changed

.github/workflows/release-packages.yaml

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,76 @@ env:
66

77
name: Upload additional release assets
88
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+
979
ubuntu-20_04-package:
1080
runs-on: ubuntu-20.04
1181
env:
@@ -46,9 +116,7 @@ jobs:
46116
- name: Zero ccache stats and limit in size
47117
run: ccache -z --max-size=500M
48118
- name: Build using Ninja
49-
run: |
50-
cd build
51-
ninja -j2
119+
run: ninja -C build -j2
52120
- name: Print ccache stats
53121
run: ccache -s
54122
- name: Run CTest
@@ -134,9 +202,7 @@ jobs:
134202
- name: Zero ccache stats and limit in size
135203
run: ccache -z --max-size=500M
136204
- name: Build using Ninja
137-
run: |
138-
cd build
139-
ninja -j2
205+
run: ninja -C build -j2
140206
- name: Print ccache stats
141207
run: ccache -s
142208
- name: Run CTest

0 commit comments

Comments
 (0)