From 0f8c7d9b5b0eeeee5f109e47bd2d3fad76b1d9bc Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Fri, 8 Dec 2023 09:23:54 +0100 Subject: [PATCH] ci: test build job on multiple Ubuntu containers --- .github/workflows/ci.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c2dbb0..a104896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,24 +10,34 @@ on: jobs: check: - runs-on: ubuntu-22.04 strategy: matrix: + image_ref: ['20.04', '22.04', '23.04', '23.10'] subcommand: ['fmt', 'build', 'clippy', 'test'] include: - - subcommand: 'clippy' - # treat warnings as errors - args: '-- -D warnings' - - subcommand: 'fmt' - args: '--check' + - subcommand: 'clippy' + # treat warnings as errors + args: '-- -D warnings' + - subcommand: 'fmt' + args: '--check' + - subcommand: 'build' + + runs-on: ubuntu-latest + container: + image: ubuntu:${{ matrix.image_ref }} steps: - uses: actions/checkout@v4 + - run: apt-get update && apt-get install -y curl build-essential clang + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable + with: + components: 'clippy,rustfmt' + - name: Install crate dependencies - run: sudo apt-get install -y libxen-dev + run: apt-get install -y libxen-dev - run: cargo ${{ matrix.subcommand }} ${{ matrix.args }}