Skip to content

Commit

Permalink
wip: winlibs doesn't support cc_test... ?
Browse files Browse the repository at this point in the history
  • Loading branch information
0-Sacha committed Oct 27, 2024
1 parent ef333b5 commit 23d6a74
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/StreamFormat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ jobs:
with:
path: "~/.cache/bazel"
key: bazel
- name: Build And Test Winlibs/clang...
run: bazelisk test --config=winlibs-clang //:StreamFormatTests
- name: Build And Test Winlibs/gcc...
run: bazelisk test --config=winlibs-gcc //:StreamFormatTests
- name: Build Winlibs/clang...
run: bazelisk build --config=winlibs-clang //:StreamFormatTests
- name: Test Winlibs/clang...
run: bazel-bin/StreamFormatTests.exe
- name: Build Winlibs/gcc...
run: bazelisk build --config=winlibs-gcc //:StreamFormatTests

ubuntu-latest-gcc:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ cc_library(

cc_test(
name = "StreamFormatTests",
includes = [ "src/" ],
srcs = glob([ "Tests/**/*.h", "Tests/**/*.cpp" ]),
copts = select({
"@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"],
Expand Down
4 changes: 4 additions & 0 deletions Examples/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ common --incompatible_strict_action_env
common --show_timestamps
common --verbose_failures
test --test_output=errors

# Winlibs
common:winlibs-gcc --extra_toolchains=@ex_winlibs//:gcc-toolchain
common:winlibs-clang --extra_toolchains=@pthread-ex_winlibs//:clang-toolchain
9 changes: 4 additions & 5 deletions Examples/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ bazel_dep(name = "streamformat")

winlibs_toolchain_extension = use_extension("@bazel_winlibs//:rules.bzl", "winlibs_toolchain_extension")
inject_repo(winlibs_toolchain_extension, "platforms", "bazel_utilities")
winlibs_toolchain_extension.winlibs_toolchain(name = "winlibs")
winlibs_toolchain_extension.winlibs_toolchain(name = "pthread-winlibs", linklibs = [ "pthread" ])
use_repo(winlibs_toolchain_extension, "winlibs")
use_repo(winlibs_toolchain_extension, "pthread-winlibs")
# register_toolchains("@winlibs//:clang-toolchain")
winlibs_toolchain_extension.winlibs_toolchain(name = "ex_winlibs")
winlibs_toolchain_extension.winlibs_toolchain(name = "pthread-ex_winlibs", linklibs = [ "pthread" ])
use_repo(winlibs_toolchain_extension, "ex_winlibs")
use_repo(winlibs_toolchain_extension, "pthread-ex_winlibs")
1 change: 1 addition & 0 deletions Tests/Tests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#include "StreamFormat/Tester/TestSuite/AllTestSuite.h"
#include "StreamFormat/FLog/DefaultLogger.h"

int main()
{
Expand Down

0 comments on commit 23d6a74

Please sign in to comment.