Skip to content

Commit

Permalink
Add upb test runs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 558239653
  • Loading branch information
acozzette authored and Copybara-Service committed Aug 21, 2023
1 parent da38af7 commit fff9052
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test_upb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
# Set defaults
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:04cd765285bc52cbbf51d66c8c66d8603579cf0f19cc42df26b09d2c270541fb
- targets: "@upb//..."

# Override with custom image
- config: { name: "GCC Optimized" flags: "-s -c opt" }
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-6.3.0-518b4fcd8d0ded2484c94f02e835526cacfdac2d"
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest

Expand All @@ -43,3 +47,31 @@ jobs:
bazel-cache: upb-bazel
bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.targets }} ${{ matrix.config.flags }}
exclude-targets: ${{ matrix.config.exclude-targets }}

non-linux:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
config:
- { name: "Windows", os: windows-2019, startup-flags: "--output_user_root=C:/tmp", flags: "--cxxopt=/std:c++17 --host_cxxopt=/std:c++17", targets: "@upb//upb/... @upb//upbc/... @upb//python/... @upb//protos/... @upb//protos_generator/..." }
- { name: "macOS", os: macos-11 }
- { name: "macOS ARM (build only)", os: macos-11, bazel_cmd: "build", flags: "--cpu=darwin_arm64"}
include:
# Set defaults
- bazel_cmd: "test"
- flags: --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
- targets: "@upb//..."
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}

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@v2
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: upb-bazel
bazel: ${{ matrix.config.startup-flags }} ${{ matrix.bazel_cmd }} ${{ matrix.flags }} ${{ matrix.targets }}

0 comments on commit fff9052

Please sign in to comment.