diff --git a/.github/workflows/ci.yml b/.gitea/workflows/ci.yml similarity index 81% rename from .github/workflows/ci.yml rename to .gitea/workflows/ci.yml index 2038e93..b647ec8 100644 --- a/.github/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,7 +7,6 @@ on: pull_request: branches: - main - merge_group: workflow_dispatch: permissions: @@ -32,7 +31,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: components: rustfmt - cache-key: fmt + cache: false - name: Check formatting uses: actions-rust-lang/rustfmt@4066006ec54a31931b9b1fddfd38f2fdf2d27143 # v1 @@ -52,7 +51,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: components: clippy - cache-key: clippy + cache: false - name: Run clippy run: | @@ -79,46 +78,22 @@ jobs: matrix: include: - task: check - runner: ubuntu-24.04 target: x86_64-unknown-linux-gnu musl: false - task: test - runner: ubuntu-24.04 target: x86_64-unknown-linux-gnu musl: false - task: check - runner: ubuntu-24.04 target: x86_64-unknown-linux-musl musl: true - task: test - runner: ubuntu-24.04 target: x86_64-unknown-linux-musl musl: true - - task: check - runner: ubuntu-24.04-arm - target: aarch64-unknown-linux-gnu - musl: false - - - task: test - runner: ubuntu-24.04-arm - target: aarch64-unknown-linux-gnu - musl: false - - - task: check - runner: ubuntu-24.04-arm - target: aarch64-unknown-linux-musl - musl: true - - - task: test - runner: ubuntu-24.04-arm - target: aarch64-unknown-linux-musl - musl: true - - runs-on: ${{ matrix.runner }} + runs-on: ubuntu-latest timeout-minutes: 25 steps: @@ -137,7 +112,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: target: ${{ matrix.target }} - cache-key: ${{ matrix.task }}-${{ matrix.target }} + cache: false - name: Run ${{ matrix.task }} with all features run: | @@ -174,7 +149,7 @@ jobs: - name: Install Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: - cache-key: docs + cache: false - name: Check docs run: | diff --git a/.github/workflows/fuzz.yml b/.gitea/workflows/fuzz.yml similarity index 98% rename from .github/workflows/fuzz.yml rename to .gitea/workflows/fuzz.yml index ac6adaa..beb7e9d 100644 --- a/.github/workflows/fuzz.yml +++ b/.gitea/workflows/fuzz.yml @@ -32,7 +32,7 @@ jobs: - name: Install stable Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: - cache-key: fuzz + cache: false - name: Install nightly Rust toolchain # Installed alongside, but deliberately not made the directory diff --git a/.github/workflows/interop-netem.yml b/.gitea/workflows/interop-netem.yml similarity index 87% rename from .github/workflows/interop-netem.yml rename to .gitea/workflows/interop-netem.yml index 283b619..0638dc1 100644 --- a/.github/workflows/interop-netem.yml +++ b/.gitea/workflows/interop-netem.yml @@ -32,13 +32,14 @@ jobs: - name: Install Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: - cache-key: interop-netem + cache: false - - name: Check host tools + - name: Check host tools and network administration access run: | ip -V tc -V go version + sudo -n true - name: Install upstream irtt run: | @@ -62,14 +63,14 @@ jobs: run: | latest_summary="$(find target/interop-netem -mindepth 2 -maxdepth 2 -name github-step-summary.md -type f -print 2>/dev/null | sort | tail -n 1)" if [ -n "$latest_summary" ]; then - cat "$latest_summary" >> "$GITHUB_STEP_SUMMARY" + cat "$latest_summary" >> "$GITEA_STEP_SUMMARY" else - echo "No netem interop github-step-summary.md found." >> "$GITHUB_STEP_SUMMARY" + echo "No netem interop github-step-summary.md found." >> "$GITEA_STEP_SUMMARY" fi - name: Upload netem interop artifacts if: always() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + uses: https://gitea.com/actions/gitea-upload-artifact@v7 with: name: interop-netem path: target/interop-netem diff --git a/.github/workflows/semver.yml b/.gitea/workflows/semver.yml similarity index 50% rename from .github/workflows/semver.yml rename to .gitea/workflows/semver.yml index f4f9acd..b254653 100644 --- a/.github/workflows/semver.yml +++ b/.gitea/workflows/semver.yml @@ -25,7 +25,16 @@ jobs: with: persist-credentials: false - - name: Check semver compatibility - uses: obi1kenobi/cargo-semver-checks-action@6b69fcf40e9b5fb17adeb57e4b6ecd020649a239 # v2 + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 with: - feature-group: all-features + cache: false + + # The action wrapper downloads through the GitHub API and uses the + # GitHub cache service. The underlying CLI is portable and preserves + # the existing wrapper's `feature-group: all-features` behavior. + - name: Install cargo-semver-checks + run: cargo install cargo-semver-checks --locked + + - name: Check semver compatibility + run: cargo semver-checks check-release --all-features diff --git a/.github/workflows/supply-chain.yml b/.gitea/workflows/supply-chain.yml similarity index 62% rename from .github/workflows/supply-chain.yml rename to .gitea/workflows/supply-chain.yml index 644ad47..e44a8ed 100644 --- a/.github/workflows/supply-chain.yml +++ b/.gitea/workflows/supply-chain.yml @@ -7,7 +7,6 @@ on: pull_request: branches: - main - merge_group: schedule: - cron: "41 2 * * 1" workflow_dispatch: @@ -15,6 +14,9 @@ on: permissions: contents: read +env: + ACTIONLINT_VERSION: 1.7.7 + jobs: cargo-deny: name: cargo-deny ${{ matrix.checks }} @@ -60,20 +62,26 @@ jobs: with: persist-credentials: false + - name: Install actionlint + run: go install github.com/rhysd/actionlint/cmd/actionlint@v${ACTIONLINT_VERSION} + - name: actionlint handwritten workflows - uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 - with: - files: >- - .github/workflows/actions-security.yml, - .github/workflows/ci.yml, - .github/workflows/interop-netem.yml, - .github/workflows/osv-scanner.yml, - .github/workflows/rust-clippy.yml, - .github/workflows/semver.yml, - .github/workflows/supply-chain.yml + # actionlint validates GitHub Actions syntax. It cannot parse Gitea's + # required absolute action URL in interop-netem.yml, so that workflow + # is checked by the Gitea runner instead. + run: | + "$(go env GOPATH)/bin/actionlint" \ + .gitea/workflows/ci.yml \ + .gitea/workflows/docker-publish.yml \ + .gitea/workflows/fuzz.yml \ + .gitea/workflows/semver.yml \ + .gitea/workflows/supply-chain.yml \ + .github/workflows/actions-security.yml \ + .github/workflows/ci-arm.yml \ + .github/workflows/osv-scanner.yml \ + .github/workflows/rust-clippy.yml - name: actionlint generated release workflow - uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 - with: - files: .github/workflows/irtt-rs-release.yml - shellcheck: false + run: >- + "$(go env GOPATH)/bin/actionlint" -shellcheck= + .github/workflows/irtt-rs-release.yml diff --git a/.github/workflows/actions-security.yml b/.github/workflows/actions-security.yml index b3351c6..5fe17d6 100644 --- a/.github/workflows/actions-security.yml +++ b/.github/workflows/actions-security.yml @@ -16,34 +16,6 @@ permissions: contents: read jobs: - actionlint: - name: actionlint - runs-on: ubuntu-latest - timeout-minutes: 10 - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - with: - persist-credentials: false - - - name: actionlint handwritten workflows - uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 - with: - files: >- - .github/workflows/actions-security.yml, - .github/workflows/ci.yml, - .github/workflows/interop-netem.yml, - .github/workflows/osv-scanner.yml, - .github/workflows/rust-clippy.yml, - .github/workflows/semver.yml, - .github/workflows/supply-chain.yml - - - name: actionlint generated release workflow - uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 - with: - files: .github/workflows/irtt-rs-release.yml - shellcheck: false zizmor: name: zizmor runs-on: ubuntu-latest @@ -60,7 +32,13 @@ jobs: with: persist-credentials: false + # Zizmor's SARIF integration publishes GitHub Code Scanning results. + # It remains here while portable actionlint runs with Gitea CI, but scans + # both workflow directories through its GitHub Actions rule set. - name: Run zizmor uses: zizmorcore/zizmor-action@70fb788f84895a7701f5643d103d587e460b5c99 # v0.6.3 with: persona: regular + inputs: | + .github/workflows + .gitea/workflows diff --git a/.github/workflows/ci-arm.yml b/.github/workflows/ci-arm.yml new file mode 100644 index 0000000..054fc6a --- /dev/null +++ b/.github/workflows/ci-arm.yml @@ -0,0 +1,80 @@ +name: Rust ARM CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + merge_group: + workflow_dispatch: + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + verify: + name: cargo ${{ matrix.task }} (${{ matrix.target }}) + # Gitea currently has only amd64 Linux runners; retain ARM coverage here. + strategy: + fail-fast: false + matrix: + include: + - task: check + target: aarch64-unknown-linux-gnu + musl: false + + - task: test + target: aarch64-unknown-linux-gnu + musl: false + + - task: check + target: aarch64-unknown-linux-musl + musl: true + + - task: test + target: aarch64-unknown-linux-musl + musl: true + + runs-on: ubuntu-24.04-arm + timeout-minutes: 25 + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + + - name: Install musl toolchain + if: matrix.musl + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends musl-tools + + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 + with: + target: ${{ matrix.target }} + cache-key: ${{ matrix.task }}-${{ matrix.target }} + + - name: Run ${{ matrix.task }} with all features + run: | + cargo ${{ matrix.task }} \ + --workspace \ + --all-targets \ + --all-features \ + --target ${{ matrix.target }} \ + --locked + + - name: Run ${{ matrix.task }} without default features + run: | + cargo ${{ matrix.task }} \ + --workspace \ + --all-targets \ + --no-default-features \ + --target ${{ matrix.target }} \ + --locked diff --git a/docs/INTEROP_COMPARISON.md b/docs/INTEROP_COMPARISON.md index 0b32213..0150f48 100644 --- a/docs/INTEROP_COMPARISON.md +++ b/docs/INTEROP_COMPARISON.md @@ -139,5 +139,5 @@ scenario contains the existing comparison harness output under `netem-summary.json` files. Server stdout/stderr are captured at the run root as `server.stdout` and `server.stderr`. -On macOS, `ip netns` and `tc netem` are unavailable; use the GitHub Actions +On macOS, `ip netns` and `tc netem` are unavailable; use the Gitea Actions workflow for netem coverage.