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
27 changes: 27 additions & 0 deletions .github/actions/stratisd-modify-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# yamllint disable rule:line-length
name: 'Modify stratisd checkout'
description: "Modify stratisd checked out files as necessary"
runs:
using: "composite"
steps:
- name: Redirect Rust dependencies
if: github.event_name == 'pull_request'
shell: bash
run: |
set +e
# Stratis project dependencies specified in Cargo.toml
DEPENDENCIES=("devicemapper" "libblkid-rs" "libcryptsetup-rs-sys" "libcryptsetup-rs" "loopdev-3")
REPOS=("devicemapper-rs" "libblkid-rs" "libcryptsetup-rs" "libcryptsetup-rs" "loopdev-3")
TREE_ARGS=()
for (( i=0; i<${#REPOS[@]}; i++ )); do
dependency=${DEPENDENCIES[$i]}
repo=${REPOS[$i]}
cargo add $dependency --git https://github.com/jbaublitz/$repo --branch $GITHUB_HEAD_REF
jbaublitz=$?
cargo add $dependency --git https://github.com/mulkieran/$repo --branch $GITHUB_HEAD_REF
mulkieran=$?
(( jbaublitz == 0 && mulkieran == 0)) && { echo "Duplicate $repo branches"; exit 1; }
TREE_ARGS+=(--invert=$dependency)
done
cargo tree ${TREE_ARGS[@]}
9 changes: 4 additions & 5 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
container:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- name: Install git for checkout action
run: dnf install -y git
- uses: actions/checkout@v4
with:
path: stratisd
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -44,6 +39,7 @@ jobs:
cryptsetup-devel
dbus-devel
device-mapper-devel
git
libblkid-devel
make
ncurses
Expand All @@ -55,6 +51,9 @@ jobs:
with:
components: cargo
toolchain: 1.88.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- uses: actions/checkout@v4
with:
path: stratisd
- name: Check out ci repo
uses: actions/checkout@v4
with:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged -v /dev:/dev -v /run/udev:/run/udev -v /usr/lib/udev:/usr/lib/udev
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -90,6 +89,7 @@ jobs:
dbus-devel
device-mapper-persistent-data
device-mapper-devel
git
libblkid-devel
make
ncurses
Expand All @@ -99,6 +99,9 @@ jobs:
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
- uses: actions/checkout@v4
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
run: ${{ matrix.task }}

Expand All @@ -115,7 +118,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged -v /dev:/dev -v /run/udev:/run/udev -v /usr/lib/udev:/usr/lib/udev --ipc=host
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -124,6 +126,7 @@ jobs:
cryptsetup-devel
curl
dbus-devel
git
glibc-static
device-mapper-devel
device-mapper-persistent-data
Expand All @@ -138,6 +141,9 @@ jobs:
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
- uses: actions/checkout@v4
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
- name: Build stratisd
run: PROFILEDIR=debug make -f Makefile build-all
- name: Install stratisd
Expand All @@ -162,7 +168,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged -v /dev:/dev -v /run/udev:/run/udev -v /usr/lib/udev:/usr/lib/udev --ipc=host
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -172,6 +177,7 @@ jobs:
cryptsetup-devel
curl
dbus-devel
git
glibc-static
device-mapper-devel
device-mapper-persistent-data
Expand All @@ -186,6 +192,9 @@ jobs:
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
- uses: actions/checkout@v4
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
- name: Build stratisd
run: PROFILEDIR=debug make -f Makefile build-all
- name: Install stratisd
Expand Down
46 changes: 29 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged -v /dev:/dev
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -60,6 +59,7 @@ jobs:
cryptsetup-devel
dbus-devel
device-mapper-devel
git
libblkid-devel
make
ncurses
Expand All @@ -72,6 +72,7 @@ jobs:
- uses: baptiste0928/cargo-install@v3
with:
crate: typos-cli
- uses: actions/checkout@v4
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
run: ${{ matrix.task }}

Expand All @@ -81,11 +82,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged --userns=host --ipc=host -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro -v /usr/share/dbus-1:/usr/share/dbus-1
steps:
- name: Install git for checkout action
run: dnf install -y git
- uses: actions/checkout@v4
with:
path: stratisd
- name: Install dependencies
run: >
dnf install -y
Expand All @@ -96,8 +92,9 @@ jobs:
dbus-tools
dbus-devel
device-mapper-devel
libblkid-devel
git
glibc-static
libblkid-devel
make
ncurses
python3-coverage
Expand All @@ -113,6 +110,12 @@ jobs:
with:
components: cargo
toolchain: 1.77.0 # LOWEST SUPPORTED RUST TOOLCHAIN
- uses: actions/checkout@v4
with:
path: stratisd
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
working-directory: stratisd
- name: Build stratisd
run: PROFILEDIR=debug make -f Makefile build-all
working-directory: stratisd
Expand Down Expand Up @@ -172,7 +175,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged --userns=host --ipc=host -v /dev:/dev -v /run/udev:/run/udev -v /usr/lib/udev:/usr/lib/udev -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro -v /usr/share/dbus-1:/usr/share/dbus-1
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: >
dnf install -y
Expand All @@ -184,9 +186,9 @@ jobs:
dbus-devel
device-mapper-devel
device-mapper-persistent-data
libblkid-devel
git
glibc-static
libblkid-devel
make
ncurses
python3-coverage
Expand All @@ -203,6 +205,9 @@ jobs:
with:
components: cargo
toolchain: 1.88.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- uses: actions/checkout@v4
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
- name: Run stratisd-min cli tests
run: make test-stratisd-min-root
- name: Run stratis-min cli tests
Expand All @@ -215,13 +220,14 @@ jobs:
container:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: >
dnf install -y
git
make
ncurses
shfmt
- uses: actions/checkout@v4
- name: Run shell check
run: make -f Makefile fmt-shell-ci

Expand All @@ -230,17 +236,18 @@ jobs:
container:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: >
dnf install -y
bandit
git
make
pip
pylint
python3-dbus
- name: Install pyright
run: pip install --user pyright
- uses: actions/checkout@v4
- name: Run lint
run: >
PATH=${PATH}:/github/home/.local/bin
Expand All @@ -252,7 +259,6 @@ jobs:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
options: --privileged -v /dev:/dev
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: >
dnf install -y
Expand All @@ -264,6 +270,7 @@ jobs:
dbus-tools
device-mapper-devel
device-mapper-persistent-data
git
glibc-static
libblkid-devel
make
Expand All @@ -276,6 +283,9 @@ jobs:
with:
components: cargo
toolchain: 1.88.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- uses: actions/checkout@v4
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
- name: Build stratisd
run: PROFILEDIR=debug make -f Makefile build-all
- name: Install stratisd
Expand All @@ -294,11 +304,6 @@ jobs:
- rev: master
runs-on: ubuntu-24.04
steps:
- name: Install git for checkout action
run: DEBIAN_FRONTEND=noninteractive sudo apt-get install -y git
- uses: actions/checkout@v4
with:
path: stratisd
- name: Run apt-get update
run: sudo apt-get -q update
- name: Install dependencies
Expand All @@ -308,6 +313,7 @@ jobs:
asciidoc
clang
curl
git
libblkid-dev
libcryptsetup-dev
libdbus-1-dev
Expand All @@ -329,6 +335,12 @@ jobs:
with:
components: cargo
toolchain: 1.77.0 # LOWEST SUPPORTED RUST TOOLCHAIN
- uses: actions/checkout@v4
with:
path: stratisd
- name: Overwrite stratisd dependencies as necessary
uses: ./.github/actions/stratisd-modify-action
working-directory: stratisd
- name: Build stratisd
run: PROFILEDIR=debug make -f Makefile build-all
working-directory: stratisd
Expand Down
Loading