Merge pull request #410 from haberman/gha-test

Run existing Kokoro tests on GitHub Actions.
pull/13171/head
Joshua Haberman 3 years ago committed by GitHub
commit cad4ec2687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      .github/workflows/bazel_tests.yml
  2. 32
      .github/workflows/build.yml
  3. 7
      WORKSPACE
  4. 8
      bazel/workspace_deps.bzl
  5. 2
      benchmarks/gen_protobuf_binary_cc.py
  6. 2
      benchmarks/gen_synthetic_protos.py
  7. 2
      benchmarks/gen_upb_binary_c.py
  8. 0
      kokoro/ubuntu/build.sh

@ -0,0 +1,40 @@
name: Bazel Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { flags: "" }
- { flags: "--//:fasttable_enabled=true -- -cmake:test_generated_files" }
- { flags: "--config=asan -- -benchmarks:benchmark" }
steps:
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Use gcloud CLI
run: gcloud info
- name: Configure Docker
run: gcloud auth configure-docker
- name: Pull Docker Image
run: docker pull gcr.io/protobuf-build/bazel/linux:4.0.0-b87ca72acbc262f41506b004ac9ea0657c91b546
- uses: actions/checkout@v2
- name: Run tests
run: cd ${{ github.workspace }} && docker run -v$PWD:/workspace gcr.io/protobuf-build/bazel/linux:4.0.0-b87ca72acbc262f41506b004ac9ea0657c91b546 test ... ${{ matrix.flags }}

@ -1,32 +0,0 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { CC: gcc, CXX: g++ }
- { CC: clang, CXX: clang++ }
steps:
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Use gcloud CLI
run: gcloud info

@ -1,7 +1,6 @@
workspace(name = "upb")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
load("//bazel:workspace_deps.bzl", "upb_deps")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@ -32,11 +31,11 @@ http_archive(
sha256 = "59f918c8ccd4d74b6ac43484467b500f1d64b40cc1010daa055375b322a43ba3",
)
new_git_repository(
http_archive(
name = "com_google_googleapis",
remote = "https://github.com/googleapis/googleapis.git",
branch = "master",
urls = ["https://github.com/googleapis/googleapis/archive/refs/heads/master.zip"],
build_file = "//benchmarks:BUILD.googleapis",
strip_prefix = "googleapis-master",
patch_cmds = ["find google -type f -name BUILD.bazel -delete"],
)

@ -1,14 +1,12 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
def upb_deps():
maybe(
git_repository,
http_archive,
name = "com_google_absl",
commit = "998805a4c79d5d7a771f7e5a8ee3cbbbcba04f94",
remote = "https://github.com/abseil/abseil-cpp.git",
shallow_since = "1583355457 -0500",
url = "https://github.com/abseil/abseil-cpp/archive/refs/heads/master.zip",
strip_prefix = "abseil-cpp-master",
)
maybe(

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (c) 2009-2021, Google LLC
# All rights reserved.

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (c) 2009-2021, Google LLC
# All rights reserved.

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (c) 2009-2021, Google LLC
# All rights reserved.

Loading…
Cancel
Save