Repository navigation
Windows heap allocator attributes and inline rc interface counts: rc/own loops vectorized, rc ray tracer 13% faster #2026
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: Test - Release - Windows | |
| on: | |
| # push: | |
| # branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| # create-release.yml runs the debug-program legs before it publishes a release | |
| workflow_call: | |
| inputs: | |
| programs: | |
| description: JSON list of the kinds of test program to run (release, debug) | |
| type: string | |
| default: '["release", "debug"]' | |
| schedule: | |
| # 8:30 and 18:30 UTC: | |
| # - cron: '30 8,18 * * *' | |
| - cron: '30 18 * * 1' | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: Release | |
| CACHE_VERSION: v11 | |
| LLVM_VERSION: 22 | |
| # The official LLVM release package plus a prebuilt MLIR archive, installed where a custom LLVM | |
| # build would be - see scripts/install_llvm_prebuilt_release.ps1. | |
| LLVM_FULL_VERSION: "22.1.8" | |
| GC_VERSION: "8.2.12" | |
| LIBATOMIC_OPS_VERSION: "7.10.0" | |
| jobs: | |
| build: | |
| # One job per kind of test program, side by side: optimized (release) or with debug info and no | |
| # optimization (debug, TSLANG_TEST_PROGRAMS - test-runner), and built to an executable or run | |
| # under the JIT. Each job builds the compiler itself; its tests are a quarter of the suite. | |
| name: Build and test (Windows, ${{ matrix.programs }} programs, ${{ matrix.kind }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| programs: ${{ fromJSON(inputs.programs || '["release", "debug"]') }} | |
| kind: [exe, jit] | |
| runs-on: windows-latest | |
| steps: | |
| # - name: check disk space | |
| # run: Get-PSDrive | |
| # shell: pwsh | |
| - uses: actions/checkout@v4 | |
| - name: Cache 3rd Party binaries | |
| id: cache-3rd-party-binary | |
| uses: actions/cache@v4 | |
| with: | |
| path: 3rdParty | |
| key: ${{ runner.os }}-3rd-party-${{ env.LLVM_FULL_VERSION }}-${{ env.CACHE_VERSION }}-${{ hashFiles('scripts/install_llvm_prebuilt_release.ps1', 'scripts/llvm_prebuilt_common.ps1') }} | |
| - name: Delete __Build TS folders | |
| continue-on-error: true | |
| run: if (Test-Path -Path ".\__build\tslang\msbuild\x64\release") { Remove-Item -Recurse -Force ".\__build\tslang\msbuild\x64\release" } | |
| shell: pwsh | |
| - name: Create __Build Folders | |
| run: if (!(Test-Path -Path ".\__build\tslang\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tslang\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" }; | |
| shell: pwsh | |
| # Downloads and unpacks the official LLVM package and the prebuilt MLIR archive - nothing is | |
| # compiled. Skips itself when the cached 3rdParty already has them. | |
| - name: Install 3rd party - LLVM ${{ env.LLVM_FULL_VERSION }} + MLIR | |
| continue-on-error: false | |
| run: ./scripts/install_llvm_prebuilt_release.ps1 -Version ${{ env.LLVM_FULL_VERSION }} | |
| shell: pwsh | |
| - name: Download 3rd party source - GC | |
| continue-on-error: true | |
| shell: pwsh | |
| run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://github.com/bdwgc/bdwgc/releases/download/v${{ env.GC_VERSION }}/gc-${{ env.GC_VERSION }}.tar.gz" -OutFile "gc-${{ env.GC_VERSION }}.tar.gz" | |
| - name: Download 3rd party source - GC:Atomic_ops | |
| continue-on-error: true | |
| shell: pwsh | |
| run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://github.com/bdwgc/libatomic_ops/releases/download/v${{ env.LIBATOMIC_OPS_VERSION }}/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz" -OutFile "libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz" | |
| - name: UnZip 3rd party source - GC | |
| continue-on-error: false | |
| run: tar -xvzf gc-${{ env.GC_VERSION }}.tar.gz -C ./3rdParty/ | |
| shell: pwsh | |
| - name: UnZip 3rd party source - GC:Atomic_ops | |
| continue-on-error: false | |
| run: tar -xvzf libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz -C ./3rdParty/ | |
| shell: pwsh | |
| - name: Copy Atomic_ops to GC | |
| continue-on-error: false | |
| run: xcopy /E /H /C /I /Y ".\3rdParty\libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}" ".\3rdParty\gc-${{ env.GC_VERSION }}\libatomic_ops" | |
| shell: pwsh | |
| - name: Configure GC | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release | |
| run: cmake ../../../../../3rdParty/gc-${{ env.GC_VERSION }} -G "Visual Studio 18 2026" -A x64 -Wno-dev -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gc/x64/release -DBUILD_SHARED_LIBS=OFF -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=OFF -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
| shell: pwsh | |
| - name: Build GC | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release | |
| run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8 | |
| shell: pwsh | |
| - name: Install GC | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release | |
| # Generates the BDWgc CMake package files (lib/cmake/bdwgc/BDWgcConfig.cmake) | |
| # that the tslang build looks up via find_package(BDWgc CONFIG). | |
| run: cmake --install . --config ${{ env.BUILD_TYPE }} | |
| shell: pwsh | |
| - name: List GC files | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/3rdParty/gc/x64/release | |
| run: dir | |
| shell: pwsh | |
| # Boehm as a DLL, for the -shared tests only: an executable and a shared library that each | |
| # link gc.lib statically get two collectors (item 5ao). Mirrors | |
| # scripts/build_gc_release_shared_vs.bat; must be installed before tslang is configured, | |
| # since the test CMakeLists checks for it at configure time. | |
| - name: Configure GC (shared) | |
| continue-on-error: false | |
| run: New-Item -ItemType Directory -Force -Path ".\__build\gcdll\msbuild\x64\release" | Out-Null; cd ".\__build\gcdll\msbuild\x64\release"; cmake ../../../../../3rdParty/gc-${{ env.GC_VERSION }} -G "Visual Studio 18 2026" -A x64 -Wno-dev -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gcdll/x64/release -DBUILD_SHARED_LIBS=ON -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=OFF -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
| shell: pwsh | |
| - name: Build GC (shared) | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gcdll/msbuild/x64/release | |
| run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8 | |
| shell: pwsh | |
| - name: Install GC (shared) | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gcdll/msbuild/x64/release | |
| run: cmake --install . --config ${{ env.BUILD_TYPE }}; dir ${{github.workspace}}/3rdParty/gcdll/x64/release/lib, ${{github.workspace}}/3rdParty/gcdll/x64/release/bin | |
| shell: pwsh | |
| - name: Configure | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/tslang/msbuild/x64/release | |
| run: cmake ../../../../../tslang -G "Visual Studio 18 2026" -A x64 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev | |
| shell: pwsh | |
| - name: Build | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/tslang/msbuild/x64/release | |
| run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8 | |
| shell: pwsh | |
| # The JIT tests are the ones named test-jit-*; every other test is the exe leg's. | |
| - name: Test (Windows, ${{ matrix.programs }} programs, ${{ matrix.kind }}) | |
| working-directory: ${{github.workspace}}/__build/tslang/msbuild/x64/release | |
| env: | |
| TSLANG_TEST_PROGRAMS: ${{ matrix.programs }} | |
| KIND: ${{ matrix.kind }} | |
| # Execute tests defined by the CMake configuration. | |
| # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
| run: | | |
| $filter = if ($env:KIND -eq 'jit') { '-R' } else { '-E' } | |
| ctest -j8 -C ${{ env.BUILD_TYPE }} $filter '^test-jit' -T test --output-on-failure | |
| shell: pwsh |