[pull] v1.x from libuv:v1.x #714
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI-win | |
| on: | |
| pull_request: | |
| paths: | |
| - '**' | |
| - '!docs/**' | |
| - '!src/unix/**' | |
| - '!.**' | |
| - '.github/workflows/CI-win.yml' | |
| push: | |
| branches: | |
| - v[0-9].* | |
| - master | |
| permissions: read-all | |
| jobs: | |
| build-windows: | |
| runs-on: windows-${{ matrix.config.server }} | |
| name: build-${{ join(matrix.config.*, '-') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022} | |
| - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022} | |
| - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: ASAN} | |
| - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: UBSAN} | |
| - {toolchain: Visual Studio 17 2022, arch: arm64, server: 2022} | |
| - {toolchain: Visual Studio 18 2026, arch: x64, server: 2025} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Build | |
| run: | |
| cmake -S . -B build -DBUILD_TESTING=ON | |
| -G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }} | |
| ${{ matrix.config.config == 'ASAN' && '-DASAN=on -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' || '' }} | |
| cmake --build build --config RelWithDebInfo | |
| ${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.exe" -Destination "build\\RelWithDebInfo\\"' || '' }} | |
| ${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.dll" -Destination "build\\RelWithDebInfo\\"' || '' }} | |
| ls -l build | |
| ls -l build\\RelWithDebInfo | |
| - name: platform_output_a | |
| if: ${{ matrix.config.arch != 'arm64' }} | |
| shell: cmd | |
| run: | |
| build\\RelWithDebInfo\\uv_run_tests_a.exe platform_output | |
| - name: platform_output | |
| if: ${{ matrix.config.arch != 'arm64' }} | |
| shell: cmd | |
| run: | |
| build\\RelWithDebInfo\\uv_run_tests.exe platform_output | |
| - name: Test | |
| # only valid with libuv-master with the fix for | |
| # https://github.com/libuv/leps/blob/master/005-windows-handles-not-fd.md | |
| if: ${{ matrix.config.config != 'ASAN' && matrix.config.arch != 'arm64' }} | |
| shell: cmd | |
| run: | |
| cd build | |
| ctest -C RelWithDebInfo -V | |
| - name: Test only static | |
| if: ${{ matrix.config.config == 'ASAN' && matrix.config.arch != 'arm64' }} | |
| shell: cmd | |
| run: | |
| build\\RelWithDebInfo\\uv_run_tests_a.exe | |
| - name: Test AppContainer | |
| if: ${{ matrix.config.arch != 'arm64' }} | |
| shell: cmd | |
| run: | |
| build\\RelWithDebInfo\\uv_run_appcontainer.exe build\\RelWithDebInfo\\${{ matrix.config.config == 'ASAN' && 'uv_run_tests_a.exe' || 'uv_run_tests.exe' }} | |
| build-mingw: | |
| # Note: Using ubuntu-26.04 early (before it becomes ubuntu-latest) | |
| # for access to a newer mingw for #5181. | |
| # Can change back to ubuntu-latest once it means 26.04 or later. | |
| runs-on: ubuntu-26.04 | |
| name: build-mingw-${{ matrix.config.arch }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {arch: i686, server: 2022, libgcc: dw2 } | |
| - {arch: x86_64, server: 2022, libgcc: seh } | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install mingw32 environment | |
| run: | | |
| sudo apt update | |
| sudo apt install mingw-w64 ninja-build -y | |
| - name: Build | |
| run: | | |
| cmake -B build -G Ninja -DHOST_ARCH=${{ matrix.config.arch }} -DBUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=cmake-toolchains/cross-mingw32.cmake | |
| cmake --build build | |
| cmake --install build --prefix "`pwd`/build/usr" | |
| mkdir -p build/usr/test build/usr/bin | |
| cp -av test/fixtures build/usr/test | |
| cp -av build/uv_run_tests_a.exe build/uv_run_tests.exe build/uv_run_appcontainer.exe \ | |
| build/uv_run_tests_a_no_ext build/uv_run_tests_no_ext \ | |
| `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libgcc_s_${{ matrix.config.libgcc }}-1.dll` \ | |
| `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libwinpthread-1.dll` \ | |
| `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libatomic-1.dll` \ | |
| build/usr/bin | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: mingw-${{ matrix.config.arch }} | |
| path: build/usr/**/* | |
| retention-days: 2 | |
| test-mingw: | |
| runs-on: windows-${{ matrix.config.server }} | |
| name: test-mingw-${{ matrix.config.arch }} | |
| needs: build-mingw | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {arch: i686, server: 2022} | |
| - {arch: x86_64, server: 2022} | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: mingw-${{ matrix.config.arch }} | |
| - name: Test | |
| shell: cmd | |
| run: | | |
| bin\uv_run_tests_a.exe | |
| - name: Test | |
| shell: cmd | |
| run: | | |
| bin\uv_run_tests.exe | |
| - name: Test AppContainer | |
| shell: cmd | |
| run: | | |
| bin\uv_run_appcontainer.exe bin\uv_run_tests.exe |