From ef53613b42ad24a75d7757b0070e630876ea3664 Mon Sep 17 00:00:00 2001 From: Jakob Buchgraber Date: Thu, 23 Mar 2023 12:29:51 -0700 Subject: [PATCH] Add GHA workflow for Rust PiperOrigin-RevId: 518933228 --- .github/workflows/test_runner.yml | 8 ++++++++ .github/workflows/test_rust.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/test_rust.yml diff --git a/.github/workflows/test_runner.yml b/.github/workflows/test_runner.yml index ce3268a212..f55d63cac3 100644 --- a/.github/workflows/test_runner.yml +++ b/.github/workflows/test_runner.yml @@ -161,3 +161,11 @@ jobs: with: safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }} secrets: inherit + + rust: + name: Rust + needs: [check-tag] + uses: ./.github/workflows/test_rust.yml + with: + safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }} + secrets: inherit diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml new file mode 100644 index 0000000000..ababb01a7e --- /dev/null +++ b/.github/workflows/test_rust.yml @@ -0,0 +1,29 @@ +name: Rust Tests + +on: + workflow_call: + inputs: + safe-checkout: + required: true + description: "The SHA key for the commit we want to run over" + type: string + +jobs: + linux: + name: Linux + runs-on: ubuntu-latest + steps: + - name: Checkout pending changes + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + ref: ${{ inputs.safe-checkout }} + - name: Run tests + uses: protocolbuffers/protobuf-ci/bazel-docker@v1 + with: + image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.0.0-6361b3a6e5c97e9951d03a4de28542fc45f1adab + credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} + bazel-cache: rust_linux + bazel: | + test //rust:protobuf_test //rust/cpp_kernel:cpp_test \ + //rust/test/rust_proto_library_unit_test:rust_upb_aspect_test \ + //rust/upb_kernel:upb_test \ No newline at end of file