Add bazel builds and test to Github-CI.

This commit is contained in:
Andre Vehreschild 2022-04-20 09:16:56 +02:00
parent acb495599e
commit fa744bbbe2
2 changed files with 24 additions and 1 deletions

View File

@ -39,3 +39,26 @@ jobs:
- name: Test
shell: bash
run: cd build && ctest --output-on-failure
bz-build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Build
shell: bash
run: |
cd "${{ github.workspace }}"
bazel build '//:yaml-cpp'
- name: Test
shell: bash
run: |
cd "${{ github.workspace }}"
# For some reason 'bazel test //test:test' gets the first / stripped on windows in CI.
# Therefore use this ugly version, which is working on all platforms.
bazel test test

View File

@ -1,6 +1,6 @@
yaml_cpp_defines = select({
# On Windows, ensure static linking is used.
"@envoy//bazel:windows_x86_64": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],
"@platforms//os:windows": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],
"//conditions:default": [],
})