-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to bazelmod and use bazelrc to specify the ci configuration
- Loading branch information
Showing
7 changed files
with
70 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
############################################################################### | ||
# Common flags that apply to all configurations. | ||
# Use sparingly for things common to all compilers and platforms. | ||
############################################################################### | ||
|
||
# Enable Bzlmod for every Bazel command | ||
common --enable_bzlmod | ||
|
||
# Prevent invalid caching if input files are modified during a build. | ||
build --experimental_guard_against_concurrent_changes | ||
|
||
############################################################################### | ||
# Options for continuous integration. | ||
############################################################################### | ||
|
||
# Speedup bazel using a ramdisk. | ||
build:ci --sandbox_base=/dev/shm | ||
|
||
# Show as many errors as possible. | ||
build:ci --keep_going | ||
|
||
# Show subcommands when building | ||
build:ci --subcommands=true | ||
|
||
# Make sure we test for C99 compliance when building the library | ||
build:ci --conlyopt=-std=c99 | ||
|
||
# Show test errors. | ||
test:ci --test_output=errors | ||
|
||
############################################################################### | ||
|
||
# The user.bazelrc file is not checked in but available for local mods. | ||
# Always keep this at the end of the file so that user flags override. | ||
try-import %workspace%/user.bazelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ out/ | |
|
||
# Bazel artifacts | ||
**/bazel-* | ||
MODULE.bazel.lock | ||
|
||
# Per-user bazelrc files | ||
user.bazelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
############################################################################### | ||
# Bazel now uses Bzlmod by default to manage external dependencies. | ||
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. | ||
# | ||
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 | ||
############################################################################### | ||
|
||
CPU_FEATURES_VERSION = "0.9.0" | ||
|
||
module( | ||
name = "cpu_features", | ||
repo_name = "com_google_cpufeatures", | ||
version = CPU_FEATURES_VERSION, | ||
) | ||
|
||
bazel_dep(name = "bazel_skylib", version = "1.7.1") | ||
bazel_dep(name = "googletest", version = "1.15.2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,4 @@ | ||
workspace(name = "com_google_cpufeatures") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") | ||
|
||
git_repository( | ||
name = "com_google_googletest", | ||
tag = "release-1.11.0", | ||
remote = "https://github.com/google/googletest.git", | ||
) | ||
# This file marks the root of the Bazel workspace. | ||
# See MODULE.bazel for external dependencies setup. | ||
|
||
git_repository( | ||
name = "bazel_skylib", | ||
tag = "1.2.0", | ||
remote = "https://github.com/bazelbuild/bazel-skylib.git", | ||
) | ||
|
||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") | ||
|
||
bazel_skylib_workspace() | ||
workspace(name = "com_google_cpufeatures") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters