Merge pull request #3958 from mulkieran/issue_project_844 #6598
This file contains hidden or 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' | |
| - '.packit.yaml' | |
| - 'plans/**' | |
| - 'tests-fmf/**' | |
| pull_request: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'CHANGES.txt' | |
| - '**/README.md' | |
| - 'README_tests.md' | |
| - '.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.93.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
| components: rustfmt | |
| - task: make -f Makefile check-typos | |
| toolchain: 1.93.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
| components: cargo | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT | |
| options: --privileged -v /dev:/dev | |
| steps: | |
| - name: Install dependencies for Fedora | |
| run: > | |
| dnf install -y | |
| black | |
| clang | |
| curl | |
| cryptsetup-devel | |
| dbus-devel | |
| device-mapper-devel | |
| git | |
| 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 | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain | |
| run: ${{ matrix.task }} | |
| stratis-cli-checks: | |
| runs-on: ubuntu-24.04 | |
| container: | |
| 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 dependencies | |
| run: > | |
| dnf install -y | |
| asciidoc | |
| clang | |
| cryptsetup-devel | |
| dbus-daemon | |
| dbus-tools | |
| dbus-devel | |
| device-mapper-devel | |
| git | |
| glibc-static | |
| libblkid-devel | |
| 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.85.0 # LOWEST SUPPORTED RUST TOOLCHAIN | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: stratisd | |
| persist-credentials: false | |
| - name: Overwrite stratisd dependencies as necessary | |
| uses: stratis-storage/github-actions/stratisd-modify@HEAD | |
| with: | |
| working-directory: stratisd | |
| - name: Build stratisd | |
| run: PROFILEDIR=debug make -f Makefile build-all | |
| working-directory: stratisd | |
| - name: Install stratisd | |
| run: PROFILEDIR=debug make -f Makefile install | |
| working-directory: stratisd | |
| - name: Workaround for dbus inotify | |
| run: cp stratisd.conf /usr/share/dbus-1/system.d | |
| working-directory: stratisd | |
| - uses: stratis-storage/github-actions/github-modify@HEAD | |
| with: | |
| repo: stratis-cli | |
| - name: Print head commit | |
| run: git log --oneline -1 | |
| working-directory: stratis-cli | |
| - 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-24.04 | |
| container: | |
| 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: | |
| - name: Install dependencies | |
| run: > | |
| dnf install -y | |
| asciidoc | |
| clang | |
| cryptsetup-devel | |
| dbus-daemon | |
| dbus-tools | |
| dbus-devel | |
| device-mapper-devel | |
| device-mapper-persistent-data | |
| git | |
| glibc-static | |
| libblkid-devel | |
| 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.93.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Overwrite stratisd dependencies as necessary | |
| uses: stratis-storage/github-actions/stratisd-modify@HEAD | |
| - name: Run stratisd-min cli tests | |
| run: make test-stratisd-min-root | |
| - name: Run stratis-min cli tests | |
| run: make test-stratis-min-root | |
| - name: Run stratis-tools tests | |
| run: make test-stratisd-tools | |
| shell-checks: | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT | |
| steps: | |
| - name: Install dependencies | |
| run: > | |
| dnf install -y | |
| git | |
| make | |
| ncurses | |
| shfmt | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Run shell check | |
| run: make -f Makefile fmt-shell-ci | |
| pylint: | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT | |
| steps: | |
| - name: Install dependencies | |
| run: > | |
| dnf install -y | |
| bandit | |
| git | |
| libatomic | |
| make | |
| pip | |
| pylint | |
| python3-dbus | |
| - name: Install pyright | |
| run: pip install --user pyright | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Run lint | |
| run: > | |
| PATH=${PATH}:/github/home/.local/bin | |
| make -f Makefile lint | |
| python-based-tests: | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT | |
| options: --privileged -v /dev:/dev | |
| steps: | |
| - 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 | |
| git | |
| glibc-static | |
| libblkid-devel | |
| make | |
| ncurses | |
| python3-justbytes | |
| systemd-devel | |
| systemd-udev | |
| xfsprogs | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| components: cargo | |
| toolchain: 1.93.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Overwrite stratisd dependencies as necessary | |
| uses: stratis-storage/github-actions/stratisd-modify@HEAD | |
| - 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: master | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - 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 | |
| git | |
| 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.85.0 # LOWEST SUPPORTED RUST TOOLCHAIN | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: stratisd | |
| persist-credentials: false | |
| - name: Overwrite stratisd dependencies as necessary | |
| uses: stratis-storage/github-actions/stratisd-modify@HEAD | |
| with: | |
| working-directory: stratisd | |
| - name: Build stratisd | |
| run: PROFILEDIR=debug make -f Makefile build-all | |
| working-directory: stratisd | |
| - name: Install stratisd | |
| run: sudo make PROFILEDIR=debug -f Makefile install | |
| working-directory: stratisd | |
| - name: Workaround for dbus inotify | |
| run: sudo cp stratisd.conf /usr/share/dbus-1/system.d | |
| working-directory: stratisd | |
| - name: Reload udev | |
| run: sudo udevadm control --reload | |
| - uses: stratis-storage/github-actions/github-modify@HEAD | |
| with: | |
| repo: 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 | |
| --post-test-check=verify-filesystem-symlinks | |
| --post-test-check=verify-pool-metadata | |
| --highest-revision-number=9 | |
| working-directory: testing |