Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ matrix:
- 7.x
- 8.x
platform:
- ubuntu2404
- macos
- debian11
- ubuntu2404
- macos
- windows
tasks:
verify_targets:
name: Verify build targets
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,48 @@ jobs:
os: [ubuntu-latest]
bazel_mode: [bzlmod, workspace]
compiler: [gcc]
gcc_version: [11, 12, 13]
gcc_version: [11, 12, 13, 14]
bazel_config: [cpp23, opt]
proto_version: ['30.0']
exclude:
- bazel_mode: workspace
gcc_version: 11
- bazel_mode: workspace
gcc_version: 13
- bazel_mode: workspace
gcc_version: 14
- bazel_config: cpp23
gcc_version: 11
- bazel_config: cpp23
gcc_version: 12
- bazel_config: cpp23
gcc_version: 13

uses: ./.github/workflows/test.yml
with:
os: ${{ matrix.os }}
bazel_mode: ${{ matrix.bazel_mode }}
compiler: ${{ matrix.compiler }}
gcc_version: ${{ matrix.gcc_version }}
bazel_config: ${{ matrix.bazel_config }}
module_version: "proto${{ matrix.proto_version }}"
module_default: proto30.0

test-windows:
needs: pre-commit
secrets: inherit
strategy:
matrix:
os: [windows-latest]
bazel_mode: [bzlmod]
compiler: [mingw, native]
gcc_version: ['']
bazel_config: [opt]
proto_version: ['30.0']

uses: ./.github/workflows/test.yml
with:
continue-on-error: true
os: ${{ matrix.os }}
bazel_mode: ${{ matrix.bazel_mode }}
compiler: ${{ matrix.compiler }}
Expand Down Expand Up @@ -155,7 +182,7 @@ jobs:
module_default: proto30.0

done:
needs: [pre-commit, test-gcc, test-clang, test-bcr]
needs: [pre-commit, test-bcr, test-clang, test-gcc, test-windows]
runs-on: ubuntu-latest
steps:
- name: Done
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- uses: egor-tensin/setup-mingw@v2
if: ${{inputs.compiler == 'mingw' && startsWith(inputs.os, 'windows')}}
with:
platform: ${{runner.arch}}
- uses: egor-tensin/setup-gcc@v1
if: ${{inputs.compiler == 'gcc' && inputs.gcc_version != ''}}
if: ${{inputs.compiler == 'gcc' && inputs.gcc_version != '' && !startsWith(inputs.os, 'windows')}}
with:
version: ${{inputs.gcc_version}}
platform: ${{runner.arch}}

- uses: actions/cache/restore@v4
id: cache_restore
with:
Expand All @@ -81,7 +84,9 @@ jobs:
${{env.CACHE_KEY_PREFIX}}-refs/heads/main
${{env.CACHE_KEY_PREFIX}}


- name: Build and Test
shell: bash
run: |
if [ "${{inputs.compiler}}:${{inputs.gcc_version}}" == "gcc:" ]; then
echo "ERROR: When compiler=='gcc', then a valid 'compiler_version' must be given."
Expand Down Expand Up @@ -114,7 +119,7 @@ jobs:
elif [ "${{inputs.compiler}}" == "gcc" ]; then
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++
elif [ "${{inputs.compiler}}" == "native" ]; then
elif [ "${{inputs.compiler}}" == "mingw" ] || [ "${{inputs.compiler}}" == "native" ]; then
# Use whatever is found!
[ -n "${CC}" ] && [ -x "${CC}" ] && echo "CC: $(${CC} --version)"
[ -n "${CXX}" ] && [ -x "${CXX}" ] && echo "CXX: $(${CXX} --version)"
Expand Down Expand Up @@ -149,7 +154,7 @@ jobs:
key: ${{env.CACHE_KEY_PREFIX}}-${{github.ref}}-${{github.sha}}

- name: Cleanup old caches
if: ${{!startsWith(github.ref, 'refs/tags/') && steps.cache_restore.outputs.cache-hit}}
if: ${{!startsWith(github.ref, 'refs/tags/') && steps.cache_restore.outputs.cache-hit && !startsWith(inputs.os, 'windows')}}
run: |
set -euo pipefail
PREFIX="${{env.CACHE_KEY_PREFIX}}-${{github.ref}}"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 1.2.1

* Added windows and new gcc versions to release checks.

# 1.2.0

* Added std::optional variants for file reading.
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
This package contains a collection of utilities around Google's [Protocolbuffer](https://github.com/protocolbuffers/protobuf). The functions offered in this packages are widely used across Google's C++ code base and have saved tens of thousands of engineering hours. Some of these functons were originally implemented by the author and later re-implemented or cloned (see below).

The project works with Google's proto library version 27, 28, 29 and 30. Packages are available at [Bazel Central Registry](https://registry.bazel.build/modules/helly25_proto) and [Github](https://github.com/helly25/proto/releases).
The project works with:
* Google's proto library version 27, 28, 29, 30
* Operating system: MacOS, Ubuntu, Windows
* Compiler: GCC [11, 14], Clang [17.0.4, 20.1.0]

Packages are available at [Bazel Central Registry](https://registry.bazel.build/modules/helly25_proto) and [Github](https://github.com/helly25/proto/releases).

[![Test](https://github.com/helly25/proto/actions/workflows/main.yml/badge.svg)](https://github.com/helly25/proto/actions/workflows/main.yml)

Expand Down
22 changes: 1 addition & 21 deletions bazelmod/llvm.20.1.0.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

bazel_dep(name = "toolchains_llvm", version = "1.3.0")
git_override(
module_name = "toolchains_llvm",
commit = "e831f94a8b7f3a39391f5822adcab8e4d443c03b", # Add more tools by default (#463)
remote = "https://github.com/bazel-contrib/toolchains_llvm",
)
bazel_dep(name = "toolchains_llvm", version = "1.4.0")

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(
name = "llvm_toolchain_llvm",
llvm_version = "20.1.0",
sha256 = {
"darwin-aarch64": "2c42ec26ec50c4bf8b95585f762b9d2f5b385d170dee772d9c1d6c9a7190dcef",
"linux-aarch64": "9d1bbf3f6d4d011e3b8b4b585f686bc968474917f37d3b82b4a534f456168c67",
"linux-x86_64": "954ac51498519f6ed9540714fb04bc401f70039b296a8160dd1559be380788d7",
},
strip_prefix = {
"darwin-aarch64": "LLVM-20.1.0-macOS-ARM64",
"linux-aarch64": "LLVM-20.1.0-Linux-ARM64",
"linux-x86_64": "LLVM-20.1.0-Linux-X64",
},
urls = {
"darwin-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.0/LLVM-20.1.0-macOS-ARM64.tar.xz"],
"linux-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.0/LLVM-20.1.0-Linux-ARM64.tar.xz"],
"linux-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.0/LLVM-20.1.0-Linux-X64.tar.xz"],
},
)
use_repo(llvm, "llvm_toolchain_llvm")

Expand Down
7 changes: 1 addition & 6 deletions bazelmod/llvm.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

bazel_dep(name = "toolchains_llvm", version = "1.3.0")
git_override(
module_name = "toolchains_llvm",
commit = "e831f94a8b7f3a39391f5822adcab8e4d443c03b", # Add more tools by default (#463)
remote = "https://github.com/bazel-contrib/toolchains_llvm",
)
bazel_dep(name = "toolchains_llvm", version = "1.4.0")

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(
Expand Down
Loading