diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index eb2bf08be..058ef66c7 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -17,6 +17,15 @@ runs: - name: Install Ninja uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch + - name: aarch64 set-up + if: steps.calc_vars.outputs.arch == 'aarch64' + shell: bash + run: | + echo ARCH is: ${{ steps.calc_vars.outputs.arch }} + set -x + sudo apt-get update + sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + - name: clone headers uses: actions/checkout@v4 with: @@ -25,11 +34,13 @@ runs: - name: cmake headers shell: bash - run: - cmake headers -Bheaders/build_${{steps.calc_vars.outputs.arch}} - -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} - -DCMAKE_INSTALL_PREFIX=$PWD/headers_install_${{steps.calc_vars.outputs.arch}} + run: | + set -x + cmake headers -Bheaders/build_${{steps.calc_vars.outputs.arch}} \ + -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ + -DCMAKE_INSTALL_PREFIX=$PWD/headers_install_${{steps.calc_vars.outputs.arch}} \ -GNinja + - name: ninja install headers shell: bash run: @@ -50,13 +61,14 @@ runs: - name: icd cmake shell: bash - run: - cmake icd -B icd/build_${{steps.calc_vars.outputs.arch}} - -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} - -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} - -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install_icd_${{steps.calc_vars.outputs.arch}} - -DOpenCLHeaders_DIR=$GITHUB_WORKSPACE/headers_install_${{steps.calc_vars.outputs.arch}}/share/cmake/OpenCLHeaders - -GNinja + run: | + set -x + cmake icd -B icd/build_${{steps.calc_vars.outputs.arch}} \ + -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ + -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install_icd_${{steps.calc_vars.outputs.arch}} \ + -DOpenCLHeaders_DIR=$GITHUB_WORKSPACE/headers_install_${{steps.calc_vars.outputs.arch}}/share/cmake/OpenCLHeaders \ + -GNinja - name: icd build shell: bash diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index bae51173d..8dc34082b 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -35,13 +35,24 @@ runs: repository: KhronosGroup/OpenCL-CTS path: OpenCL-CTS - - name: build opencl cts + - name: aarch64 set-up + if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash + run: | + #ls -laR + set -x + sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list + sudo dpkg --add-architecture arm64 + sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + sudo apt-get update + sudo apt-get install --yes qemu-user + + - name: build opencl cts + shell: bash env: - # TODO: host-x86_64-linux 'toolchain' - expand for other targets - CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ - -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" + CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.cmake_toolchain }}" run: | + echo CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN # get spirv-as sudo apt-get update sudo apt-get install -y spirv-tools diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 975a67586..d0763a31e 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -32,6 +32,7 @@ runs: set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ + -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index aa78e4f7b..a976006de 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -58,10 +58,10 @@ runs: sudo apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32tinfo-dev; \ fi if [ "${{ inputs.cross_arch }}" = "arm" ]; then \ - sudo apt-get install --yes gcc-11-arm-linux-gnueabihf g++-11-arm-linux-gnueabihf; \ + sudo apt-get install --yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf; \ fi if [ "${{ inputs.cross_arch }}" = "aarch64" ]; then \ - sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ + sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu; \ fi if [ "${{ inputs.cross_arch }}" = "riscv64" ]; then \ sudo apt-get install --yes gcc-11-riscv64-linux-gnu g++-11-riscv64-linux-gnu; \ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 969248aa1..b8aedbaf7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,20 +4,20 @@ on: push: branches: - main - pull_request: - branches: - - main - paths: - - 'source/**' - - 'clik/**' - - 'modules/**' - - 'examples/**' - - 'cmake/**' - - 'hal/**' - - '.github/actions/do_build_ock/**' - - '.github/actions/setup_build/**' - - '.github/workflows/codeql.yml' - - 'CMakeLists.txt' + #pull_request: + # branches: + # - main + # paths: + # - 'source/**' + # - 'clik/**' + # - 'modules/**' + # - 'examples/**' + # - 'cmake/**' + # - 'hal/**' + # - '.github/actions/do_build_ock/**' + # - '.github/actions/setup_build/**' + # - '.github/workflows/codeql.yml' + # - 'CMakeLists.txt' schedule: - cron: '19 9 * * 3' diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index db5cf4a1f..f3da41d1d 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -6,9 +6,9 @@ on: - main paths: - '.github/workflows/create_llvm.yml' - pull_request: - paths: - - '.github/workflows/create_llvm.yml' + #pull_request: + # paths: + # - '.github/workflows/create_llvm.yml' schedule: # Run Mon-Fri at 5pm - cron: '00 17 * * 1-5' @@ -104,7 +104,7 @@ jobs: - name: install aarch64 build tools if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.arch == 'aarch64' }} run: - sudo apt-get install --yes g++-11-aarch64-linux-gnu + sudo apt-get install --yes g++-aarch64-linux-gnu - name: install x86 build tools if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.arch == 'x86' }} diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 7edbefe7d..cdfb932d7 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -50,7 +50,6 @@ jobs: echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT - create_ock_artefacts: needs: [workflow_vars] strategy: @@ -122,14 +121,14 @@ jobs: with: target: ${{ matrix.target }} - # Currently only builds and runs (default: quick) on x86_64 linux build_run_opencl_cts: if: inputs.test_opencl_cts needs: [ workflow_vars, build_icd, create_ock_artefacts ] strategy: + fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} # TODO: host-x86_64-linux only - expand for other targets runs-on: ubuntu-22.04 @@ -139,9 +138,11 @@ jobs: with: # scripts: for run_cities.py # source: for CTS filter.csv files + # platform: for toolchain files sparse-checkout: | scripts source + platform .github # TODO: Consider separating out opencl_cts build and run in the future - name : build and upload opencl_cts diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 5e6c24b71..5fc46b8ca 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -2,12 +2,12 @@ name: Run planned testing on: # Note: use pull_request: for localized testing only - #pull_request: - # paths: - # - '.github/workflows/planned_testing.yml' - # - '.github/workflows/planned_testing_caller.yml' - # branches: - # - main + pull_request: + paths: + - '.github/workflows/planned_testing.yml' + - '.github/workflows/planned_testing_caller.yml' + branches: + - main schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' @@ -19,10 +19,12 @@ jobs: if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule' uses: ./.github/workflows/planned_testing.yml with: - target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' + # TODO: restore settings + #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' + target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux" ]' ock: true - test_tornado: true - test_sycl_cts: true + test_sycl_cts: false + test_tornado: false test_opencl_cts: true # Have a pull request setting which can be used to test the flow as best as possible # in a reasonable time diff --git a/.github/workflows/run_pr_tests_caller.yml b/.github/workflows/run_pr_tests_caller.yml index 3df7768d1..06bea0e07 100644 --- a/.github/workflows/run_pr_tests_caller.yml +++ b/.github/workflows/run_pr_tests_caller.yml @@ -1,19 +1,19 @@ # Calling workflow for running PR style tests name: Run ock tests for PR style testing on: - pull_request: - paths: - - 'source/**' - - 'clik/**' - - 'modules/**' - - 'examples/**' - - 'cmake/**' - - 'hal/**' - - '.github/actions/do_build_ock/**' - - '.github/actions/setup_build/**' - - '.github/workflows/run_pr_tests.yml' - - '.github/workflows/run_pr_tests_caller.yml' - - 'CMakeLists.txt' + #pull_request: + # paths: + # - 'source/**' + # - 'clik/**' + # - 'modules/**' + # - 'examples/**' + # - 'cmake/**' + # - 'hal/**' + # - '.github/actions/do_build_ock/**' + # - '.github/actions/setup_build/**' + # - '.github/workflows/run_pr_tests.yml' + # - '.github/workflows/run_pr_tests_caller.yml' + # - 'CMakeLists.txt' schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5'