From fe5193a60f18488852b066e4ffd527c5180ff8da Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Thu, 9 Jan 2025 23:17:19 +0100 Subject: [PATCH] Check semver compatibility in CI This aims at automatically raising issues with semver compatibility. This is a quick and somewhat dirty shot to get the check in place at all. There is surely room for improvement. --- .github/workflows/ci.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b251381..7171d13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -105,6 +105,43 @@ jobs: target: x86_64-unknown-netbsd toolchain: "1.59.0" + # -------------------------------------------------------------------------- + # Semantic Versioning + # + # Check at least once per platform as we heavily depend on platform-specific + # code. The feature groups are used for attempting to cover different + # backends for a platform (like Linux with and without libudev). + + semver-aarch64-apple-darwin: + runs-on: ubuntu-latest + strategy: + matrix: + target: + - aarch64-apple-darwin + - arm-linux-androideabi + - x86_64-pc-windows-msvc + - x86_64-unknown-freebsd + - x86_64-unknown-linux-gnu + - x86_64-unknown-netbsd + feature-group: + - "only-explicit-features" + - "all-features" + steps: + - run: | + # TODO: Harmonize with build.yaml + sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list + sudo apt-get -qq update + sudo apt-get -qq -y install build-essential curl git pkg-config libudev-dev + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@stable + with: + target: ${{ matrix.target }} + - uses: Swatinem/rust-cache@v2 + - uses: obi1kenobi/cargo-semver-checks-action@v2 + with: + rust-target: ${{ matrix.target }} + feature-group: ${{ matrix.feature-group }} + # -------------------------------------------------------------------------- # cargo-deny