comparison third_party/libuv/.github/workflows/CI-win.yml @ 160:948de3f54cea

[ThirdParty] Added libuv
author June Park <parkjune1995@gmail.com>
date Wed, 14 Jan 2026 19:39:52 -0800
parents
children
comparison
equal deleted inserted replaced
159:05cf9467a1c3 160:948de3f54cea
1 name: CI-win
2
3 on:
4 pull_request:
5 paths:
6 - '**'
7 - '!docs/**'
8 - '!src/unix/**'
9 - '!.**'
10 - '.github/workflows/CI-win.yml'
11 push:
12 branches:
13 - v[0-9].*
14 - master
15
16 jobs:
17 build-windows:
18 runs-on: windows-${{ matrix.config.server }}
19 name: build-${{ join(matrix.config.*, '-') }}
20 strategy:
21 fail-fast: false
22 matrix:
23 config:
24 - {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022}
25 - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022}
26 - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: ASAN}
27 - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: UBSAN}
28 - {toolchain: Visual Studio 17 2022, arch: arm64, server: 2022}
29 - {toolchain: Visual Studio 17 2022, arch: x64, server: 2025}
30 steps:
31 - uses: actions/checkout@v4
32 - name: Build
33 run:
34 cmake -S . -B build -DBUILD_TESTING=ON
35 -G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }}
36 ${{ matrix.config.config == 'ASAN' && '-DASAN=on -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' || '' }}
37
38 cmake --build build --config RelWithDebInfo
39
40 ${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.exe" -Destination "build\\RelWithDebInfo\\"' || '' }}
41
42 ${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.dll" -Destination "build\\RelWithDebInfo\\"' || '' }}
43
44 ls -l build
45
46 ls -l build\\RelWithDebInfo
47 - name: platform_output_a
48 if: ${{ matrix.config.arch != 'arm64' }}
49 shell: cmd
50 run:
51 build\\RelWithDebInfo\\uv_run_tests_a.exe platform_output
52 - name: platform_output
53 if: ${{ matrix.config.arch != 'arm64' }}
54 shell: cmd
55 run:
56 build\\RelWithDebInfo\\uv_run_tests.exe platform_output
57 - name: Test
58 # only valid with libuv-master with the fix for
59 # https://github.com/libuv/leps/blob/master/005-windows-handles-not-fd.md
60 if: ${{ matrix.config.config != 'ASAN' && matrix.config.arch != 'arm64' }}
61 shell: cmd
62 run:
63 cd build
64
65 ctest -C RelWithDebInfo -V
66 - name: Test only static
67 if: ${{ matrix.config.config == 'ASAN' && matrix.config.arch != 'arm64' }}
68 shell: cmd
69 run:
70 build\\RelWithDebInfo\\uv_run_tests_a.exe
71
72 build-mingw:
73 runs-on: ubuntu-latest
74 name: build-mingw-${{ matrix.config.arch }}
75 strategy:
76 fail-fast: false
77 matrix:
78 config:
79 - {arch: i686, server: 2022, libgcc: dw2 }
80 - {arch: x86_64, server: 2022, libgcc: seh }
81 steps:
82 - uses: actions/checkout@v4
83 - name: Install mingw32 environment
84 run: |
85 sudo apt update
86 sudo apt install mingw-w64 ninja-build -y
87 - name: Build
88 run: |
89 cmake -S . -B build -G Ninja -DHOST_ARCH=${{ matrix.config.arch }} -DBUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=cmake-toolchains/cross-mingw32.cmake
90 cmake --build build
91 cmake --install build --prefix "`pwd`/build/usr"
92 mkdir -p build/usr/test build/usr/bin
93 cp -av test/fixtures build/usr/test
94 cp -av build/uv_run_tests_a.exe build/uv_run_tests.exe build/uv_run_tests_a_no_ext build/uv_run_tests_no_ext \
95 `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libgcc_s_${{ matrix.config.libgcc }}-1.dll` \
96 `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libwinpthread-1.dll` \
97 `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libatomic-1.dll` \
98 build/usr/bin
99 - name: Upload build artifacts
100 uses: actions/upload-artifact@v4
101 with:
102 name: mingw-${{ matrix.config.arch }}
103 path: build/usr/**/*
104 retention-days: 2
105
106 test-mingw:
107 runs-on: windows-${{ matrix.config.server }}
108 name: test-mingw-${{ matrix.config.arch }}
109 needs: build-mingw
110 strategy:
111 fail-fast: false
112 matrix:
113 config:
114 - {arch: i686, server: 2022}
115 - {arch: x86_64, server: 2022}
116 steps:
117 - name: Download build artifacts
118 uses: actions/download-artifact@v4
119 with:
120 name: mingw-${{ matrix.config.arch }}
121 - name: Test
122 shell: cmd
123 run: |
124 bin\uv_run_tests_a.exe
125 - name: Test
126 shell: cmd
127 run: |
128 bin\uv_run_tests.exe