Skip to content

Commit 0f8c7d9

Browse files
committed
ci: test build job on multiple Ubuntu containers
1 parent 1d38adb commit 0f8c7d9

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,34 @@ on:
1010

1111
jobs:
1212
check:
13-
runs-on: ubuntu-22.04
1413
strategy:
1514
matrix:
15+
image_ref: ['20.04', '22.04', '23.04', '23.10']
1616
subcommand: ['fmt', 'build', 'clippy', 'test']
1717
include:
18-
- subcommand: 'clippy'
19-
# treat warnings as errors
20-
args: '-- -D warnings'
21-
- subcommand: 'fmt'
22-
args: '--check'
18+
- subcommand: 'clippy'
19+
# treat warnings as errors
20+
args: '-- -D warnings'
21+
- subcommand: 'fmt'
22+
args: '--check'
23+
- subcommand: 'build'
24+
25+
runs-on: ubuntu-latest
26+
container:
27+
image: ubuntu:${{ matrix.image_ref }}
2328
steps:
2429
- uses: actions/checkout@v4
2530

31+
- run: apt-get update && apt-get install -y curl build-essential clang
32+
2633
- name: Install Rust toolchain
2734
uses: dtolnay/rust-toolchain@stable
35+
with:
36+
components: 'clippy,rustfmt'
37+
2838

2939
- name: Install crate dependencies
30-
run: sudo apt-get install -y libxen-dev
40+
run: apt-get install -y libxen-dev
3141

3242
- run: cargo ${{ matrix.subcommand }} ${{ matrix.args }}
3343

0 commit comments

Comments
 (0)