Skip to content

Commit f457ba1

Browse files
authored
chore: use c++20 and add llvm toolchain for linux ci tests (#184)
1 parent 49e9601 commit f457ba1

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
test-windows:
2121
runs-on: windows-latest
2222
steps:
23+
- name: Ecsact SDK
24+
uses: ecsact-dev/[email protected]
2325
- uses: actions/cache@v3
2426
with:
2527
path: |
@@ -35,6 +37,8 @@ jobs:
3537
test-linux:
3638
runs-on: ubuntu-latest
3739
steps:
40+
- name: Ecsact SDK
41+
uses: ecsact-dev/[email protected]
3842
- uses: actions/cache@v3
3943
with:
4044
path: |

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bazel_dep(name = "bazel_skylib", version = "1.4.2")
99
bazel_dep(name = "ecsact_runtime", version = "0.5.0")
1010
bazel_dep(name = "rules_ecsact", version = "0.4.8")
1111
bazel_dep(name = "ecsact_codegen", version = "0.1.2")
12+
bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True)
1213

1314
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
1415
git_override(
@@ -22,3 +23,9 @@ ecsact.sdk_toolchain(version = "0.6.2")
2223
use_repo(ecsact, "ecsact_sdk", "ecsact_toolchains")
2324

2425
register_toolchains("@ecsact_toolchains//:all")
26+
27+
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
28+
llvm.toolchain(llvm_version = "17.0.6")
29+
30+
use_repo(llvm, "llvm_toolchain")
31+
register_toolchains("@llvm_toolchain//:all", dev_dependency = True)

systems_header_codegen/systems_header_codegen.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static std::string make_package_inc_guard_str(ecsact_package_id package_id) {
5050
inc_guard_str.begin(),
5151
inc_guard_str.end(),
5252
inc_guard_str.begin(),
53-
std::toupper
53+
[](char c) { return static_cast<char>(std::toupper(c)); }
5454
);
5555

5656
inc_guard_str += "_H";

0 commit comments

Comments
 (0)