Skip to content

Commit

Permalink
Protobuf compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Jun 17, 2024
1 parent b4ceb48 commit 31c9a72
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/setup-release-environment.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "*"
Expand All @@ -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"
Expand Down

0 comments on commit 31c9a72

Please sign in to comment.