diff options
author | Alexander Fougner <fougner89@gmail.com> | 2023-07-21 11:41:54 +0200 |
---|---|---|
committer | Alexander Fougner <fougner89@gmail.com> | 2023-08-04 20:13:38 +0200 |
commit | caeeba5152cb0727b5a86222e615f6b777100a37 (patch) | |
tree | 963e2819f3d9ff15c0c12314b5e8035ed4add60a /.github | |
parent | a3087defd8e17ca2f33a3e87990a3e359429eb5f (diff) |
ci: set and verify MSRV
To prevent uncontrolled usage of new rust features, directly or from
dependencies, set a minimum supported Rust version and verify it builds.
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build-packages.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index e128a267..885464a9 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -61,3 +61,29 @@ jobs: with: name: bcachefs-tools-rpm path: rpmbuild + + msrv: + name: bcachefs-tools-msrv + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Disable initramfs update + run: sudo sed -i 's/yes/no/g' /etc/initramfs-tools/update-initramfs.conf + - name: Disable man-db update + run: sudo rm -f /var/lib/man-db/auto-update + - name: Install build-deps + run: | + sudo apt-get update && sudo apt-get -y install pkg-config libaio-dev libblkid-dev \ + libkeyutils-dev liblz4-dev libsodium-dev liburcu-dev libzstd-dev \ + uuid-dev zlib1g-dev valgrind libudev-dev python3-docutils libclang-dev + - name: Extract MSRV + run: | + MSRV=$(cargo metadata --format-version 1 --no-deps --manifest-path rust-src/Cargo.toml | + jq -r '.packages[] | select(.name == "bcachefs-rust") | .rust_version') + echo "MSRV=$MSRV" >> $GITHUB_ENV + - name: Install Rust ${{ env.MSRV }} toolchain + run: | + rustup install --profile minimal ${{ env.MSRV }} + - name: Make + run: | + CARGO_TOOLCHAIN_VERSION=${{ env.MSRV }} make -j`nproc` |