quiet noisy dispatch_string logs #1172
Workflow file for this run
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
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| name: windows-ci | |
| on: | |
| push: | |
| branches: [dev] | |
| pull_request: | |
| branches: [dev, master, actionsTest] | |
| workflow_dispatch: {} | |
| env: | |
| # Common environment variables | |
| MAKEFLAGS: "V=1" | |
| jobs: | |
| # ============================================================================= | |
| # WINDOWS COMPILER DETECTION TESTING | |
| # ============================================================================= | |
| # This tests our Windows setup script (detect_windows_compiler.ps1) to ensure: | |
| # 1. It correctly detects available compilers | |
| # 2. It generates proper CMake configurations | |
| # 3. It works in non-interactive (CI) environments | |
| # 4. It provides helpful error messages | |
| # This is complementary to the actual build tests below - we test the tooling | |
| # here and the actual compilation in the Visual Studio and MinGW jobs. | |
| windows-compiler-detection: | |
| name: Windows Compiler Detection Script Test | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Test compiler detection script | |
| run: | | |
| echo "=== Testing Windows Compiler Detection Script ===" | |
| echo "This validates our Windows setup script works correctly in CI" | |
| echo "Testing help functionality..." | |
| powershell -ExecutionPolicy Bypass -File build-scripts/cmake/detect_windows_compiler.ps1 -Help | |
| echo "Testing detection functionality (without builds)..." | |
| powershell -ExecutionPolicy Bypass -File build-scripts/cmake/detect_windows_compiler.ps1 -DetectOnly | |
| echo "=== Script functionality tests completed successfully ===" | |
| shell: cmd | |
| # ============================================================================= | |
| # VISUAL STUDIO BUILDS (clang-cl) | |
| # ============================================================================= | |
| visual-studio-builds: | |
| name: VS2022 clang-cl ${{ matrix.arch }} (${{ matrix.config }}) | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| config: Release | |
| cmake_arch: x64 | |
| - arch: x64 | |
| config: Debug | |
| cmake_arch: x64 | |
| - arch: ARM64 | |
| config: Release | |
| cmake_arch: ARM64 | |
| - arch: ARM64 | |
| config: Debug | |
| cmake_arch: ARM64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Run compiler detection and verification | |
| run: | | |
| echo "=== Running Windows Compiler Detection Script ===" | |
| echo "This will detect available compilers and verify clang-cl setup" | |
| powershell -ExecutionPolicy Bypass -File build-scripts/cmake/detect_windows_compiler.ps1 -DetectOnly | |
| echo "=== Manual verification ===" | |
| where clang-cl | |
| clang-cl --version | |
| echo "=== Testing basic clang-cl functionality ===" | |
| echo int main() { return 0; } > simple_test.c | |
| clang-cl simple_test.c /Fe:simple_test.exe | |
| simple_test.exe | |
| echo "clang-cl basic functionality verified" | |
| shell: cmd | |
| - name: Configure CMake with clang-cl | |
| run: | | |
| cmake -E make_directory ${{github.workspace}}/build | |
| cd ${{github.workspace}}/build | |
| echo "=== Configuring with ClangCL toolset ===" | |
| cmake -G "Visual Studio 17 2022" ^ | |
| -A ${{ matrix.cmake_arch }} ^ | |
| -T ClangCL ^ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^ | |
| -DCMAKE_C_FLAGS="/W2" ^ | |
| -DCMAKE_CXX_FLAGS="/W2" ^ | |
| -DOPENZL_BUILD_SHARED_LIBS=OFF ^ | |
| -DCMAKE_INSTALL_PREFIX="./install" ^ | |
| .. | |
| echo "=== CMake configuration completed ===" | |
| shell: cmd | |
| - name: Verify CMake configuration | |
| working-directory: ${{github.workspace}}/build | |
| run: | | |
| echo "=== Verifying CMake detected clang-cl correctly ===" | |
| echo "=== Key compiler variables ===" | |
| findstr /C:"CMAKE_C_COMPILER:FILEPATH" CMakeCache.txt || echo "CMAKE_C_COMPILER not found" | |
| findstr /C:"CMAKE_CXX_COMPILER:FILEPATH" CMakeCache.txt || echo "CMAKE_CXX_COMPILER not found" | |
| findstr /C:"CMAKE_GENERATOR_TOOLSET" CMakeCache.txt || echo "CMAKE_GENERATOR_TOOLSET not found" | |
| findstr /C:"USING_CLANG_CL" CMakeCache.txt || echo "USING_CLANG_CL not found" | |
| echo "=== Compiler verification ===" | |
| findstr /C:"clang-cl" CMakeCache.txt >nul 2>&1 | |
| if errorlevel 1 ( | |
| echo "ERROR: clang-cl not found in CMakeCache.txt!" | |
| exit /b 1 | |
| ) else ( | |
| echo "SUCCESS: clang-cl found in CMakeCache.txt" | |
| ) | |
| shell: cmd | |
| - name: Build | |
| working-directory: ${{github.workspace}}/build | |
| run: | | |
| echo "=== Building with clang-cl ===" | |
| cmake --build . --config ${{ matrix.config }} --target openzl --verbose | |
| echo "=== Build completed ===" | |
| shell: cmd | |
| # ============================================================================= | |
| # WINDOWS BUILDS (MinGW) | |
| # ============================================================================= | |
| mingw-builds: | |
| name: MinGW ${{ matrix.cc }} (${{ matrix.msystem }}) | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Disabled: { cc: gcc, cxx: g++, msystem: MINGW32, flags: "" } | |
| - cc: gcc | |
| cxx: g++ | |
| msystem: MINGW64 | |
| flags: "" | |
| - cc: clang | |
| cxx: clang++ | |
| msystem: MINGW64 | |
| flags: "" | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| install: make diffutils cmake git python | |
| update: true | |
| - name: Install MinGW GCC (i686) | |
| if: ${{ matrix.msystem == 'MINGW32' && matrix.cc == 'gcc' }} | |
| run: pacman --noconfirm -S mingw-w64-i686-gcc | |
| - name: Install MinGW GCC (x86_64) | |
| if: ${{ matrix.msystem == 'MINGW64' && matrix.cc == 'gcc' }} | |
| run: pacman --noconfirm -S mingw-w64-x86_64-gcc | |
| - name: Install MinGW Clang (i686) | |
| if: ${{ matrix.msystem == 'MINGW32' && matrix.cc == 'clang' }} | |
| run: pacman --noconfirm -S mingw-w64-i686-clang | |
| - name: Install MinGW Clang (x86_64) | |
| if: ${{ matrix.msystem == 'MINGW64' && matrix.cc == 'clang' }} | |
| run: pacman --noconfirm -S mingw-w64-x86_64-clang | |
| - name: Prepare build | |
| run: | | |
| echo "=== Build Environment ===" | |
| make -v | |
| export MSYS=winsymlinks:lnk | |
| export CC=${{ matrix.cc }} | |
| export CXX=${{ matrix.cxx }} | |
| export CFLAGS="${{ matrix.flags }}" | |
| export CXXFLAGS="${{ matrix.flags }}" | |
| echo "=== Compiler Versions ===" | |
| $CC --version | |
| $CXX --version | |
| echo "=== Build dependencies ===" | |
| make -j builddeps | |
| - name: Build and test | |
| run: | | |
| echo "=== Testing $CC $CXX ${{ matrix.msystem }} ===" | |
| CFLAGS=-Werror CXXFLAGS=-Werror make -j test V=1 | |
| echo "=== Build and test completed successfully ===" | |
| # ============================================================================= | |
| # CHOCOLATEY MinGW-w64 (pure Windows, no MSYS2) — build with `make` | |
| # Note: this test is currently failing at link stage, disabling it for now | |
| # ============================================================================= | |
| # mingw-choco-make: | |
| # name: choco+mingw+make | |
| # runs-on: windows-latest | |
| # defaults: | |
| # run: | |
| # shell: pwsh | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # | |
| # - name: Install MinGW-w64 (Chocolatey) | |
| # run: | | |
| # choco install -y mingw | |
| # choco list mingw | |
| # | |
| # - name: Add MinGW to PATH and expose `make` | |
| # run: | | |
| # $mingwRoot = 'C:\ProgramData\mingw64' | |
| # Get-ChildItem -Path $mingwRoot -Recurse -Filter gcc.exe | |
| # $binDirs = Get-ChildItem -Path $mingwRoot -Directory -Recurse | Where-Object { Test-Path "$($_.FullName)\bin\gcc.exe" } | |
| # if ($binDirs.Count -eq 0) { throw "No MinGW bin directory with gcc.exe found" } | |
| # | |
| # $mingwBin = "$($binDirs[0].FullName)\bin" | |
| # if (-not (Test-Path $mingwBin)) { throw "Missing $mingwBin" } | |
| # # Print the found path | |
| # Write-Host "Found MinGW bin path: $mingwBin" | |
| # Add-Content $env:GITHUB_PATH $mingwBin | |
| # if (Test-Path "$mingwBin\mingw32-make.exe") { | |
| # Copy-Item "$mingwBin\mingw32-make.exe" "$mingwBin\make.exe" -Force | |
| # } | |
| # where gcc | |
| # where g++ | |
| # gcc --version | |
| # g++ --version | |
| # | |
| # - name: Build targets with make | |
| # env: | |
| # CC: gcc | |
| # CXX: g++ | |
| # run: | | |
| # echo "=== make zli ===" | |
| # # link stage fails for some unclear reason, disable CI error signal for now | |
| # make zli | |
| # echo "=== make unitBench ===" | |
| # make unitBench |