Skip to content

Commit d1fb824

Browse files
authored
Add support to ubuntu-22.04 (rust-lang#2105)
- Create a ubuntu-22.04 scripts symlink folder. - Change the cbcm installation to pick which CBMC distro to use depending on the ubuntu major version. So Ubuntu-22.04 will install the version for 20.04. - Add ubuntu-22.04 to our CI.
1 parent 967e41d commit d1fb824

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

.github/workflows/cbmc-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [macos-11, ubuntu-18.04, ubuntu-20.04]
16+
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
1717
steps:
1818
- name: Checkout Kani
1919
uses: actions/checkout@v3

.github/workflows/kani.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
os: [macos-11, ubuntu-18.04, ubuntu-20.04]
20+
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
2121
steps:
2222
- name: Checkout Kani
2323
uses: actions/checkout@v3

.github/workflows/slow-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [macos-11, ubuntu-18.04, ubuntu-20.04]
16+
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
1717
steps:
1818
- name: Checkout Kani
1919
uses: actions/checkout@v3

docs/src/build-from-source.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Kani has been tested in [Ubuntu](#install-dependencies-on-ubuntu) and [macOS](##
1818

1919
### Install dependencies on Ubuntu
2020

21-
Support is available for Ubuntu 18.04 and 20.04.
21+
Support is available for Ubuntu 18.04, 20.04 and 22.04.
2222
The simplest way to install dependencies (especially if you're using a fresh VM)
2323
is following our CI scripts:
2424

scripts/setup/ubuntu-22.04

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ubuntu

scripts/setup/ubuntu/install_cbmc.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ if [ -z "${CBMC_VERSION:-}" ]; then
1313
fi
1414

1515
UBUNTU_VERSION=$(lsb_release -rs)
16-
FILE="ubuntu-${UBUNTU_VERSION}-cbmc-${CBMC_VERSION}-Linux.deb"
16+
MAJOR=${UBUNTU_VERSION%.*}
17+
18+
# CBMC currently only release a 18.04 and a 20.04 versions.
19+
if [[ "${MAJOR}" -le "18" ]]
20+
then
21+
MIRROR_VERSION="18.04"
22+
else
23+
MIRROR_VERSION="20.04"
24+
fi
25+
26+
FILE="ubuntu-${MIRROR_VERSION}-cbmc-${CBMC_VERSION}-Linux.deb"
1727
URL="https://github.com/diffblue/cbmc/releases/download/cbmc-${CBMC_VERSION}/$FILE"
1828

1929
set -x

0 commit comments

Comments
 (0)