Merge pull request #3737 from mulkieran/tempfile-3.7.0 #5480
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: stratisd CI | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'CHANGES.txt' | |
- '**/README.md' | |
- 'README_tests.md' | |
- 'tests/client-dbus/**' | |
- '.packit.yaml' | |
- 'plans/**' | |
- 'tests-fmf/**' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'CHANGES.txt' | |
- '**/README.md' | |
- 'README_tests.md' | |
- 'tests/client-dbus/**' | |
- '.packit.yaml' | |
- 'plans/**' | |
- 'tests-fmf/**' | |
workflow_dispatch: | |
# cancel the in-progress workflow when PR is refreshed. | |
# yamllint disable rule:line-length | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
checks: | |
strategy: | |
matrix: | |
include: | |
- task: make -f Makefile fmt-ci | |
toolchain: 1.83.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
components: rustfmt | |
- task: make -f Makefile check-typos | |
toolchain: 1.83.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
components: cargo | |
runs-on: ubuntu-22.04 | |
container: | |
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT | |
options: --privileged -v /dev:/dev | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies for Fedora | |
run: > | |
dnf install -y | |
black | |
clang | |
curl | |
cryptsetup-devel | |
dbus-devel | |
device-mapper-devel | |
libblkid-devel | |
make | |
ncurses | |
python3-isort | |
systemd-devel | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
components: ${{ matrix.components }} | |
toolchain: ${{ matrix.toolchain }} | |
- uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: typos-cli | |
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain | |
run: ${{ matrix.task }} | |
stratis-cli-checks: | |
runs-on: ubuntu-22.04 | |
container: | |
image: fedora:35 # LOWEST 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: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: > | |
dnf install -y | |
asciidoc | |
clang | |
cryptsetup-devel | |
dbus-daemon | |
dbus-tools | |
dbus-devel | |
device-mapper-devel | |
libblkid-devel | |
git | |
glibc-static | |
make | |
ncurses | |
python3-coverage | |
python3-dbus-client-gen | |
python3-dbus-python-client-gen | |
python3-justbytes | |
python3-dateutil | |
python3-packaging | |
python3-psutil | |
python3-wcwidth | |
systemd-devel | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
components: cargo | |
toolchain: 1.74.0 # LOWEST SUPPORTED RUST TOOLCHAIN | |
- name: Build stratisd | |
run: PROFILEDIR=debug make -f Makefile build-all | |
- name: Install stratisd | |
run: PROFILEDIR=debug make -f Makefile install | |
- name: Workaround for dbus inotify | |
run: cp stratisd.conf /usr/share/dbus-1/system.d | |
- name: Check out stratis-cli | |
run: git clone https://github.com/stratis-storage/stratis-cli.git | |
- name: Run stratis-cli tests | |
run: > | |
RUST_LOG=stratisd=debug | |
STRATISD=/usr/libexec/stratisd | |
PYTHONPATH=./src | |
make dbus-tests | |
working-directory: ./stratis-cli | |
stratis-min-cli-checks: | |
runs-on: ubuntu-22.04 | |
container: | |
image: fedora:40 # 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 | |
asciidoc | |
clang | |
cryptsetup-devel | |
dbus-daemon | |
dbus-tools | |
dbus-devel | |
device-mapper-devel | |
device-mapper-persistent-data | |
libblkid-devel | |
git | |
glibc-static | |
make | |
ncurses | |
python3-coverage | |
python3-dbus-client-gen | |
python3-dbus-python-client-gen | |
python3-justbytes | |
python3-dateutil | |
python3-packaging | |
python3-psutil | |
python3-wcwidth | |
systemd-devel | |
xfsprogs | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
components: cargo | |
toolchain: 1.83.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
- name: Run stratisd-min cli tests | |
run: make test-stratisd-min | |
- name: Run stratis-min cli tests | |
run: make test-stratis-min | |
shell-checks: | |
runs-on: ubuntu-22.04 | |
container: | |
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: > | |
dnf install -y | |
make | |
ncurses | |
shfmt | |
- name: Run shell check | |
run: make -f Makefile fmt-shell-ci | |
pylint: | |
runs-on: ubuntu-22.04 | |
container: | |
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: > | |
dnf install -y | |
make | |
pylint | |
python3-dbus | |
- name: Run pylint | |
run: make -f Makefile pylint | |
python-based-tests: | |
runs-on: ubuntu-22.04 | |
container: | |
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT | |
options: --privileged -v /dev:/dev | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies for Fedora | |
run: > | |
dnf install -y | |
asciidoc | |
clang | |
cryptsetup-devel | |
curl | |
dbus-devel | |
dbus-tools | |
device-mapper-devel | |
device-mapper-persistent-data | |
glibc-static | |
libblkid-devel | |
make | |
ncurses | |
python3-justbytes | |
systemd-devel | |
systemd-udev | |
xfsprogs | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
components: cargo | |
toolchain: 1.83.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
- name: Build stratisd | |
run: PROFILEDIR=debug make -f Makefile build-all | |
- name: Install stratisd | |
run: PROFILEDIR=debug make -f Makefile install | |
- name: Check basic behavior of test_predict | |
run: > | |
STRATIS_PREDICT_USAGE=/usr/bin/stratis-predict-usage | |
PYTHONPATH=./src | |
make filesystem-predict-tests | |
working-directory: ./tests/client-dbus | |
tests-with-testing-repo: | |
strategy: | |
matrix: | |
include: | |
- rev: HEAD | |
options: --post-test-check=verify-filesystem-symlinks --post-test-check=verify-pool-metadata --highest-revision-number=8 | |
- rev: v3.6.2 | |
options: --highest-revision-number=6 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run apt-get update | |
run: sudo apt-get -q update | |
- name: Install dependencies | |
run: > | |
DEBIAN_FRONTEND=noninteractive | |
sudo apt-get install -y | |
asciidoc | |
clang | |
curl | |
libblkid-dev | |
libcryptsetup-dev | |
libdbus-1-dev | |
libdevmapper-dev | |
libsystemd-dev | |
libudev-dev | |
make | |
thin-provisioning-tools | |
udev | |
xfsprogs | |
- name: Install Python dependencies | |
run: > | |
sudo python -m pip install | |
dbus-python | |
dbus-python-client-gen | |
justbytes | |
psutil | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
components: cargo | |
toolchain: 1.74.0 # LOWEST SUPPORTED RUST TOOLCHAIN | |
- name: Build stratisd | |
run: PROFILEDIR=debug make -f Makefile build-all | |
- name: Install stratisd | |
run: sudo make PROFILEDIR=debug -f Makefile install | |
- name: Workaround for dbus inotify | |
run: sudo cp stratisd.conf /usr/share/dbus-1/system.d | |
- name: Reload udev | |
run: sudo udevadm control --reload | |
- name: Clone testing repo | |
run: git clone https://github.com/stratis-storage/testing.git | |
- name: Checkout revision ${{ matrix.rev }} | |
run: git checkout -b new-branch ${{ matrix.rev }} | |
working-directory: ./testing | |
- name: Run stratisd_cert.py | |
run: > | |
sudo | |
RUST_LOG=stratisd=debug | |
python3 test_harness.py --log-level=debug | |
stratisd_cert | |
--post-test-check=monitor-dbus | |
--post-test-check=verify-sysfs | |
--post-test-check=verify-private-symlinks | |
${{ matrix.options }} | |
working-directory: ./testing |