Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
with:
path: devicemapper-rs
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: cargo
rust-src-dir: devicemapper-rs
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -38,10 +42,6 @@ jobs:
openssl-devel
python-requests
python-semantic_version
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- name: Check out ci repo
uses: actions/checkout@v6
with:
Expand Down
31 changes: 14 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,61 +23,58 @@ jobs:
matrix:
include:
- components: rustfmt
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile fmt-ci
- components: clippy
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile clippy
- components: cargo
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile build
- components: cargo
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile docs
- components: cargo
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile check-typos
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
- uses: baptiste0928/cargo-install@v3
with:
crate: typos-cli
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
- name: Test ${{ matrix.task }} on CURRENT DEVELOPMENT RUST TOOLCHAIN
run: ${{ matrix.task }}

tests-with-sudo:
strategy:
matrix:
include:
- toolchain: 1.85.0 # LOWEST SUPPORTED RUST TOOLCHAIN
- toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: cargo
toolchain: ${{ matrix.toolchain }}
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Run all tests on CURRENT DEVELOPMENT RUST TOOLCHAIN
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH make -f Makefile sudo_test
- name: Install toml-cli
run: pip install --user toml-cli
- name: Get package MSRV
id: msrv
run: |
PATH=${PATH}:/github/home/.local/bin MSRV=$(toml get --toml-path Cargo.toml "package.rust-version")
echo "MSRV=$MSRV" >> "$GITHUB_OUTPUT"
- name: Set toolchain override with sudo
run: sudo /home/runner/.cargo/bin/rustup override set ${{ matrix.toolchain }}
- name: Run all tests on ${{ matrix.toolchain }} toolchain
run: sudo /home/runner/.cargo/bin/rustup override set ${{ steps.msrv.outputs.MSRV }}
- name: Run all tests on LOWEST SUPPORTED RUST TOOLCHAIN
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH make -f Makefile sudo_test

# VERIFICATION OF TEST INFRASTRUCTURE
Expand Down
30 changes: 8 additions & 22 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,23 @@ on:
jobs:
allowed_failures:
continue-on-error: true
strategy:
matrix:
include:
- components: cargo
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile audit
# Allowed because a failure may occur after a new Rust stable
# version is released.
- components: clippy
toolchain: stable
task: make -f Makefile clippy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
components: cargo
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-audit
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
run: ${{ matrix.task }}
- name: Audit check
run: make -f Makefile audit

checks-with-ci-repo:
runs-on: ubuntu-22.04
Expand All @@ -52,6 +40,10 @@ jobs:
with:
path: devicemapper-rs
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: cargo
rust-src-dir: devicemapper-rs
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -61,10 +53,6 @@ jobs:
openssl-devel
python-requests
python-semantic_version
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- name: Check out ci repo
uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -98,10 +86,8 @@ jobs:
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
verbose: true
rust-toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
manifest-path: devicemapper-rs-sys
- name: Do semantic version checks
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
verbose: true
rust-toolchain: 1.95.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.95.0" # CURRENT DEVELOPMENT RUST TOOLCHAIN
Loading