From 1cefd94d560cb1d6e5c9817a471fada2f6c5b2a5 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sat, 16 Oct 2021 10:25:48 +0000 Subject: [PATCH] build: add windows build to CI (#3212) Refs: https://github.com/libuv/libuv/issues/3325 Signed-off-by: Darshan Sen --- .github/workflows/CI.yml | 30 ++++++++++++++++++++++ test/test-tty-escape-sequence-processing.c | 10 ++++++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c38412344a0..9b4afa99eda 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,6 +3,36 @@ name: CI on: [push, pull_request] jobs: + build-windows: + runs-on: windows-${{ matrix.config.server }} + name: build-${{ matrix.config.toolchain}}-${{ matrix.config.arch}} + strategy: + fail-fast: false + matrix: + config: + - {toolchain: Visual Studio 15 2017, arch: Win32, server: 2016} + - {toolchain: Visual Studio 15 2017, arch: x64, server: 2016} + - {toolchain: Visual Studio 16 2019, arch: Win32, server: 2019} + - {toolchain: Visual Studio 16 2019, arch: x64, server: 2019} + - {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022} + - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022} + steps: + - uses: actions/checkout@v2 + - name: Envinfo + run: npx envinfo + - name: Build + shell: cmd + run: | + mkdir -p build + cd build + cmake .. -DBUILD_TESTING=ON -G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }} + cmake --build . + - name: Test + shell: cmd + run: | + cd build + ctest -C Debug --output-on-failure + build-android: runs-on: ubuntu-latest container: reactnativecommunity/react-native-android:2020-5-20 diff --git a/test/test-tty-escape-sequence-processing.c b/test/test-tty-escape-sequence-processing.c index c19ccb5cb1c..5f04291d244 100644 --- a/test/test-tty-escape-sequence-processing.c +++ b/test/test-tty-escape-sequence-processing.c @@ -1070,6 +1070,11 @@ TEST_IMPL(tty_set_style) { WORD attr; int i, length; +#if _MSC_VER >= 1920 && _MSC_VER <= 1929 + RETURN_SKIP("Broken on Microsoft Visual Studio 2019, to be investigated. " + "See: https://github.com/libuv/libuv/issues/3304"); +#endif + loop = uv_default_loop(); initialize_tty(&tty_out); @@ -1348,6 +1353,11 @@ TEST_IMPL(tty_escape_sequence_processing) { struct captured_screen actual = {0}, expect = {0}; int dir; +#if _MSC_VER >= 1920 && _MSC_VER <= 1929 + RETURN_SKIP("Broken on Microsoft Visual Studio 2019, to be investigated. " + "See: https://github.com/libuv/libuv/issues/3304"); +#endif + loop = uv_default_loop(); initialize_tty(&tty_out);