Skip to content

Commit e20d07e

Browse files
committed
chore: sync with ecsact_common
1 parent b614711 commit e20d07e

File tree

8 files changed

+119
-11
lines changed

8 files changed

+119
-11
lines changed

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.3.2

.github/workflows/bzlmod-archive.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is maintained by ecsact-dev/ecsact_common
2+
# If changes are required please make them there
3+
4+
name: bzlmod archive
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
bzlmod-archive:
12+
uses: ecsact-dev/bazel_registry/.github/workflows/bzlmod-archive.yml@main
13+
secrets: inherit
14+
permissions:
15+
contents: write

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This file is maintained by ecsact-dev/ecsact_common
2+
# If changes are required please make them there
3+
4+
name: main
5+
6+
on:
7+
push:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
formatting-check:
13+
name: Formatting Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: jidicula/[email protected]
18+
with: { clang-format-version: "16" }
19+
20+
test-windows:
21+
runs-on: windows-latest
22+
steps:
23+
- uses: actions/cache@v3
24+
with:
25+
path: |
26+
/Users/runneradmin/AppData/Local/bazelisk
27+
/Users/runneradmin/.cache/bazel-disk-cache
28+
key: ${{runner.os}}-bazel-cache
29+
- uses: actions/checkout@v4
30+
- run: bazelisk build --config=ci //...
31+
- if: ${{ hashfiles('test/MODULE.bazel') != '' }}
32+
run: bazelisk test --config=ci ...
33+
working-directory: test
34+
35+
test-linux:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/cache@v3
39+
with:
40+
path: |
41+
~/.cache/bazelisk
42+
~/.cache/bazel-disk-cache
43+
key: ${{runner.os}}-bazel-cache
44+
- uses: actions/checkout@v4
45+
- run: bazelisk build --config=ci //...
46+
- if: ${{ hashfiles('test/MODULE.bazel') != '' }}
47+
run: bazelisk test --config=ci ...
48+
working-directory: test

bazel/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config_setting(
2+
name = "compiler_emscripten",
3+
flag_values = {"@bazel_tools//tools/cpp:compiler": "emscripten"},
4+
)

bazel/common.bazelrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
startup --windows_enable_symlinks
2+
common --enable_bzlmod
3+
common --registry=https://raw.githubusercontent.com/ecsact-dev/bazel_registry/main
4+
common --registry=https://raw.githubusercontent.com/bazelboost/registry/main
5+
common --registry=https://bcr.bazel.build
6+
build --enable_platform_specific_config
7+
build --incompatible_use_platforms_repo_for_constraints
8+
build --incompatible_enable_cc_toolchain_resolution
9+
build --incompatible_strict_action_env
10+
build --enable_runfiles
11+
build --noincompatible_remove_rule_name_parameter
12+
query --noincompatible_remove_rule_name_parameter
13+
14+
# Temporary until https://github.com/grailbio/bazel-toolchain/pull/198 is merged
15+
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
16+
17+
common:ci --announce_rc
18+
common:ci --verbose_failures
19+
common:ci --keep_going
20+
common:ci --disk_cache=~/.cache/bazel-disk-cache

bazel/copts.bzl

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
"""
2-
"""
1+
load("@bazel_skylib//lib:selects.bzl", "selects")
32

4-
copts = select({
5-
"@bazel_tools//tools/cpp:msvc": ["/std:c++20", "/Zc:preprocessor", "/permissive-", "/diagnostics:caret"],
6-
"//conditions:default": ["-std=c++20"],
3+
# Ecsact repositories currently only support clang, cl, and emscripten
4+
copts = selects.with_or({
5+
(Label("//bazel:compiler_emscripten")): [
6+
"-std=c++20",
7+
],
8+
("@rules_cc//cc/compiler:clang"): [
9+
"-std=c++2b",
10+
"-fexperimental-library",
11+
],
12+
("@rules_cc//cc/compiler:msvc-cl", "@rules_cc//cc/compiler:clang-cl"): [
13+
"/std:c++latest",
14+
"/permissive-",
15+
"/Zc:preprocessor",
16+
],
717
})

cog.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pre_bump_hooks = [
2+
# Ecsact pre 1.0.0 the 0.X.0 is our 'major' version
3+
"buildozer 'set version {{version}}' 'set compatibility_level {{version.minor}}' //MODULE.bazel:%module",
4+
]
5+
6+
post_bump_hooks = [
7+
"git push",
8+
"git push origin {{version}}",
9+
"gh release create {{version}} --generate-notes --latest -t {{version}} --verify-tag",
10+
]

renovate.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"github>ecsact-dev/renovate-config"
5-
]
6-
}
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>ecsact-dev/renovate-config"
5+
]
6+
}

0 commit comments

Comments
 (0)