diff --git a/.github/workflows/bazel_tests.yml b/.github/workflows/bazel_tests.yml new file mode 100644 index 0000000000..c1417e8068 --- /dev/null +++ b/.github/workflows/bazel_tests.yml @@ -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 }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index caa87f1380..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -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 diff --git a/WORKSPACE b/WORKSPACE index 72c5d53804..2b03f3e927 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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"], ) diff --git a/bazel/workspace_deps.bzl b/bazel/workspace_deps.bzl index 23b81dc5f9..7ac050207c 100644 --- a/bazel/workspace_deps.bzl +++ b/bazel/workspace_deps.bzl @@ -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( diff --git a/benchmarks/gen_protobuf_binary_cc.py b/benchmarks/gen_protobuf_binary_cc.py index 66c2df603d..41fb100ed5 100644 --- a/benchmarks/gen_protobuf_binary_cc.py +++ b/benchmarks/gen_protobuf_binary_cc.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Copyright (c) 2009-2021, Google LLC # All rights reserved. diff --git a/benchmarks/gen_synthetic_protos.py b/benchmarks/gen_synthetic_protos.py index 54003d2b2d..99f83c15e1 100644 --- a/benchmarks/gen_synthetic_protos.py +++ b/benchmarks/gen_synthetic_protos.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Copyright (c) 2009-2021, Google LLC # All rights reserved. diff --git a/benchmarks/gen_upb_binary_c.py b/benchmarks/gen_upb_binary_c.py index d5c0d1db85..912d82ac98 100644 --- a/benchmarks/gen_upb_binary_c.py +++ b/benchmarks/gen_upb_binary_c.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Copyright (c) 2009-2021, Google LLC # All rights reserved. diff --git a/kokoro/ubuntu/build.sh b/kokoro/ubuntu/build.sh old mode 100644 new mode 100755