Merge pull request #78 from checkpoint-restore/dependabot/github_acti… #224
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint_markdown: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dorny/paths-filter@v4 | |
| id: changes | |
| with: | |
| filters: | | |
| md: | |
| - '*.md' | |
| - name: Lint markdown | |
| if: steps.changes.outputs.md == 'true' | |
| uses: DavidAnson/markdownlint-cli2-action@v24.1.0 | |
| with: | |
| globs: | | |
| README.md | |
| CONTRIBUTING.md | |
| lint: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: registry.fedoraproject.org/fedora:latest | |
| strategy: | |
| matrix: | |
| target: [shellcheck, shfmt] | |
| steps: | |
| - name: Install dependencies | |
| run: dnf install -y make ShellCheck shfmt | |
| - uses: actions/checkout@v7 | |
| - name: Run make ${{ matrix.target }} | |
| run: make ${{ matrix.target }} | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - name: install criu | |
| run: | | |
| sudo apt-get update -y | |
| # Latest development CRIU | |
| sudo apt-get install -y libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet1-dev libcap-dev uuid-dev | |
| git clone --single-branch -b criu-dev https://github.com/checkpoint-restore/criu.git | |
| make -C criu -j $(nproc) | |
| # Latest CRIU release is already part of the github actions image | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run clippy | |
| run: cargo clippy --verbose --all-targets --all-features -- -D warnings | |
| - name: Run fmt | |
| run: cargo fmt --all -- --check | |
| - name: Build with generate enabled | |
| run: GENERATE_PROTOBUF=1 GENERATE_TEST_PROCESS=1 cargo build --verbose | |
| - name: Run tests | |
| run: sudo -E env PATH=$PATH CRIU_BINARY=criu/criu/criu cargo test -- --test-threads=1 | |
| test-aarch64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - name: Install cross | |
| uses: taiki-e/install-action@v2.85.5 | |
| with: | |
| tool: cross | |
| - name: Build for aarch64-unknown-linux-musl | |
| run: cross build --target aarch64-unknown-linux-musl --verbose | |
| - name: Run clippy for aarch64-unknown-linux-musl | |
| run: cross clippy --target aarch64-unknown-linux-musl --verbose --all-targets --all-features -- -D warnings |