From a89997d8145e5fc1a9a1ccc25caa99d43f58c32c Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Sun, 22 Dec 2024 17:37:27 -0800 Subject: [PATCH] Add a windows CI. --- .bazelrc | 5 +++-- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index 1dc2f02..ab39c48 100644 --- a/.bazelrc +++ b/.bazelrc @@ -12,8 +12,8 @@ build --features=parse_headers build --cxxopt=-std=c++23 --host_cxxopt=-std=c++23 build --cxxopt=-xc++ --host_cxxopt=-xc++ build --cxxopt=-Wall --host_cxxopt=-Wall -build --cxxopt=-Wextra --host_cxxopt=-Wextra -build --cxxopt=-Wno-unused-parameter --host_cxxopt=-Wno-unused-parameter +#build --cxxopt=-Wextra --host_cxxopt=-Wextra +#build --cxxopt=-Wno-unused-parameter --host_cxxopt=-Wno-unused-parameter # Avoid costly language features. build --cxxopt=-fno-exceptions --host_cxxopt=-fno-exceptions @@ -29,6 +29,7 @@ build --enable_platform_specific_config build:macos --macos_minimum_os=10.15 build:macos --features=-supports_dynamic_linker build:macos --cxxopt=-std=c++2b --host_cxxopt=-std=c++2b +common:windows --compiler=clang-cl --cxxopt=/std:c++23 --host_cxxopt=/std:c++23 --client_env=BAZEL_CXXOPTS=/std:c++23 # Print out test log on failure. test --test_output=errors diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da7f49c..9c4daad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,28 @@ jobs: bazel-bin/bant/bant -V # Print version # TODO: package ? + WindowsBuild: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + choco install llvm --allow-downgrade --version=17.0.6 + + - name: Test + run: | + bazel test --noshow_progress --keep_going ... + + - name: Build + run: | + bazel build --noshow_progress -c opt bant:bant + bazel-bin/bant/bant -V # Print version + # TODO: package ? + CodeFormatting: runs-on: ubuntu-24.04 steps: