Linux / CPU + GPU weekly full CTS #21
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: Linux / CPU + GPU weekly full CTS | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # at 0:17 UTC every saturday | |
| - cron: '17 0 * * 6' | |
| jobs: | |
| cpu_cts: | |
| name: LLVM ${{ matrix.llvm }} - CPU ${{ matrix.config }} | |
| runs-on: [self-hosted, linux, x64, "${{ matrix.config }}"] | |
| timeout-minutes: 1600 | |
| # CPU runners have action runner directly in the home directory | |
| env: | |
| CCACHE_BASEDIR: "${{ github.workspace }}" | |
| CCACHE_DIR: "${{ github.workspace }}/../../../ccache_storage" | |
| EXAMPLES_DIR: "${{ github.workspace }}/../../../examples" | |
| # full CTS launches thousands of tests, the compiler cache could grow to >10 GB -> avoid this | |
| POCL_KERNEL_CACHE: "0" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: [20] | |
| config: [full_cts_cpu, full_cts_cpu_spirv] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Load Env vars | |
| id: load-env | |
| run: | | |
| cat ${{ github.workspace }}/.github/variables.txt >> $GITHUB_ENV | |
| - name: Run CMake | |
| id: cmake | |
| timeout-minutes: 60 | |
| run: | | |
| rm -rf ${{ github.workspace }}/build | |
| mkdir ${{ github.workspace }}/build | |
| mkdir -p ${EXAMPLES_DIR}/build_${{ matrix.llvm }}_${{ matrix.config }} | |
| mkdir -p ${EXAMPLES_DIR}/source | |
| BUILD_FLAGS="-O2 -march=native" | |
| cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \ | |
| -DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} -DLLVM_SPIRV=/usr/bin/llvm-spirv-${{ matrix.llvm }} \ | |
| -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_${{ matrix.llvm }}_${{ matrix.config }} -DENABLE_TESTSUITES=conformance -DENABLE_CONFORMANCE=ON \ | |
| -B ${{ github.workspace }}/build ${{ github.workspace }} | |
| - name: Copy SPIRV | |
| id: copy_spirv | |
| if: ${{ matrix.config == 'full_cts_cpu_spirv' }} | |
| timeout-minutes: 6 | |
| run: | | |
| if [ -e "${{ github.workspace }}/../../../CTS_FULL_CACHE_LLVM_${{ matrix.llvm }}" ]; then \ | |
| echo "Copying..." ; \ | |
| rm -rf ${{ github.workspace }}/build/CTS_FULL_CACHE ; \ | |
| cp -r --reflink=always "${{ github.workspace }}/../../../CTS_FULL_CACHE_LLVM_${{ matrix.llvm }}" ${{ github.workspace }}/build && \ | |
| mv "${{ github.workspace }}/build/CTS_FULL_CACHE_LLVM_${{ matrix.llvm }}" ${{ github.workspace }}/build/CTS_FULL_CACHE && echo "Copied." ; \ | |
| ls -ld ${{ github.workspace }}/build/CTS_FULL_CACHE ; \ | |
| fi | |
| - name: Run Build | |
| id: build | |
| timeout-minutes: 60 | |
| run: | | |
| cd ${{ github.workspace }}/build && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) prepare_examples | |
| - name: Get CMake version | |
| id: cmake_version | |
| run: echo "version=$(cmake --version | head -n 1)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache CTest timings | |
| id: cache_ctest | |
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 | |
| with: | |
| path: ${{ github.workspace }}/build/Testing/Temporary/CTestCostData.txt | |
| key: ctest-cache-${{ steps.cmake_version.outputs.version }}-${{ runner.name }}-${{ matrix.config }}-${{ github.run_id }} | |
| restore-keys: ctest-cache-${{ steps.cmake_version.outputs.version }}-${{ runner.name }}-${{ matrix.config }} | |
| - name: Run Tests | |
| id: ctest | |
| env: | |
| POCL_CACHE_DIR: "${{ runner.temp }}/GH_POCL_CACHE" | |
| CL_PLATFORM_NAME: "Portable" | |
| CL_DEVICE_TYPE: "cpu" | |
| run: | | |
| runCTest() { | |
| cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_cpu_tests -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) $CTEST_FLAGS "$@" | |
| } | |
| rm -rf ${{ env.POCL_CACHE_DIR }} | |
| # hardcoded path in test_compiler / execute_after_included_header_link | |
| rm -rf /tmp/foo | |
| mkdir ${{ env.POCL_CACHE_DIR }} | |
| if [ "${{ matrix.config }}" == "full_cts_cpu" ]; then | |
| runCTest -L conformance_suite_full_main | |
| elif [ "${{ matrix.config }}" == "full_cts_cpu_spirv" ]; then | |
| runCTest -L conformance_suite_full_spirv | |
| else | |
| echo "Unknown configuration" && exit 1 | |
| fi | |
| level_zero_cts: | |
| name: LLVM ${{ matrix.llvm }} - LevelZero ${{ matrix.config }} | |
| runs-on: [self-hosted, linux, x64, "${{ matrix.config }}"] | |
| timeout-minutes: 1600 | |
| env: | |
| CCACHE_BASEDIR: "${{ github.workspace }}" | |
| CCACHE_DIR: "${{ github.workspace }}/../../../../ccache_storage" | |
| EXAMPLES_DIR: "${{ github.workspace }}/../../../../examples" | |
| # full CTS launches thousands of tests, the compiler cache could grow to >10 GB -> avoid this | |
| POCL_KERNEL_CACHE: "0" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: [20] | |
| config: [full_cts_lz, full_cts_lz_spirv] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Load Env vars | |
| id: load-env | |
| run: | | |
| cat ${{ github.workspace }}/.github/variables.txt >> $GITHUB_ENV | |
| - name: Run CMake | |
| id: cmake | |
| timeout-minutes: 60 | |
| run: | | |
| rm -rf ${{ github.workspace }}/build | |
| mkdir ${{ github.workspace }}/build | |
| mkdir -p ${EXAMPLES_DIR}/build_${{ matrix.llvm }}_${{ matrix.config }} | |
| mkdir -p ${EXAMPLES_DIR}/source | |
| BUILD_FLAGS="-O2 -march=native" | |
| cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \ | |
| -DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} -DLLVM_SPIRV=/usr/bin/llvm-spirv-${{ matrix.llvm }} \ | |
| -DENABLE_LEVEL0=1 -DENABLE_HOST_CPU_DEVICES=0 -DSTATIC_LLVM=1 \ | |
| -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_${{ matrix.llvm }}_${{ matrix.config }} -DENABLE_TESTSUITES=conformance -DENABLE_CONFORMANCE=ON \ | |
| -B ${{ github.workspace }}/build ${{ github.workspace }} | |
| - name: Run Build | |
| id: build | |
| timeout-minutes: 60 | |
| run: | | |
| cd ${{ github.workspace }}/build && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) prepare_examples | |
| - name: Get CMake version | |
| id: cmake_version | |
| run: echo "version=$(cmake --version | head -n 1)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache CTest timings | |
| id: cache_ctest | |
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 | |
| with: | |
| path: ${{ github.workspace }}/build/Testing/Temporary/CTestCostData.txt | |
| key: ctest-cache-${{ steps.cmake_version.outputs.version }}-${{ runner.name }}-${{ matrix.config }}-${{ github.run_id }} | |
| restore-keys: ctest-cache-${{ steps.cmake_version.outputs.version }}-${{ runner.name }}-${{ matrix.config }} | |
| - name: Run Tests | |
| env: | |
| POCL_CACHE_DIR: "${{ runner.temp }}/GH_POCL_CACHE" | |
| CL_PLATFORM_NAME: "Portable" | |
| CL_DEVICE_TYPE: "gpu" | |
| id: ctest | |
| run: | | |
| runCTest() { | |
| cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_level0_tests -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) $CTEST_FLAGS "$@" | |
| } | |
| rm -rf ${{ env.POCL_CACHE_DIR }} | |
| # hardcoded path in test_compiler / execute_after_included_header_link | |
| rm -rf /tmp/foo | |
| mkdir ${{ env.POCL_CACHE_DIR }} | |
| if [ "${{ matrix.config }}" == "full_cts_lz" ]; then | |
| runCTest -L conformance_suite_full_main | |
| elif [ "${{ matrix.config }}" == "full_cts_lz_spirv" ]; then | |
| runCTest -L conformance_suite_full_spirv | |
| else | |
| echo "Unknown configuration" && exit 1 | |
| fi |