Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaileychess authored May 29, 2024
2 parents 9a34a73 + 0e034ec commit d8b657c
Show file tree
Hide file tree
Showing 243 changed files with 1,153 additions and 466 deletions.
1 change: 1 addition & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ platforms:
test_targets:
- "//..."
macos:
xcode_version: "14.3"
build_targets:
- "//..."
test_targets:
Expand Down
2 changes: 1 addition & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules
ts/node_modules
12 changes: 10 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# We cannot use "common" here because the "version" command doesn't support
# --deleted_packages. We need to specify it for both build and query instead.
build --deleted_packages=tests/ts/bazel_repository_test_dir
query --deleted_packages=tests/ts/bazel_repository_test_dir
build --deleted_packages=tests/bazel_repository_test_dir,tests/ts/bazel_repository_test_dir
query --deleted_packages=tests/bazel_repository_test_dir,tests/ts/bazel_repository_test_dir
# Point tools such as coursier (used in rules_jvm_external) to Bazel's internal JDK
# suggested in https://github.com/bazelbuild/rules_jvm_external/issues/445
common --repo_env=JAVA_HOME=../bazel_tools/jdk
common --action_env=JAVA_HOME=../bazel_tools/jdk
# Workaround "Error: need --enable_runfiles on Windows for to support rules_js"
common:windows --enable_runfiles
# Swift is not required on Windows
common:windows --deleted_packages=swift
65 changes: 37 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
pull_request:
branches:
- master
schedule:
# Run daily at 4:45 A.M. to catch dependencies that break us.
- cron: '45 4 * * *'

jobs:
build-linux:
Expand All @@ -21,10 +24,10 @@ jobs:
digests-gcc: ${{ steps.hash-gcc.outputs.hashes }}
digests-clang: ${{ steps.hash-clang.outputs.hashes }}
name: Build Linux
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13, clang++-15]
cxx: [g++-13, clang++-18]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -53,7 +56,7 @@ jobs:
with:
files: Linux.flatc.binary.${{ matrix.cxx }}.zip
- name: Generate SLSA subjects - clang
if: matrix.cxx == 'clang++-15' && startsWith(github.ref, 'refs/tags/')
if: matrix.cxx == 'clang++-18' && startsWith(github.ref, 'refs/tags/')
id: hash-clang
run: echo "hashes=$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" >> $GITHUB_OUTPUT
- name: Generate SLSA subjects - gcc
Expand All @@ -63,27 +66,27 @@ jobs:

build-linux-no-file-tests:
name: Build Linux with -DFLATBUFFERS_NO_FILE_TESTS
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: cmake
run: CXX=clang++-15 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CXX_FLAGS="-DFLATBUFFERS_NO_FILE_TESTS" .
run: CXX=clang++-18 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CXX_FLAGS="-DFLATBUFFERS_NO_FILE_TESTS" .
- name: build
run: make -j
- name: test
run: ./flattests

build-linux-out-of-source:
name: Build Linux with out-of-source build location
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: make build directory
run: mkdir build
- name: cmake
working-directory: build
run: >
CXX=clang++-15 cmake .. -G "Unix Makefiles" -DFLATBUFFERS_STRICT_MODE=ON
CXX=clang++-18 cmake .. -G "Unix Makefiles" -DFLATBUFFERS_STRICT_MODE=ON
-DFLATBUFFERS_BUILD_CPP17=ON -DFLATBUFFERS_CPP_STD=17
- name: build
working-directory: build
Expand All @@ -97,15 +100,15 @@ jobs:

build-linux-cpp-std:
name: Build Linux C++
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
std: [11, 14, 17, 20, 23]
cxx: [g++-13, clang++-15]
cxx: [g++-13, clang++-18]
exclude:
# Clang++15 10.3.0 stdlibc++ doesn't fully support std 23
- cxx: clang++-15
- cxx: clang++-18
std: 23

steps:
Expand Down Expand Up @@ -220,11 +223,11 @@ jobs:
outputs:
digests: ${{ steps.hash.outputs.hashes }}
name: Build Mac (for Intel)
runs-on: macos-latest
runs-on: macos-latest-large
steps:
- uses: actions/checkout@v3
- name: cmake
run: cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON .
run: cmake -G "Xcode" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON .
- name: build
run: xcodebuild -toolchain clang -configuration Release -target flattests
- name: check that the binary is x86_64
Expand Down Expand Up @@ -302,7 +305,7 @@ jobs:

build-android:
name: Build Android (on Linux)
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: set up Java
Expand All @@ -321,10 +324,10 @@ jobs:

build-generator:
name: Check Generated Code
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13, clang++-15]
cxx: [g++-13, clang++-18]
steps:
- uses: actions/checkout@v3
- name: cmake
Expand Down Expand Up @@ -352,7 +355,7 @@ jobs:

