From 8a4ca896f1f568452f7cfad41161e593f5aab33c Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 4 Mar 2024 13:27:07 -0500 Subject: [PATCH 1/3] Additions to .gitignore Signed-off-by: mulhern --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7459b2c..16ac795 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ disk.img *.rustfmt .vagrant *.log +*.swp +*.swo From f2a3cfde56f800d3c446000f14aae6a3894a943a Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 4 Mar 2024 12:58:16 -0500 Subject: [PATCH 2/3] Update test infrastructure Signed-off-by: mulhern --- .github/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++++++++--- Makefile | 32 ++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74594d3..fd6d68b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ -on: [push, pull_request] +--- +name: loopdev-3 ci -name: loopdev +# yamllint disable-line rule:truthy +on: + push: + pull_request: jobs: check: @@ -16,7 +20,7 @@ jobs: - x86_64-unknown-linux-musl steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -26,6 +30,7 @@ jobs: target: ${{ matrix.target }} override: true - name: Cross + # yamllint disable rule:line-length run: cargo install --git https://github.com/cross-rs/cross.git --rev bb3df1b cross - name: Run cargo check @@ -40,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -61,3 +66,43 @@ jobs: - name: Run cargo clippy run: make -f Makefile clippy + + dependencies: + runs-on: ubuntu-latest + container: + image: fedora:39 # CURRENT DEVELOPMENT ENVIRONMENT + steps: + - uses: actions/checkout@v4 + - name: Install dependencies for Fedora + run: > + dnf install -y + curl + git + make + openssl-devel + python-requests + python-semantic_version + - uses: dtolnay/rust-toolchain@master + with: + components: cargo + toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + - name: Check out ci repo + run: git clone https://github.com/stratis-storage/ci.git + - name: Run comparisons of version specs with available Fedora packages + # yamllint disable rule:line-length + run: | + COMPARE_FEDORA_VERSIONS=./compare_fedora_versions MANIFEST_PATH=../../Cargo.toml FEDORA_RELEASE=rawhide IGNORE_ARGS="--ignore-category low" make -f ../../Makefile check-fedora-versions + COMPARE_FEDORA_VERSIONS=./compare_fedora_versions MANIFEST_PATH=../../Cargo.toml FEDORA_RELEASE=f39 IGNORE_ARGS="--ignore-category low" make -f ../../Makefile check-fedora-versions + COMPARE_FEDORA_VERSIONS=./compare_fedora_versions MANIFEST_PATH=../../Cargo.toml FEDORA_RELEASE=f38 IGNORE_ARGS="--ignore-category low" make -f ../../Makefile check-fedora-versions + working-directory: ./ci/dependency_management + + yamllint: + runs-on: ubuntu-20.04 + container: + image: fedora:39 # CURRENT DEVELOPMENT ENVIRONMENT + steps: + - uses: actions/checkout@v4 + - name: Install dependencies for Fedora + run: dnf install -y make yamllint + - name: Run yamllint + run: make -f Makefile yamllint diff --git a/Makefile b/Makefile index a902b16..c321bb3 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,13 @@ +ifeq ($(origin FEDORA_RELEASE), undefined) +else + FEDORA_RELEASE_ARGS = --release=${FEDORA_RELEASE} +endif + +ifeq ($(origin MANIFEST_PATH), undefined) +else + MANIFEST_PATH_ARGS = --manifest-path=${MANIFEST_PATH} +endif + ifeq ($(origin CLIPPY_FIX), undefined) CLIPPY_OPTS = --all-targets --no-deps else @@ -10,3 +20,25 @@ CLIPPY_DENY = -D clippy::all -D clippy::cargo -A clippy::multiple-crate-versions clippy: RUSTFLAGS="${DENY}" cargo clippy ${CLIPPY_OPTS} -- ${CLIPPY_DENY} + +COMPARE_FEDORA_VERSIONS ?= +test-compare-fedora-versions: + echo "Testing that COMPARE_FEDORA_VERSIONS environment variable is set to a valid path" + test -e "${COMPARE_FEDORA_VERSIONS}" + +check-fedora-versions: test-compare-fedora-versions + ${COMPARE_FEDORA_VERSIONS} ${MANIFEST_PATH_ARGS} ${FEDORA_RELEASE_ARGS} ${IGNORE_ARGS} + +yamllint: + yamllint --strict .github/workflows/*.yml + +audit: + cargo audit -D warnings + + +.PHONY: + audit + check-fedora-versions + clippy + test-compare-fedora-versions + yamllint From 29e0eaae74381a5651ad5b63c27a4daac8958a35 Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 4 Mar 2024 12:40:28 -0500 Subject: [PATCH 3/3] version 0.5.1 Signed-off-by: mulhern --- CHANGES.txt | 10 ++++++++++ Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 CHANGES.txt diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 0000000..399eefe --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,10 @@ +loopdev-3 0.5.1 +=============== +Recommended Rust toolchain version: 1.76.0 +Recommended development platform for Python development: Fedora 38 + +- Increase bindgen dependency lower bound to 0.69.0: + https://github.com/stratis-storage/loopdev-3/pull/9 + +- Tidies and Maintenance: + https://github.com/stratis-storage/loopdev-3/pull/8 diff --git a/Cargo.toml b/Cargo.toml index c5c04a5..67a3f6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "loopdev-3" description = "Setup and control loop devices" -version = "0.5.0" +version = "0.5.1" authors = ["Stratis Developers ", "Michael Daffin "] license = "MIT" documentation = "https://docs.rs/loopdev-3"