mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
[go] tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs. (#6388)
* tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs. Calling flags.Parse() within init() races with other packages which register flags in their init(), and in particular with the testing package itself. It is more reliable to call flags.Parse() from a TestMain implementation. See https://github.com/golang/go/issues/31859, https://github.com/golang/go/issues/33869. * .github: Enable build-go action in build.yaml workflow.
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -149,17 +149,17 @@ jobs:
|
||||
working-directory: tests
|
||||
run: bash PythonTest.sh
|
||||
|
||||
#build-go:
|
||||
# name: Build Go
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v1
|
||||
# - name: flatc
|
||||
# # FIXME: make test script not rely on flatc
|
||||
# run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j4
|
||||
# - name: test
|
||||
# working-directory: tests
|
||||
# run: bash GoTest.sh
|
||||
build-go:
|
||||
name: Build Go
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: flatc
|
||||
# FIXME: make test script not rely on flatc
|
||||
run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j4
|
||||
- name: test
|
||||
working-directory: tests
|
||||
run: bash GoTest.sh
|
||||
|
||||
#build-csharp:
|
||||
# name: Build CSharp
|
||||
|
||||
Reference in New Issue
Block a user