Skip to content

Commit 4ec0c02

Browse files
authored
Fix our workflows that use Ubuntu-18.04 workers (rust-lang#2351)
These workflows were broken since GitHub has removed all ubuntu 18 workers. For the release workflow, we are now using a docker image.
1 parent 0f0e2b8 commit 4ec0c02

File tree

3 files changed

+56
-17
lines changed

3 files changed

+56
-17
lines changed

.github/workflows/cbmc-latest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
matrix:
22-
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
22+
os: [macos-11, ubuntu-20.04, ubuntu-22.04]
2323
steps:
2424
- name: Checkout Kani under "kani"
2525
uses: actions/checkout@v3

.github/workflows/release.yml

+54-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
Release:
1111
name: Release
12-
runs-on: ubuntu-18.04
12+
runs-on: ubuntu-20.04
1313
permissions:
1414
contents: write
1515
outputs:
@@ -49,28 +49,20 @@ jobs:
4949
Kani Rust verifier release bundle version ${{ env.TAG_VERSION }}.
5050
draft: true
5151

52-
Upload:
53-
name: Upload
52+
MacOs-Bundle:
53+
name: MacOs-Bundle
5454
needs: Release
55-
runs-on: ${{ matrix.os }}
55+
runs-on: macos-11
5656
permissions:
5757
contents: write
58-
strategy:
59-
matrix:
60-
os: [macos-11, ubuntu-18.04]
61-
include:
62-
- os: macos-11
63-
target: x86_64-apple-darwin
64-
- os: ubuntu-18.04
65-
target: x86_64-unknown-linux-gnu
6658
steps:
6759
- name: Checkout code
6860
uses: actions/checkout@v3
6961

7062
- name: Setup Kani Dependencies
7163
uses: ./.github/actions/setup
7264
with:
73-
os: ${{ matrix.os }}
65+
os: macos-11
7466

7567
- name: Build release bundle
7668
run: |
@@ -82,8 +74,55 @@ jobs:
8274
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8375
with:
8476
upload_url: ${{ needs.Release.outputs.upload_url }}
85-
asset_path: kani-${{ needs.Release.outputs.version }}-${{ matrix.target }}.tar.gz
86-
asset_name: kani-${{ needs.Release.outputs.version }}-${{ matrix.target }}.tar.gz
77+
asset_path: kani-${{ needs.Release.outputs.version }}-x86_64-apple-darwin.tar.gz
78+
asset_name: kani-${{ needs.Release.outputs.version }}-x86_64-apple-darwin.tar.gz
79+
asset_content_type: application/gzip
80+
81+
Linux-Bundle:
82+
name: Linux-Bundle
83+
needs: Release
84+
runs-on: ubuntu-20.04
85+
container:
86+
image: ubuntu:18.04
87+
permissions:
88+
contents: write
89+
steps:
90+
# This is required before checkout because the container does not
91+
# have Git installed, so cannot run checkout action. The checkout
92+
# action requires Git >=2.18, so use the Git maintainers' PPA.
93+
- name: Install system dependencies
94+
run: |
95+
apt-get update
96+
apt-get install -y software-properties-common apt-utils
97+
add-apt-repository ppa:git-core/ppa
98+
apt-get update
99+
apt-get install -y \
100+
build-essential bash-completion curl lsb-release sudo g++ gcc flex \
101+
bison make patch git
102+
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL \
103+
https://get.docker.com -o /tmp/install-docker.sh
104+
bash /tmp/install-docker.sh
105+
106+
- name: Checkout code
107+
uses: actions/checkout@v3
108+
109+
- name: Setup Kani Dependencies
110+
uses: ./.github/actions/setup
111+
with:
112+
os: ubuntu-18.04
113+
114+
- name: Build release bundle
115+
run: |
116+
PATH=/github/home/.cargo/bin:$PATH cargo bundle
117+
118+
- name: Upload artifact
119+
uses: actions/upload-release-asset@v1
120+
env:
121+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122+
with:
123+
upload_url: ${{ needs.Release.outputs.upload_url }}
124+
asset_path: kani-${{ needs.Release.outputs.version }}-x86_64-unknown-linux-gnu.tar.gz
125+
asset_name: kani-${{ needs.Release.outputs.version }}-x86_64-unknown-linux-gnu.tar.gz
87126
asset_content_type: application/gzip
88127

89128
Package-Docker:

.github/workflows/slow-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919
strategy:
2020
matrix:
21-
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
21+
os: [macos-11, ubuntu-20.04, ubuntu-22.04]
2222
steps:
2323
- name: Checkout Kani
2424
uses: actions/checkout@v3

0 commit comments

Comments
 (0)