ci: use dnf builddep to install make-rpm build dependencies #577
Workflow file for this run
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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| name: Continuous integration | |
| permissions: read-all | |
| jobs: | |
| check-spelling: | |
| name: Check spelling | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Check spelling | |
| uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2 | |
| with: | |
| builtin: clear,rare,usage,code,en-GB_to_en-US | |
| check_filenames: true | |
| check_hidden: true | |
| ignore_words_file: .github/spellcheck-ignore | |
| skip: "./docs/Gemfile.lock,./docs/_config.yml,./.github,./.git,./greenboot-rs.spec,./dist" | |
| fmt: | |
| name: Cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - run: cargo fmt --check --all | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| container: fedora:latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Install deps | |
| run: | | |
| dnf install -y make gcc git clippy cargo rust | |
| - run: cargo clippy -- -D warnings -D clippy::panic -D clippy::todo | |
| build_and_test_with_coverage: | |
| name: Build, test with coverage | |
| runs-on: ubuntu-latest | |
| container: | |
| image: fedora:latest | |
| options: --user root | |
| env: | |
| CARGO_TERM_COLOR: always | |
| LLVM_COV: /usr/bin/llvm-cov | |
| LLVM_PROFDATA: /usr/bin/llvm-profdata | |
| steps: | |
| - name: Install deps | |
| run: | | |
| dnf install -y make gcc git cargo rust git grub2-efi grub2-efi-modules shim llvm | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Fix git trust | |
| run: git config --global --add safe.directory /__w/greenboot-rs/greenboot-rs | |
| - name: Build | |
| run: make build | |
| - name: Run tests with coverage | |
| run: make test-coverage | |
| - name: Upload coverage report (HTML artifact) | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: coverage-report | |
| path: tests/coverage/ | |
| retention-days: 14 | |
| - name: Upload coverage report (GitHub Pages) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 | |
| with: | |
| path: tests/coverage/ | |
| deploy-pages: | |
| name: Deploy coverage to GitHub Pages | |
| needs: build_and_test_with_coverage | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: github-pages | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 |