Skip to content

Commit

Permalink
new clang/gcc bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
林濯 committed Mar 1, 2024
1 parent 03f5bbd commit ed048ca
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bazel
name: Bazel-Clang

on:
push:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/bazel_gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Bazel-GCC

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2


- name: Build
working-directory: ${{github.workspace}}
run: bazel build ...

- name: Test
working-directory: ${{github.workspace}}
run: bazel test --test_output=errors ...
8 changes: 8 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

package(default_visibility = ["//visibility:public"])

YA_LT_COPT = [
"-fcoroutines",
"-fno-tree-slp-vectorize", # -ftree-slp-vectorize with coroutine cause link error. disable it util gcc fix.
]

YA_BIN_COPT = [
"-fcoroutines",
"-fno-tree-slp-vectorize", # -ftree-slp-vectorize with coroutine cause link error. disable it util gcc fix.
Expand All @@ -17,6 +22,7 @@ cc_library(
"include/ylt/**/*.ipp",
"src/include/*.h",
]),
copts = YA_LT_COPT,
includes = [
"include",
"include/ylt",
Expand All @@ -34,6 +40,7 @@ cc_test(
"src/easylog/tests/main.cpp",
"src/easylog/tests/test_easylog.cpp",
],
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt/thirdparty",
Expand All @@ -47,6 +54,7 @@ cc_binary(
srcs = [
"src/easylog/benchmark/main.cpp",
],
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt/thirdparty",
Expand Down

0 comments on commit ed048ca

Please sign in to comment.