From 0bbe8b1f903df0d6e8137572c1d0dbb560a954a1 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 16:25:15 +0000 Subject: [PATCH 01/28] test ci fix --- .github/workflows/main.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index cdecdd15..320b067b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,6 +17,7 @@ jobs: includescanner: ["goma", "clangscandeps"] os: ["ubuntu-20.04", "macos-13", "windows-2019"] runs-on: ${{ matrix.os }} + continue-on-error: true # Allow other marix jobs to complete if one fails steps: # Clean up unused tools to have more disk space in the GitHub hosted runner. - if: runner.os == 'Linux' @@ -34,12 +35,12 @@ jobs: with: # Avoid downloading Bazel every time. bazelisk-cache: true - # Store build cache per workflow. - disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} - # Share repository cache between workflows with the same image version. - # Invalidating on image version is required because the local toolchain - # needs to be regenerated for new image versions. - repository-cache: ${{ env.ImageVersion }} + # Disk and repository caches are disabled on mac due to some build errors with c-ares~/ares* symbols when they are used. + # Store build cache per workflow unless running on mac. + # See https://docs.github.com/en/actions/learn-github-actions/expressions#format for format function syntax + disk-cache: ${{ runner.os != 'macOS' && format('{0} {1}', github.workflow, matrix.includescanner) || false }} + # Use repository cache unless running on mac. + repository-cache: ${{ runner.os != 'macOS' }} # Checkout the depot tools they are needed by the goma repository - if: runner.os != 'Windows' From 27ca7e24e613ab3a598fe23f83bd4319c6bf2826 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 16:39:42 +0000 Subject: [PATCH 02/28] bump c-ares --- MODULE.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/MODULE.bazel b/MODULE.bazel index d4ad54ed..efc44ad9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -69,6 +69,7 @@ bazel_dep(name = "grpc", version = "1.63.1", repo_name = "com_github_grpc_grpc") bazel_dep(name = "glog", version = "0.7.0", repo_name = "com_github_google_glog") bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags") bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest") +bazel_dep(name = "c-ares", version = "1.16.1") gclient_repository = use_repo_rule("//:gclient.bzl", "gclient_repository") From c4a475a2a559a7d58e472214828a431cca0ba4d0 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 16:52:52 +0000 Subject: [PATCH 03/28] bump grpc --- MODULE.bazel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index efc44ad9..06d324d8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -44,12 +44,13 @@ node.toolchain( ) use_repo(node, "nodejs", "nodejs_toolchains") +bazel_dep(name = "rules_python", version = "0.34.0") ## C++ Dependencies # Protobuf and abseil are linked against by goma's input processor so we must keep the source versions in sync bazel_dep( name = "protobuf", - version = "26.0.bcr.1", # Same version as used in goma patch + version = "26.0.bcr.2", # Same version as used in goma patch repo_name = "com_google_protobuf", ) single_version_override( @@ -65,11 +66,10 @@ git_override( remote = "https://github.com/abseil/abseil-cpp.git", ) -bazel_dep(name = "grpc", version = "1.63.1", repo_name = "com_github_grpc_grpc") +bazel_dep(name = "grpc", version = "1.65.0", repo_name = "com_github_grpc_grpc") bazel_dep(name = "glog", version = "0.7.0", repo_name = "com_github_google_glog") bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags") bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest") -bazel_dep(name = "c-ares", version = "1.16.1") gclient_repository = use_repo_rule("//:gclient.bzl", "gclient_repository") From 11cdb65d4cef61641a9ea04946770e2af6833de1 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 17:02:20 +0000 Subject: [PATCH 04/28] use bazelisk --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 320b067b..78bb700d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,4 +62,4 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: Bazel Build - run: bazel build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From af85cf2d46343ae36d009a5c296cd46a5acd9667 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 19:18:51 +0000 Subject: [PATCH 05/28] sanbox debug --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 78bb700d..178afc34 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,4 +62,4 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --sandbox_debug //:artifacts.tar From 311a038aeb44de0676bd72481e8cf43da28a26e6 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 19:36:00 +0000 Subject: [PATCH 06/28] add --verbose_failures --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 178afc34..58d5141f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,4 +62,4 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --sandbox_debug //:artifacts.tar + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --sandbox_debug --verbose_failures //:artifacts.tar From 0eb12d62ce204bcfcaeb2f28cfd486432acf2f61 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 19:38:36 +0000 Subject: [PATCH 07/28] remove sandbox debug --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 58d5141f..30962557 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,4 +62,4 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --sandbox_debug --verbose_failures //:artifacts.tar + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar From 47788d25b60381fea967ef8b8f9a6609dd4d2fa6 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 19:52:47 +0000 Subject: [PATCH 08/28] dump all configs --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 30962557..4a044d70 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,4 +62,4 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar || bazelisk config --dump_all From cf0b5bdc57b438b22762c48dabe5afd3f776967c Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 20:04:29 +0000 Subject: [PATCH 09/28] print local toolchains --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4a044d70..05aa8b71 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,4 +62,4 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar || bazelisk config --dump_all + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar || bazelisk query @@bazel_tools~cc_configure_extension~local_config_cc//... --output=build From b1b9fe8218919185912113f575f0b83e16ce7141 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Tue, 16 Jul 2024 20:07:55 +0000 Subject: [PATCH 10/28] add copt --- .github/workflows/main.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 05aa8b71..e07761a4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -61,5 +61,9 @@ jobs: Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar || bazelisk query @@bazel_tools~cc_configure_extension~local_config_cc//... --output=build + - if: runner.os == 'macOS' + name: Bazel Build (mac) + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures --copt=-isystem/usr/local/include //:artifacts.tar || bazelisk query @@bazel_tools~cc_configure_extension~local_config_cc//... --output=build + - if: runner.os != 'macOS' + name: Bazel Build + run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From 35ba4dec27bd66d4d9a4dbd2fad148f0c1384ca1 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 12:51:11 +0000 Subject: [PATCH 11/28] move to bazelrc --- .bazelrc | 4 +++- .github/workflows/main.yaml | 16 +++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.bazelrc b/.bazelrc index 365bcbda..bb06ff7a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -48,7 +48,9 @@ build:linux --cxxopt=-Wuninitialized --host_cxxopt=-Wuninitialized # The protobuf cc library version we use has warnings on some versions of xcode # We can probably remove this once we update our proto version build:macos --cxxopt=-Wno-unknown-warning-option --cxxopt=-Wno-deprecated-builtins --host_cxxopt=-Wno-unknown-warning-option --host_cxxopt=-Wno-deprecated-builtins - +# Building c-ares (a dependency of grpc) fails to link on github action runners if this is not specified +# Inspired by https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.48.1.bcr.3/presubmit.yml +build:macos --copt=-isystem/usr/local/include --host_copt=-isystem/usr/local/include ## use BAZEL_LLVM on windows ## http://docs.bazel.build/versions/master/windows.html#bulid-c-with-clang diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e07761a4..19c5e317 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -35,12 +35,10 @@ jobs: with: # Avoid downloading Bazel every time. bazelisk-cache: true - # Disk and repository caches are disabled on mac due to some build errors with c-ares~/ares* symbols when they are used. - # Store build cache per workflow unless running on mac. - # See https://docs.github.com/en/actions/learn-github-actions/expressions#format for format function syntax - disk-cache: ${{ runner.os != 'macOS' && format('{0} {1}', github.workflow, matrix.includescanner) || false }} - # Use repository cache unless running on mac. - repository-cache: ${{ runner.os != 'macOS' }} + # Store build cache per workflow. + disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} + # Share repository cache between workflows + repository-cache: true # Checkout the depot tools they are needed by the goma repository - if: runner.os != 'Windows' @@ -61,9 +59,5 @@ jobs: Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - - if: runner.os == 'macOS' - name: Bazel Build (mac) - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures --copt=-isystem/usr/local/include //:artifacts.tar || bazelisk query @@bazel_tools~cc_configure_extension~local_config_cc//... --output=build - - if: runner.os != 'macOS' - name: Bazel Build + - name: Bazel Build run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From b560b619951bf338790c737a4cc5266e2ab79d1e Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 17:30:20 +0000 Subject: [PATCH 12/28] remove unneded changes --- MODULE.bazel | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 06d324d8..d4ad54ed 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -44,13 +44,12 @@ node.toolchain( ) use_repo(node, "nodejs", "nodejs_toolchains") -bazel_dep(name = "rules_python", version = "0.34.0") ## C++ Dependencies # Protobuf and abseil are linked against by goma's input processor so we must keep the source versions in sync bazel_dep( name = "protobuf", - version = "26.0.bcr.2", # Same version as used in goma patch + version = "26.0.bcr.1", # Same version as used in goma patch repo_name = "com_google_protobuf", ) single_version_override( @@ -66,7 +65,7 @@ git_override( remote = "https://github.com/abseil/abseil-cpp.git", ) -bazel_dep(name = "grpc", version = "1.65.0", repo_name = "com_github_grpc_grpc") +bazel_dep(name = "grpc", version = "1.63.1", repo_name = "com_github_grpc_grpc") bazel_dep(name = "glog", version = "0.7.0", repo_name = "com_github_google_glog") bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags") bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest") From d9e006f45702fa7375bfdad5e047ad84454d87f4 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 18:14:36 +0000 Subject: [PATCH 13/28] move to separate rc --- .bazelrc | 3 --- .github/workflows/githubci.bazelrc | 3 +++ .github/workflows/main.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/githubci.bazelrc diff --git a/.bazelrc b/.bazelrc index bb06ff7a..1ae37d9e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -48,9 +48,6 @@ build:linux --cxxopt=-Wuninitialized --host_cxxopt=-Wuninitialized # The protobuf cc library version we use has warnings on some versions of xcode # We can probably remove this once we update our proto version build:macos --cxxopt=-Wno-unknown-warning-option --cxxopt=-Wno-deprecated-builtins --host_cxxopt=-Wno-unknown-warning-option --host_cxxopt=-Wno-deprecated-builtins -# Building c-ares (a dependency of grpc) fails to link on github action runners if this is not specified -# Inspired by https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.48.1.bcr.3/presubmit.yml -build:macos --copt=-isystem/usr/local/include --host_copt=-isystem/usr/local/include ## use BAZEL_LLVM on windows ## http://docs.bazel.build/versions/master/windows.html#bulid-c-with-clang diff --git a/.github/workflows/githubci.bazelrc b/.github/workflows/githubci.bazelrc new file mode 100644 index 00000000..77121857 --- /dev/null +++ b/.github/workflows/githubci.bazelrc @@ -0,0 +1,3 @@ +# Building c-ares (a dependency of grpc) fails to link on github action runners if this is not specified +# Inspired by https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.48.1.bcr.3/presubmit.yml +build:macos --copt=-isystem/usr/local/include --host_copt=-isystem/usr/local/include \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 19c5e317..5c8e8043 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -39,6 +39,7 @@ jobs: disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} # Share repository cache between workflows repository-cache: true + bazelrc: import %workspace%/.github/workflows/githubci.bazelrc # Checkout the depot tools they are needed by the goma repository - if: runner.os != 'Windows' From b6f54471bc769112f593b3a58fe0edb0310ab748 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 18:46:16 +0000 Subject: [PATCH 14/28] query toolchain --- .github/workflows/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5c8e8043..104a1766 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -60,5 +60,7 @@ jobs: Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append + - name: query toolchain + run: bazelisk query --output=build @@bazel_tools~cc_configure_extension~local_config_cc//:local - name: Bazel Build run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From f0953edc5baa27ce94ea5cf5d87b34b6c9692ec1 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 18:55:32 +0000 Subject: [PATCH 15/28] comment out fix --- .github/workflows/githubci.bazelrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/githubci.bazelrc b/.github/workflows/githubci.bazelrc index 77121857..ea9df77e 100644 --- a/.github/workflows/githubci.bazelrc +++ b/.github/workflows/githubci.bazelrc @@ -1,3 +1,3 @@ # Building c-ares (a dependency of grpc) fails to link on github action runners if this is not specified # Inspired by https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.48.1.bcr.3/presubmit.yml -build:macos --copt=-isystem/usr/local/include --host_copt=-isystem/usr/local/include \ No newline at end of file +# build:macos --copt=-isystem/usr/local/include --host_copt=-isystem/usr/local/include \ No newline at end of file From c653b265aaee1ceb5645d453120d3751ffd39a99 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 22:14:36 +0000 Subject: [PATCH 16/28] query ares --- .github/workflows/main.yaml | 4 ++-- MODULE.bazel | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 104a1766..3d4e6eb7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -60,7 +60,7 @@ jobs: Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - - name: query toolchain - run: bazelisk query --output=build @@bazel_tools~cc_configure_extension~local_config_cc//:local + - name: query ares + run: bazelisk aquery @com_github_cares_cares//:ares - name: Bazel Build run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar diff --git a/MODULE.bazel b/MODULE.bazel index d4ad54ed..78496caf 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -65,6 +65,7 @@ git_override( remote = "https://github.com/abseil/abseil-cpp.git", ) +bazel_dep(name = "c-ares", version = "1.15.0", repo_name = "com_github_cares_cares") bazel_dep(name = "grpc", version = "1.63.1", repo_name = "com_github_grpc_grpc") bazel_dep(name = "glog", version = "0.7.0", repo_name = "com_github_google_glog") bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags") From c9a8eb496d04e44edb5fa52d74da01740a68509f Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 22:44:31 +0000 Subject: [PATCH 17/28] dump configs --- .github/workflows/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3d4e6eb7..627fc3b1 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,5 +62,7 @@ jobs: echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: query ares run: bazelisk aquery @com_github_cares_cares//:ares + - name: dump configs + run: bazelisk config --dump_all - name: Bazel Build run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From 75d703633ca1198d2ae3e7c5604e38d277502c87 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Wed, 17 Jul 2024 23:08:08 +0000 Subject: [PATCH 18/28] build ares --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 627fc3b1..c3983f94 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -60,9 +60,9 @@ jobs: Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append + - name: build ares + run: bazelisk build @com_github_cares_cares//:ares --subcommands - name: query ares run: bazelisk aquery @com_github_cares_cares//:ares - - name: dump configs - run: bazelisk config --dump_all - name: Bazel Build run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From bf80d841612b0f9ced9ae250020d8f301a5e227b Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 13:18:56 +0000 Subject: [PATCH 19/28] disable cache --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c3983f94..34857303 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -36,9 +36,9 @@ jobs: # Avoid downloading Bazel every time. bazelisk-cache: true # Store build cache per workflow. - disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} + disk-cache: false # Share repository cache between workflows - repository-cache: true + repository-cache: false bazelrc: import %workspace%/.github/workflows/githubci.bazelrc # Checkout the depot tools they are needed by the goma repository From 073c67a47e8e66c48e9d3d0905d26239154b83eb Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 13:27:06 +0000 Subject: [PATCH 20/28] add pwd --- .github/workflows/main.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 34857303..2da11dc0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -48,6 +48,9 @@ jobs: - if: runner.os != 'Windows' name: Update PATH run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH + - if: runner.os == 'macOS' + name: Update PATH + run: echo "PWD=/proc/self/cwd" >> $GITHUB_ENV - if: runner.os == 'Windows' name: Checkout depot tools (win) run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git C:\src\depot_tools From 98dd67efdfae5f046056bac4076dbd7676b4e263 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 14:47:54 +0000 Subject: [PATCH 21/28] add verbose --- .github/workflows/main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2da11dc0..69928ed0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,8 +14,8 @@ jobs: bazel-build: strategy: matrix: - includescanner: ["goma", "clangscandeps"] - os: ["ubuntu-20.04", "macos-13", "windows-2019"] + includescanner: ["goma"] + os: ["macos-13"] runs-on: ${{ matrix.os }} continue-on-error: true # Allow other marix jobs to complete if one fails steps: @@ -64,7 +64,7 @@ jobs: echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - name: build ares - run: bazelisk build @com_github_cares_cares//:ares --subcommands + run: bazelisk build @com_github_cares_cares//:ares --copt=-v --subcommands - name: query ares run: bazelisk aquery @com_github_cares_cares//:ares - name: Bazel Build From 7aa0537edf630fb2f19938fdb11fafc856e5745b Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 14:59:57 +0000 Subject: [PATCH 22/28] use mac14 --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 69928ed0..d90cef6b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: includescanner: ["goma"] - os: ["macos-13"] + os: ["macos-14"] runs-on: ${{ matrix.os }} continue-on-error: true # Allow other marix jobs to complete if one fails steps: From 4e79ccd2cbf64109629c133edc7bb66c274f9f17 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 17:24:48 +0000 Subject: [PATCH 23/28] clean up --- .github/workflows/githubci.bazelrc | 3 --- .github/workflows/main.yaml | 20 ++++++-------------- 2 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/githubci.bazelrc diff --git a/.github/workflows/githubci.bazelrc b/.github/workflows/githubci.bazelrc deleted file mode 100644 index ea9df77e..00000000 --- a/.github/workflows/githubci.bazelrc +++ /dev/null @@ -1,3 +0,0 @@ -# Building c-ares (a dependency of grpc) fails to link on github action runners if this is not specified -# Inspired by https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.48.1.bcr.3/presubmit.yml -# build:macos --copt=-isystem/usr/local/include --host_copt=-isystem/usr/local/include \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d90cef6b..2c627d53 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,8 +14,8 @@ jobs: bazel-build: strategy: matrix: - includescanner: ["goma"] - os: ["macos-14"] + includescanner: ["goma", "clangscandeps"] + os: ["ubuntu-20.04", "macos-14", "windows-2019"] runs-on: ${{ matrix.os }} continue-on-error: true # Allow other marix jobs to complete if one fails steps: @@ -36,10 +36,9 @@ jobs: # Avoid downloading Bazel every time. bazelisk-cache: true # Store build cache per workflow. - disk-cache: false - # Share repository cache between workflows - repository-cache: false - bazelrc: import %workspace%/.github/workflows/githubci.bazelrc + disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} + # Share repository cache between workflows. + repository-cache: true # Checkout the depot tools they are needed by the goma repository - if: runner.os != 'Windows' @@ -48,9 +47,6 @@ jobs: - if: runner.os != 'Windows' name: Update PATH run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH - - if: runner.os == 'macOS' - name: Update PATH - run: echo "PWD=/proc/self/cwd" >> $GITHUB_ENV - if: runner.os == 'Windows' name: Checkout depot tools (win) run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git C:\src\depot_tools @@ -63,9 +59,5 @@ jobs: Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append - - name: build ares - run: bazelisk build @com_github_cares_cares//:ares --copt=-v --subcommands - - name: query ares - run: bazelisk aquery @com_github_cares_cares//:ares - name: Bazel Build - run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar + run: bazel build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true //:artifacts.tar From 75f014bdf224250386a9d92dee02d0b0617986c9 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 19:05:57 +0000 Subject: [PATCH 24/28] cross mac --- .github/workflows/main.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2c627d53..943fc619 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -16,6 +16,14 @@ jobs: matrix: includescanner: ["goma", "clangscandeps"] os: ["ubuntu-20.04", "macos-14", "windows-2019"] + include: + - os: macos-14 + cpu: darwin_x86_64 + platform: darwin_amd64_cgo + - os: macos-14 + cpu: darwin_arm64 + platform: darwin_arm64_cgo + runs-on: ${{ matrix.os }} continue-on-error: true # Allow other marix jobs to complete if one fails steps: @@ -39,7 +47,10 @@ jobs: disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} # Share repository cache between workflows. repository-cache: true - + # Set mac cross compile flags if building for mac x86 + bazelrc: build --cpu=darwin_x86_64 --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64_cgo + - if: runner.os == 'macOS' + run: echo "--cpu=${{ matrix.cpu }} --platforms=@io_bazel_rules_go//go/toolchain:${{ matrix.platform }}" >> /Users/runner/.bazelrc # Checkout the depot tools they are needed by the goma repository - if: runner.os != 'Windows' name: Checkout depot tools From ee11330414324f76bfa9d1c677ed27f09041fd17 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 19:15:53 +0000 Subject: [PATCH 25/28] cross mac --- .github/workflows/main.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 943fc619..a0de848b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -15,16 +15,17 @@ jobs: strategy: matrix: includescanner: ["goma", "clangscandeps"] - os: ["ubuntu-20.04", "macos-14", "windows-2019"] - include: - - os: macos-14 + os: + - name: ubuntu-20.04 + - name: macos-14 cpu: darwin_x86_64 platform: darwin_amd64_cgo - - os: macos-14 + - name: macos-14 cpu: darwin_arm64 platform: darwin_arm64_cgo + - name: windows-2019 - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os.name }} continue-on-error: true # Allow other marix jobs to complete if one fails steps: # Clean up unused tools to have more disk space in the GitHub hosted runner. @@ -47,10 +48,8 @@ jobs: disk-cache: ${{ github.workflow }} ${{ matrix.includescanner }} # Share repository cache between workflows. repository-cache: true - # Set mac cross compile flags if building for mac x86 - bazelrc: build --cpu=darwin_x86_64 --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64_cgo - - if: runner.os == 'macOS' - run: echo "--cpu=${{ matrix.cpu }} --platforms=@io_bazel_rules_go//go/toolchain:${{ matrix.platform }}" >> /Users/runner/.bazelrc + - if: matrix.os.cpu + run: echo "--cpu=${{ matrix.os.cpu }} --platforms=@io_bazel_rules_go//go/toolchain:${{ matrix.os.platform }}" >> /Users/runner/.bazelrc # Checkout the depot tools they are needed by the goma repository - if: runner.os != 'Windows' name: Checkout depot tools From 6fa3fd90d6232b85f60cdb6ef06ebd328c0e59a5 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 21:21:38 +0000 Subject: [PATCH 26/28] clean up mac disk --- .github/workflows/main.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a0de848b..51c70b63 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -34,6 +34,14 @@ jobs: run: sudo rm -rf /usr/share/dotnet sudo rm -rf /usr/local/lib/android + - if: runner.os == 'macOS' + name: Free disk space + run: + df / -h + sudo rm -rf "/Applications/Visual Studio.app" + sudo rm -rf "/Applications/Visual Studio 2019.app" + sudo rm -rf "/Users/runner/Library/Android/sdk" + df / -h - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 From f0d27e048db8538b7013bbea48e0da1f695d7a52 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 21:25:58 +0000 Subject: [PATCH 27/28] add pipe --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 51c70b63..9962e971 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -31,12 +31,12 @@ jobs: # Clean up unused tools to have more disk space in the GitHub hosted runner. - if: runner.os == 'Linux' name: Free disk space - run: + run: | sudo rm -rf /usr/share/dotnet sudo rm -rf /usr/local/lib/android - if: runner.os == 'macOS' name: Free disk space - run: + run: | df / -h sudo rm -rf "/Applications/Visual Studio.app" sudo rm -rf "/Applications/Visual Studio 2019.app" From 3950c6331dce94bb7ef9e9ed3a086da2db8d8bc1 Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Thu, 18 Jul 2024 21:26:50 +0000 Subject: [PATCH 28/28] remove -h --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9962e971..eea36822 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -37,11 +37,11 @@ jobs: - if: runner.os == 'macOS' name: Free disk space run: | - df / -h + df / sudo rm -rf "/Applications/Visual Studio.app" sudo rm -rf "/Applications/Visual Studio 2019.app" sudo rm -rf "/Users/runner/Library/Android/sdk" - df / -h + df / - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0