build-benchmarks:
name: Build Benchmarks (on Linux)
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13]
Expand All @@ -370,7 +373,7 @@ jobs:

build-java:
name: Build Java
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: test
Expand All @@ -383,6 +386,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
# Force Xcode 14.3 since Xcode 15 doesnt support older versions of
# kotlin. For Xcode 15, kotlin should be bumpped to 1.9.10
# https://stackoverflow.com/a/77150623
- name: Set up Xcode version
run: sudo xcode-select -s /Applications/Xcode_14.3.app/Contents/Developer
- uses: gradle/[email protected]
- uses: actions/setup-java@v3
with:
Expand All @@ -399,7 +407,7 @@ jobs:

build-kotlin-linux:
name: Build Kotlin Linux
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -422,7 +430,7 @@ jobs:

build-rust-linux:
name: Build Rust Linux
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: test
Expand All @@ -440,7 +448,7 @@ jobs:

build-python:
name: Build Python
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -452,7 +460,7 @@ jobs:

build-go:
name: Build Go
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -464,7 +472,7 @@ jobs:

build-php:
name: Build PHP
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -478,7 +486,8 @@ jobs:
build-swift:
name: Build Swift
runs-on: ubuntu-22.04-64core
# Only 22.04 has swift at the moment https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L30
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: test
Expand All @@ -489,7 +498,7 @@ jobs:
build-swift-wasm:
name: Build Swift Wasm
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
container:
image: ghcr.io/swiftwasm/carton:0.15.3
steps:
Expand All @@ -502,7 +511,7 @@ jobs:

build-ts:
name: Build TS
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -520,7 +529,7 @@ jobs:
build-dart:
name: Build Dart
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
Expand All @@ -535,7 +544,7 @@ jobs:

build-nim:
name: Build Nim
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -554,7 +563,7 @@ jobs:
needs: [build-linux, build-windows, build-mac-intel, build-mac-universal]
outputs:
digests: ${{ steps.hash.outputs.digests }}
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- name: Merge results
id: hash
Expand Down
49 changes: 48 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
# For manual tests.
workflow_dispatch:
release:
types: [created]
types: [published]

jobs:
publish-npm:
Expand Down Expand Up @@ -100,6 +100,53 @@ jobs:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

publish-maven-kotlin:
name: Publish Maven - Kotlin
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./kotlin
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE # this needs to be an env var

- name: Publish Kotlin Library on Maven
run: ./gradlew publishAllPublicationsToSonatypeRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}


publish-crates:
name: Publish crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Publish Flatbuffers
uses: katyo/publish-crates@v2
with:
path: ./rust/flatbuffers
registry-token: ${{ secrets.CARGO_TOKEN }}

- name: Publish Flexbuffers
uses: katyo/publish-crates@v2
with:
path: ./rust/flexbuffers
registry-token: ${{ secrets.CARGO_TOKEN }}
13 changes: 4 additions & 9 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

licenses(["notice"])
Expand All @@ -8,13 +6,6 @@ package(
default_visibility = ["//visibility:public"],
)

npm_link_all_packages(name = "node_modules")

npm_link_package(
name = "node_modules/flatbuffers",
src = "//ts:flatbuffers",
)

exports_files([
"LICENSE",
"tsconfig.json",
Expand All @@ -37,9 +28,13 @@ config_setting(
filegroup(
name = "distribution",
srcs = [
".bazelignore",
".npmrc",
"BUILD.bazel",
"WORKSPACE",
"build_defs.bzl",
"package.json",
"pnpm-lock.yaml",
"typescript.bzl",
"//grpc/src/compiler:distribution",
"//reflection:distribution",
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All major or breaking changes will be documented in this file, as well as any
new features that should be highlighted. Minor fixes or improvements are not
necessarily listed.

## [24.3.25] (March 25 2024)(https://github.com/google/flatbuffers/releases/tag/v24.3.25)

* Fixed license metadata parsing (#8253)
* [C++] Allow string_view in `LookUpByKey` in addition to null-terminated c-style strings (#8203)

## [24.3.7] (March 7 2024)(https://github.com/google/flatbuffers/releases/tag/v24.3.7)

* Just to fix some of the CI build issues from the 24.3.6 release.

## [24.3.6] (March 6 2024)(https://github.com/google/flatbuffers/releases/tag/v24.3.6)

* Fix typescript object API to allow 0 values for null-default scalars (#7864)

## [23.5.26 (May 26 2023)](https://github.com/google/flatbuffers/releases/tag/v23.5.26)

* Mostly bug fixing for 64-bit support
Expand Down
Loading

0 comments on commit d8b657c

Please sign in to comment.