diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index fc1744ad17..9969c7cdc4 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -10,6 +10,7 @@ on: - cron: "30 7 * * 3" env: + CARGO_ACTION_FMT_VERSION: v0.1.3 CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 RUST_BACKTRACE: short @@ -26,6 +27,10 @@ jobs: timeout-minutes: 20 continue-on-error: true steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: | + curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu" + chmod 755 /usr/local/bin/cargo-action-fmt - run: rustup toolchain install --profile=minimal beta - - run: cargo +beta build --release -p linkerd2-proxy + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: cargo +beta fetch + - run: cargo +beta build --release -p linkerd2-proxy --message-format=json | cargo-action-fmt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7356450edb..9c84313023 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ on: - .github/workflows/build.yml env: + CARGO_ACTION_FMT_VERSION: v0.1.3 CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 RUST_BACKTRACE: short @@ -24,7 +25,9 @@ jobs: timeout-minutes: 20 runs-on: ubuntu-latest steps: + - run: | + curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu" + chmod 755 /usr/local/bin/cargo-action-fmt - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - - env: - CARGO_RELEASE: "1" - run: make build + - run: cargo fetch + - run: cargo build --release -p linkerd2-proxy --message-format=json | cargo-action-fmt diff --git a/.github/workflows/check-each.yml b/.github/workflows/check-each.yml index ec669dbf95..596bed89ca 100644 --- a/.github/workflows/check-each.yml +++ b/.github/workflows/check-each.yml @@ -15,6 +15,7 @@ on: - .github/workflows/check-each.yml env: + CARGO_ACTION_FMT_VERSION: v0.1.3 CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 DEBIAN_FRONTEND: noninteractive @@ -28,8 +29,8 @@ jobs: container: image: docker://rust:1.56.1-buster steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - run: apt update && apt install -y jq + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - run: cargo fetch - name: list crates id: list-crates @@ -38,7 +39,7 @@ jobs: | jq -cr "[.packages[] | select(.manifest_path | startswith(\"$PWD\")) | .name]") echo "::set-output name=crates::$crates" outputs: - crates: ${{ steps.list-crates.outputs.crates }}` + crates: ${{ steps.list-crates.outputs.crates }} check: needs: enumerate @@ -50,10 +51,13 @@ jobs: matrix: crate: ${{ fromJson(needs.enumerate.outputs.crates) }} steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - - run: cargo fetch + - run: | + curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu" + chmod 755 /usr/local/bin/cargo-action-fmt - name: install meshtls-boring build deps if: matrix.crate == 'linkerd-meshtls-boring' run: apt update && apt install -y clang cmake - - run: cargo check -p ${{ matrix.crate }} --frozen --all-targets + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: cargo fetch + - run: cargo check -p ${{ matrix.crate }} --frozen --all-targets --message-format=json | cargo-action-fmt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1b0d0bda25..d3749ee8da 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,6 +11,7 @@ on: - .github/workflows/lint.yml env: + CARGO_ACTION_FMT_VERSION: v0.1.3 CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 RUST_BACKTRACE: short @@ -23,9 +24,13 @@ jobs: container: image: docker://rust:1.56.1-buster steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: | + curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu" + chmod 755 /usr/local/bin/cargo-action-fmt - run: rustup component add clippy - - run: cargo clippy --all --exclude=linkerd-meshtls-boring + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: cargo fetch + - run: cargo clippy --all --exclude=linkerd-meshtls-boring --message-format=json | cargo-action-fmt fmt: timeout-minutes: 10 @@ -33,8 +38,8 @@ jobs: container: image: docker://rust:1.56.1-buster steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - run: rustup component add rustfmt + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - run: make check-fmt docs: @@ -43,10 +48,15 @@ jobs: container: image: docker://rust:1.56.1-buster steps: + - run: | + curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu" + chmod 755 /usr/local/bin/cargo-action-fmt - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: cargo fetch - run: | cargo doc --all --no-deps \ --exclude=linkerd-meshtls \ --exclude=linkerd-meshtls-boring \ - --exclude=linkerd-meshtls-rustls + --exclude=linkerd-meshtls-rustls \ + --message-format=json | cargo-action-fmt diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7ecce56fb1..0ad52a786d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,6 +10,7 @@ on: - cron: "0 8 * * *" env: + CARGO_ACTION_FMT_VERSION: v0.1.3 CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 RUST_BACKTRACE: short @@ -26,6 +27,10 @@ jobs: timeout-minutes: 20 continue-on-error: true steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: | + curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu" + chmod 755 /usr/local/bin/cargo-action-fmt - run: rustup toolchain install --profile=minimal nightly - - run: cargo +nightly build --release -p linkerd2-proxy + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - run: cargo +nightly fetch + - run: cargo +nightly build --release -p linkerd2-proxy --message-format=json | cargo-action-fmt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec81c356b8..314fe7cb39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: tags: - "release/*" +permissions: + contents: write + env: CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10