Skip to content

Differential fuzzer for the memory models: own and rc against gc #1807

Differential fuzzer for the memory models: own and rc against gc

Differential fuzzer for the memory models: own and rc against gc #1807

name: Test - Release - Windows
on:
# push:
# branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
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:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
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
- name: Test
working-directory: ${{github.workspace}}/__build/tslang/msbuild/x64/release
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -j8 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure
shell: pwsh