From 31c9a7206466a320974d38a1f6164e158e8cd80d Mon Sep 17 00:00:00 2001 From: nicholaslyang Date: Mon, 17 Jun 2024 19:42:07 -0400 Subject: [PATCH] Protobuf compiler --- .github/workflows/release.yml | 13 +++++++++++- .../workflows/setup-release-environment.yml | 21 +++++++++++++++++++ Cargo.toml | 5 ++++- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/setup-release-environment.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2cbfcd20943b7f..bdea985058e5c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,11 +156,21 @@ jobs: ${{ steps.cargo-dist.outputs.paths }} ${{ env.BUILD_MANIFEST_NAME }} + custom-setup-release-environment.yml: + needs: + - plan + if: ${{ needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run' }} + uses: ./.github/workflows/setup-release-environment.yml.yml + with: + plan: ${{ needs.plan.outputs.val }} + secrets: inherit + # Build and package all the platform-agnostic(ish) things build-global-artifacts: needs: - plan - build-local-artifacts + - custom-setup-release-environment.yml runs-on: "ubuntu-20.04" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -203,9 +213,10 @@ jobs: needs: - plan - build-local-artifacts + - custom-setup-release-environment.yml - build-global-artifacts # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine) - if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} + if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') && (needs.custom-setup-release-environment.yml.result == 'skipped' || needs.custom-setup-release-environment.yml.result == 'success') }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: "ubuntu-20.04" diff --git a/.github/workflows/setup-release-environment.yml b/.github/workflows/setup-release-environment.yml new file mode 100644 index 00000000000000..c29592f3e1b926 --- /dev/null +++ b/.github/workflows/setup-release-environment.yml @@ -0,0 +1,21 @@ +name: Setup Release Environment + +on: + # Defining workflow_call means that this workflow can be called from + # your main workflow job + workflow_call: + # cargo-dist exposes the plan from the plan step, as a JSON string, + # to your job if it needs it + inputs: + plan: + required: true + type: string + +jobs: + greeter: + runs-on: ubuntu-latest + # This is optional; it exposes the plan to your job as an environment variable + env: + PLAN: ${{ inputs.plan }} + steps: + - uses: ./.github/actions/setup-turborepo-environment diff --git a/Cargo.toml b/Cargo.toml index 68c4183dec16a3..4ddc9fee3f8154 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,6 +99,8 @@ unix-archive = ".tar.gz" pr-run-mode = "plan" # Whether CI should trigger releases with dispatches instead of tag pushes dispatch-releases = true +# Local artifacts jobs to run in CI +local-artifacts-jobs = ["./setup-release-environment.yml"] [workspace.metadata.dist.dependencies.homebrew] protobuf = "*" @@ -117,7 +119,8 @@ llvm = "*" capnproto = "*" gcc-aarch64-linux-gnu = { version = "*", targets = ["aarch64-unknown-linux-musl"] } binutils-aarch64-linux-gnu = { version = "*", targets = ["aarch64-unknown-linux-musl"] } -protobuf-compiler = "2" +protobuf-compiler = "*" + [workspace.lints.clippy] too_many_arguments = "allow"