Repository navigation
Windows heap allocator attributes and inline rc interface counts: rc/own loops vectorized, rc ray tracer 13% faster #2044
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 - Linux | |
| 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 | |
| # The official LLVM release package, installed where a custom LLVM build would be - see | |
| # scripts/install_llvm_prebuilt_release.sh. | |
| 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, as on Windows: release or debug programs | |
| # (TSLANG_TEST_PROGRAMS - test-runner), built to an executable or run under the JIT. | |
| name: Build and test (Ubuntu 22.04, ${{ matrix.programs }} programs, ${{ matrix.kind }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| programs: ${{ fromJSON(inputs.programs || '["release", "debug"]') }} | |
| kind: [exe, jit] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # - name: check disk space | |
| # run: Get-PSDrive | |
| # shell: pwsh | |
| - uses: actions/checkout@v4 | |
| # No 3rdParty cache: the LLVM prefix is about 9.6 GB, too big for the cache, and downloading it | |
| # from GitHub each run is quick; GC is rebuilt every run anyway. | |
| - name: Delete __Build TS folders | |
| continue-on-error: true | |
| run: rm -R ./__build/tslang/ninja/release | |
| shell: sh | |
| - name: Create __Build Folders | |
| run: mkdir -p ./__build/tslang/ninja/release; mkdir -p ./__build/gc/ninja/release | |
| shell: sh | |
| # Downloads and unpacks the official LLVM package - nothing is compiled. | |
| - name: Install 3rd party - LLVM ${{ env.LLVM_FULL_VERSION }} | |
| continue-on-error: false | |
| shell: sh | |
| run: sh ./scripts/install_llvm_prebuilt_release.sh ${{ env.LLVM_FULL_VERSION }} && df -h . | |
| - name: Download 3rd party source - GC | |
| continue-on-error: true | |
| shell: sh | |
| run: curl --insecure -L https://github.com/bdwgc/bdwgc/releases/download/v${{ env.GC_VERSION }}/gc-${{ env.GC_VERSION }}.tar.gz --output gc-${{ env.GC_VERSION }}.tar.gz | |
| - name: Download 3rd party source - GC:Atomic_ops | |
| continue-on-error: true | |
| shell: sh | |
| run: curl --insecure -L https://github.com/bdwgc/libatomic_ops/releases/download/v${{ env.LIBATOMIC_OPS_VERSION }}/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz --output libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz | |
| - name: UnZip 3rd party source - GC | |
| continue-on-error: false | |
| shell: sh | |
| run: tar -xvzf gc-${{ env.GC_VERSION }}.tar.gz -C ./3rdParty/ | |
| - name: UnZip 3rd party source - GC:Atomic_ops | |
| continue-on-error: false | |
| shell: sh | |
| run: tar -xvzf libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz -C ./3rdParty/ | |
| - name: Copy Atomic_ops to GC | |
| continue-on-error: false | |
| shell: sh | |
| run: cp -a ./3rdParty/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}/ ./3rdParty/gc-${{ env.GC_VERSION }}/libatomic_ops/ | |
| # zlib, zstd and libxml2: the official LLVM package's CMake targets link against them. | |
| - name: Install Ninja and LLVM's link dependencies | |
| continue-on-error: false | |
| shell: sh | |
| run: sudo apt-get update && sudo apt-get install -y ninja-build zlib1g-dev libzstd-dev libxml2-dev | |
| # - name: Install Clang 12 | |
| # continue-on-error: false | |
| # shell: sh | |
| # run: sudo apt install clang-12 | |
| - name: Configure GC | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gc/ninja/release | |
| shell: sh | |
| run: cmake ../../../../3rdParty/gc-${{ env.GC_VERSION }} -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gc/release -DBUILD_SHARED_LIBS=OFF -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=OFF | |
| - name: Build GC | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gc/ninja/release | |
| shell: sh | |
| run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8 | |
| - name: Install GC | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/gc/ninja/release | |
| shell: sh | |
| # 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 }} | |
| - name: List GC files | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/3rdParty/gc/release/ | |
| shell: sh | |
| run: ls -l | |
| - name: Configure | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/tslang/ninja/release | |
| shell: sh | |
| run: cmake ../../../../tslang -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev | |
| - name: Build | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/tslang/ninja/release | |
| shell: sh | |
| run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8 | |
| # The JIT tests are the ones named test-jit-*; every other test is the exe leg's. | |
| - name: Test (Ubuntu 22.04, ${{ matrix.programs }} programs, ${{ matrix.kind }}) | |
| continue-on-error: false | |
| working-directory: ${{github.workspace}}/__build/tslang/ninja/release | |
| shell: sh | |
| # Execute tests defined by the CMake configuration. | |
| # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
| run: | | |
| if [ "$KIND" = jit ]; then filter=-R; else filter=-E; fi | |
| ctest -j8 -C ${{ env.BUILD_TYPE }} $filter '^test-jit' -T test --output-on-failure | |
| env: | |
| LLVM_SYMBOLIZER_PATH: ${{github.workspace}}/3rdParty/llvm/release/bin | |
| TSLANG_TEST_PROGRAMS: ${{ matrix.programs }} | |
| KIND: ${{ matrix.kind }} | |