mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-01 12:33:57 +08:00
Bazel: general improvements. (#1043)
* Bazel: general improvements. Improve the Bazel build. Attempt to fix previous errors recorded while trying to publish ftxui in the Bazel Central Registry: - https://github.com/bazelbuild/bazel-central-registry/pull/4485 - https://buildkite.com/bazel/bcr-presubmit/builds/13601#01968b61-f5b2-4d16-94d0-c87a03a1a23b Test against "recent" platforms ------------------------------- Previously, I got the error: ``` gcc: error: unrecognized command line option '-std-c++20'; did you mean '-std-c++2a'? ``` This was due to using old distribution like ubuntu 2004. Test against newer platforms only to avoid GCC version<-9.x.y Downgrade gtest version. ------------------------ I suspect this caused the Bazel Central Registry error: ``` file:///workdir/modules/googletest/1.15.2/MODULE.bazel:68:20: name 'use_repo_rule' is not defined ``` Specifying using bazelmod fixes the issue. Thanks @robinlinden Tag gtest as dev_dependency --------------------------- Presumably, this should avoid dependants to fetch it? Enable --features-layering_check -------------------------------- Aka clang `-Wprivate-header`. Fix the encountered errors. Use clang in the CI ------------------- The CI was defining clang/gcc in the matrix, but was not using it. Fix the bug.
This commit is contained in:
@@ -1,21 +1,36 @@
|
||||
matrix:
|
||||
platform:
|
||||
- centos7
|
||||
- debian10
|
||||
- ubuntu2004
|
||||
- macos
|
||||
- windows
|
||||
bazel: [6.x, 7.x, 8.x]
|
||||
bazel:
|
||||
- 7.x
|
||||
- 8.x
|
||||
- rolling
|
||||
unix_platform:
|
||||
- debian11
|
||||
- ubuntu2204
|
||||
- macos
|
||||
- macos_arm64
|
||||
win_platform:
|
||||
- windows
|
||||
|
||||
tasks:
|
||||
verify_targets:
|
||||
name: Build and test.
|
||||
platform: ${{ platform }}
|
||||
|
||||
unix_test:
|
||||
name: Verify build targets on Unix
|
||||
platform: ${{ unix_platform }}
|
||||
bazel: ${{ bazel }}
|
||||
build_flags:
|
||||
- --cxxopt=-std=c++20
|
||||
build_targets:
|
||||
- '@ftxui//:ftxui'
|
||||
- '@ftxui//:screen'
|
||||
- '@ftxui//:dom'
|
||||
- '@ftxui//:component'
|
||||
test_targets:
|
||||
- '@ftxui//:tests'
|
||||
- '@ftxui//:screen'
|
||||
|
||||
windows_test:
|
||||
name: Verify build targets
|
||||
platform: ${{ win_platform }}
|
||||
bazel: ${{ bazel }}
|
||||
build_flags:
|
||||
- --cxxopt=/std:c++20
|
||||
build_targets:
|
||||
- '@ftxui//:dom'
|
||||
- '@ftxui//:component'
|
||||
- '@ftxui//:screen'
|
||||
|
Reference in New Issue
Block a user