From 28c165f00f3b6e28f4551672e8305a3eb1aa3999 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 08:32:01 +0900 Subject: [PATCH 1/7] chore: Fix yaml indent --- .github/workflows/continuous-integration-workflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index 3e3d3dd7c..7b7a5dfc3 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -13,7 +13,7 @@ jobs: - name: install toolchain uses: dtolnay/rust-toolchain@stable with: - components: rustfmt + components: rustfmt - name: rustfmt run: cargo fmt --all --check # Disabled because downstream crates don't check this as well @@ -85,7 +85,7 @@ jobs: - name: install toolchain uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ matrix.toolchain }} + toolchain: ${{ matrix.toolchain }} - name: Install Protoc uses: arduino/setup-protoc@v1 with: From ff9c2d774c4033273d7a56f3b6e3f73b4a766c54 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 08:37:31 +0900 Subject: [PATCH 2/7] chore: Replace arduino/setup-protoc with taiki-e/install-action --- .../continuous-integration-workflow.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index 7b7a5dfc3..203dc0064 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -1,6 +1,9 @@ name: continuous integration on: pull_request +env: + PROTOC_VERSION: 3.20.3 + jobs: rustfmt: @@ -86,10 +89,10 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - - name: Install Protoc - uses: arduino/setup-protoc@v1 + - name: install protoc + uses: taiki-e/install-action@v2 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + tool: protoc@${{ env.PROTOC_VERSION }} - name: install ninja uses: seanmiddleditch/gha-setup-ninja@v3 - uses: Swatinem/rust-cache@v2 @@ -133,10 +136,10 @@ jobs: submodules: recursive - name: install toolchain uses: dtolnay/rust-toolchain@nightly - - name: Install Protoc - uses: arduino/setup-protoc@v1 + - name: install protoc + uses: taiki-e/install-action@v2 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + tool: protoc@${{ env.PROTOC_VERSION }} - uses: Swatinem/rust-cache@v2 - name: install cargo-no-std-check uses: baptiste0928/cargo-install@v2 From 2f595ddb8b05408915fb1838ed0b48b02f951fb1 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 08:43:13 +0900 Subject: [PATCH 3/7] chore: Remove unused git submodule --- .github/workflows/continuous-integration-workflow.yaml | 8 -------- .gitmodules | 3 --- 2 files changed, 11 deletions(-) delete mode 100644 .gitmodules diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index 203dc0064..f3e9b67cb 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -11,8 +11,6 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - with: - submodules: recursive - name: install toolchain uses: dtolnay/rust-toolchain@stable with: @@ -58,8 +56,6 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - with: - submodules: recursive - name: install toolchain uses: dtolnay/rust-toolchain@stable - name: Install cargo-machete @@ -83,8 +79,6 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - with: - submodules: recursive - name: install toolchain uses: dtolnay/rust-toolchain@master with: @@ -132,8 +126,6 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - with: - submodules: recursive - name: install toolchain uses: dtolnay/rust-toolchain@nightly - name: install protoc diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6251abeb8..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "prost-build/third-party/protobuf"] - path = prost-build/third-party/protobuf - url = git@github.com:protocolbuffers/protobuf From 95ec167d13feeab73a620b6af8e845cb0de4e2aa Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 09:20:24 +0900 Subject: [PATCH 4/7] chore: Remove outdated disabled ci job --- .../continuous-integration-workflow.yaml | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index f3e9b67cb..8f54c7249 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -17,39 +17,6 @@ jobs: components: rustfmt - name: rustfmt run: cargo fmt --all --check -# Disabled because downstream crates don't check this as well -# minversions: -# runs-on: ubuntu-latest -# steps: -# - uses: actions-rs/toolchain@v1 -# with: -# profile: minimal -# toolchain: nightly -# - uses: actions-rs/toolchain@v1 -# with: -# profile: minimal -# toolchain: stable -# - uses: actions/checkout@v3 -# with: -# submodules: recursive -# - name: Install Protoc -# uses: arduino/setup-protoc@v1 -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# - name: install ninja -# uses: seanmiddleditch/gha-setup-ninja@v3 -# - name: cargo update -Zminimal-versions -# uses: actions-rs/cargo@v1 -# with: -# command: update -# toolchain: nightly -# args: -Zminimal-versions -# - name: cargo check -# uses: actions-rs/cargo@v1 -# with: -# command: check -# args: --workspace --all-targets -# toolchain: stable machete: runs-on: ubuntu-latest From bfe36c5cf4580959788c8ed4c28a66293a082f21 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 09:30:22 +0900 Subject: [PATCH 5/7] chore: Refactor ci job step name --- .../continuous-integration-workflow.yaml | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index 8f54c7249..b371e5a15 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -9,23 +9,18 @@ jobs: rustfmt: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: install toolchain - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - name: rustfmt - run: cargo fmt --all --check + - run: cargo fmt --all --check machete: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: install toolchain - uses: dtolnay/rust-toolchain@stable - - name: Install cargo-machete + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - name: install cargo-machete uses: baptiste0928/cargo-install@v2 with: crate: cargo-machete @@ -44,9 +39,8 @@ jobs: - macos-latest - windows-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: install toolchain + - uses: actions/checkout@v3 + - name: install toolchain (${{ matrix.toolchain }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -54,8 +48,7 @@ jobs: uses: taiki-e/install-action@v2 with: tool: protoc@${{ env.PROTOC_VERSION }} - - name: install ninja - uses: seanmiddleditch/gha-setup-ninja@v3 + - uses: seanmiddleditch/gha-setup-ninja@v3 - uses: Swatinem/rust-cache@v2 - name: test run: cargo test --workspace --all-targets @@ -64,14 +57,13 @@ jobs: # Run doc tests separately: https://github.com/rust-lang/cargo/issues/6669 - name: test doc run: cargo test --workspace --doc - - name: test doc + - name: test doc no-default-features run: cargo test -p prost-build -p prost-derive -p prost-types --doc --no-default-features kani: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - name: Verify with Kani uses: model-checking/kani-github-action@v0.32 with: @@ -91,10 +83,8 @@ jobs: no-std: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: install toolchain - uses: dtolnay/rust-toolchain@nightly + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly - name: install protoc uses: taiki-e/install-action@v2 with: From 538e456abb1864428e3d795516d364770562c349 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 10:07:49 +0900 Subject: [PATCH 6/7] chore: Replace seanmiddleditch/gha-setup-ninja with in-tree action --- .github/actions/setup-ninja/action.yml | 17 +++++++++++++++++ .../continuous-integration-workflow.yaml | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/actions/setup-ninja/action.yml diff --git a/.github/actions/setup-ninja/action.yml b/.github/actions/setup-ninja/action.yml new file mode 100644 index 000000000..d6ddb1b4d --- /dev/null +++ b/.github/actions/setup-ninja/action.yml @@ -0,0 +1,17 @@ +runs: + using: "Composite" + steps: + - name: install ninja + if: runner.os == 'macOS' + run: brew install ninja + shell: bash + + - name: install ninja + if: runner.os == 'Windows' + run: choco install ninja + shell: bash + + - name: install ninja + if: runner.os == 'Linux' + run: sudo apt-get install ninja-build + shell: bash diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index b371e5a15..4368a0b89 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -48,7 +48,8 @@ jobs: uses: taiki-e/install-action@v2 with: tool: protoc@${{ env.PROTOC_VERSION }} - - uses: seanmiddleditch/gha-setup-ninja@v3 + - name: install ninja + uses: ./.github/actions/setup-ninja - uses: Swatinem/rust-cache@v2 - name: test run: cargo test --workspace --all-targets From 61cbd8f76a7cfe3b86c311c6fc03370ec36a8e0c Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 May 2023 10:13:25 +0900 Subject: [PATCH 7/7] chore: Change ci name short --- .../workflows/{continuous-integration-workflow.yaml => ci.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{continuous-integration-workflow.yaml => ci.yml} (99%) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/ci.yml similarity index 99% rename from .github/workflows/continuous-integration-workflow.yaml rename to .github/workflows/ci.yml index 4368a0b89..f9eaba69e 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: continuous integration +name: CI on: pull_request env: