Merge pull request #13017 from protocolbuffers/force-refresh-23

Backport GHA cleanup
pull/13042/head
Mike Kruskal 2 years ago committed by GitHub
commit f5efaf9c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      .github/workflows/staleness_check.yml
  2. 17
      .github/workflows/test_cpp.yml
  3. 8
      .github/workflows/test_runner.yml
  4. 2
      ci/push_auto_update.sh

@ -4,6 +4,12 @@ on:
schedule: schedule:
# Run daily at 10 AM UTC (2 AM PDT) # Run daily at 10 AM UTC (2 AM PDT)
- cron: 0 10 * * * - cron: 0 10 * * *
workflow_call:
inputs:
safe-checkout:
required: false
description: "The SHA key for the commit we want to run over"
type: string
workflow_dispatch: workflow_dispatch:
permissions: {} permissions: {}
@ -12,20 +18,32 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
branch: [main, 22.x] branch: [main, 22.x, 23.x]
os: [{ name: Linux, value: ubuntu-latest}] os: [{ name: Linux, value: ubuntu-latest}]
name: Test staleness ${{ matrix.os.name }} ${{ matrix.branch}} name: Test staleness ${{ matrix.os.name }} ${{ matrix.branch}}
runs-on: ${{ matrix.os.value }} runs-on: ${{ matrix.os.value }}
if: ${{ github.event.repository.full_name == 'protocolbuffers/protobuf' || matrix.branch == 'main '}} if: ${{ github.event.repository.full_name == 'protocolbuffers/protobuf' }}
steps: steps:
- name: Checkout ${{ matrix.branch }} - name: Checkout ${{ matrix.branch }}
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with: with:
ref: ${{ matrix.branch}} ref: ${{ inputs.safe-checkout || matrix.branch}}
# For commit-based tests, simply run the bazel query to make sure it works. This should be
# identical to the step below, except for the xargs piece that runs bazel test.
- name: Check that staleness tests are queryable
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' || github.event_name == 'push' }}
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: staleness_check/${{ matrix.branch}}_${{ matrix.os.value }}
bash: bazel query 'attr(tags, "staleness_test", //...)'
- name: Run all staleness tests - name: Run all staleness tests
uses: protocolbuffers/protobuf-ci/bazel@v1 if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' && github.event_name != 'push' }}
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
with: with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: staleness_check/${{ matrix.branch}}_${{ matrix.os.value }} bazel-cache: staleness_check/${{ matrix.branch}}_${{ matrix.os.value }}

@ -348,13 +348,16 @@ jobs:
-Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF
-Dprotobuf_BUILD_EXAMPLES=ON -Dprotobuf_BUILD_EXAMPLES=ON
vsversion: '2019' vsversion: '2019'
- name: Windows CMake 2022 # TODO(b/285566773) Re-enable this test.
os: windows-2022 # This is broken due to a github runner update.
flags: >- # See https://github.com/actions/runner-images/issues/7662 for more details
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF #- name: Windows CMake 2022
-Dprotobuf_BUILD_SHARED_LIBS=OFF # os: windows-2022
-Dprotobuf_BUILD_EXAMPLES=ON # flags: >-
vsversion: '2022' # -G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
# -Dprotobuf_BUILD_SHARED_LIBS=OFF
# -Dprotobuf_BUILD_EXAMPLES=ON
# vsversion: '2022'
- name: Windows CMake Shared - name: Windows CMake Shared
os: windows-2019 os: windows-2019
flags: >- flags: >-

@ -169,3 +169,11 @@ jobs:
with: with:
safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }} safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }}
secrets: inherit secrets: inherit
staleness:
name: Staleness
needs: [check-tag]
uses: ./.github/workflows/staleness_check.yml
with:
safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }}
secrets: inherit

@ -42,4 +42,4 @@ fi
git add -A git add -A
git diff --staged --quiet || git commit -am "$commit_message" git diff --staged --quiet || git commit -am "$commit_message"
git pull --rebase git pull --rebase
git push || echo "Conflicting commit hit, retrying in next job..." git push --force-with-lease || echo "Conflicting commit hit, retrying in next job..."

Loading…
Cancel
Save