diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index c70c41f97..8a2e86f36 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -23,6 +23,9 @@ inputs: cross_arch: description: 'Cross compilation architecture from: x86, arm, aarch64, riscv64. Default: "none" (no cross compile), will auto fetch native arch' default: "none" + cache_suffix: + description: 'suffix for caches so each job has its own' + default: 'build' runs: # We don't want a new docker just a list of steps, so mark as composite @@ -92,9 +95,9 @@ runs: # note the PR testing usage should set 'save' to false, to avoid PR testing creating new caches on a branch - name: Setup ccache - uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14 + uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16 with: - max-size: 200M - key: ccache-build + max-size: 400M + key: ccache-${{ inputs.cache_suffix }} variant: ccache save: ${{ inputs.save }} diff --git a/.github/workflows/create_publish_artifacts.yml b/.github/workflows/create_publish_artifacts.yml index 155b151da..53183c799 100644 --- a/.github/workflows/create_publish_artifacts.yml +++ b/.github/workflows/create_publish_artifacts.yml @@ -105,7 +105,7 @@ jobs: fi - name: Create OCK pre-release - uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 + uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: diff --git a/.github/workflows/publish_docker_images.yml b/.github/workflows/publish_docker_images.yml index fecc9356b..4b5555e64 100644 --- a/.github/workflows/publish_docker_images.yml +++ b/.github/workflows/publish_docker_images.yml @@ -21,7 +21,7 @@ jobs: REGISTRY: ghcr.io/uxlfoundation steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/.github/workflows/run_ock_demo.yml b/.github/workflows/run_ock_demo.yml index 33e9d5a9c..8599800a2 100644 --- a/.github/workflows/run_ock_demo.yml +++ b/.github/workflows/run_ock_demo.yml @@ -212,7 +212,7 @@ jobs: tar -rf ock_demo_components.tar.gz portDNN_build.tar.gz portBLAS_build.tar.gz - name: Create OCK demo release - uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 + uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: diff --git a/.github/workflows/run_pr_tests.yml b/.github/workflows/run_pr_tests.yml index 414ecd494..ad7e93d14 100644 --- a/.github/workflows/run_pr_tests.yml +++ b/.github/workflows/run_pr_tests.yml @@ -11,6 +11,12 @@ on: required: false type: boolean default: true + test_enabled: + required: false + type: string + description: "job to run, all, pull_request or job name" + #default: "run_host_x86_64" + default: "pull_request" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -31,436 +37,448 @@ jobs: # build and run host x86_64, execute UnitCL and lit tests and build and run offline run_host_x86_64: + if: inputs.test_enabled == 'run_host_x86_64' runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - # installs tools, ninja, installs llvm and sets up sccahe - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: 18 - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - # These need to match the configurations of build_pr_cache to use the cache effectively - - name: build host x86_64 online release - uses: ./.github/actions/do_build_ock - with: - build_type: Release - - - name: run just online lit - run: - ninja -C build check-ock-all-lit - - - name: run host online check - run: - ninja -C build check-ock-UnitCL - - # use the previous build for online to get clc - - name: build host x86_64 offline release - uses: ./.github/actions/do_build_ock - with: - build_type: Release - extra_flags: -DCA_RUNTIME_COMPILER_ENABLED=OFF -DCA_EXTERNAL_CLC=${{ github.workspace }}/build/bin/clc - build_dir: build_offline - build_targets: UnitCL - assemble_spirv_ll_lit_test_offline: ON - - - name: run host x86_64 offline - run: - ninja -C build_offline check-ock-UnitCL - - # build and run riscv m1, execute UnitCL and lit tests - run_riscv_m1: - - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - # installs tools, ninja, installs llvm and sets up sccahe - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: 18 - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - - name: build riscv M1 - uses: ./.github/actions/do_build_ock/do_build_m1 - - - name: run riscv M1 lit - run: - ninja -C build check-ock-all-lit - - - name: run riscv M1 UnitCL tests - run: - ninja -C build check-ock-UnitCL - - # build and run clang-tidy - run_clang_tidy_changes: - - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - # installs tools, ninja, installs llvm and sets up sccahe - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: 19 - llvm_build_type: RelAssert - - - name: build initial config files - uses: ./.github/actions/do_build_ock - with: - build_type: ReleaseAssert - host_image: ON - build_targets: build.ninja - - # Assume all clang-tidy prerequisites are files ending in '.cpp' or '.h'. - - name: build actual targets needed - run: - ninja -C build $(ninja -C build -t targets all | sed -nE 's/(\.cpp|\.h):.*/\1/p') - - - name: run clang-tidy - run: | - git config --global --add safe.directory $PWD - git fetch origin ${{ github.base_ref }} - ./scripts/compute-dependants.py \ - --exclude-filter='(/build/.*\.s$)|(.*/(external|cookie)/.*)' \ - --build-dir="$PWD/build" \ - `git diff --name-only --diff-filter=d \ - HEAD..origin/${{ github.base_ref }} | \ - grep -P '\.(c|cc|cxx|cpp|h|hh|hpp|hxx)$'` | \ - tee /dev/stderr | \ - parallel --verbose -- clang-tidy-19 --quiet -p "$PWD/build/" "{}" - # ^ When updating the clang-tidy version, the version used by the cmake - # target should match updated c.f. the `tidy` target - - # run clang-format-diff on the repo - run_clang_format: - - runs-on: ubuntu-22.04 - - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - - name: setup-ubuntu-clang-format - run: - pip install clang-format==19.1.0 - - - name: run clang-format + - name: echo job name run: | - # we've installed clang-format-19 in the docker via pip, which just installs it as clang-format, - # so just use clang-format-diff and -b clang-format directly - git fetch origin ${{ github.base_ref }} - git diff --no-color origin/${{ github.base_ref }} | \ - clang-format-diff.py -p1 -regex \ - "^(?!(.+\\/)*(external|cookie)\\/).*\\.(c|cc|cxx|cpp|h|hh|hxx|hpp)$" -b clang-format - - # Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-offline - run_windows_msvc_x86_64_llvm_latest_cl3_0_offline: - - runs-on: windows-2019 - - steps: - - name: Setup Windows llvm base - uses: llvm/actions/setup-windows@main - with: - arch: amd64 - - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - # installs tools, ninja, installs llvm and sets up ccache - - name: setup-windows - uses: ./.github/actions/setup_build - with: - llvm_version: 19 - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - os: windows - - - name: build ock x86_64 relassert - uses: ./.github/actions/do_build_ock - with: - build_targets: check-ock - enable_api: "" - builtin_kernel: ON - shell_to_use: pwsh - gtest_launcher: "python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py" - debug_support: ON - enable_unitcl_expensive: ${{ !inputs.is_pull_request && 'ON' || 'OFF' }} - - - name: build ock x86_64 offline - uses: ./.github/actions/do_build_ock - with: - build_targets: check-ock - runtime_compiler_enabled: OFF - external_clc: "${{ github.workspace }}/build/bin/clc.exe" - shell_to_use: pwsh - gtest_launcher: "python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py" - debug_support: ON - install_dir: ${{ github.workspace }}/install_offline - build_dir: ${{ github.workspace }}/build_offline + echo "Job name is $GITHUB_JOB" + echo "How about ${{ github.job }}" + echo TADA + # - name: Checkout repo + # uses: actions/checkout@v4 + + # # installs tools, ninja, installs llvm and sets up sccahe + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: 18 + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # cache_suffix: run_host_x86_64 + + # # These need to match the configurations of build_pr_cache to use the cache effectively + # - name: build host x86_64 online release + # uses: ./.github/actions/do_build_ock + # with: + # build_type: Release + # offline_kernel_tests: OFF + + + # - name: run just online lit + # run: + # ninja -C build check-ock-all-lit + + # - name: run host online check + # run: + # ninja -C build check-ock-UnitCL + + # # use the previous build for online to get clc + # - name: build host x86_64 offline release + # uses: ./.github/actions/do_build_ock + # with: + # build_type: Release + # extra_flags: -DCA_RUNTIME_COMPILER_ENABLED=OFF -DCA_EXTERNAL_CLC=${{ github.workspace }}/build/bin/clc + # build_dir: build_offline + # build_targets: UnitCL + # assemble_spirv_ll_lit_test_offline: ON + + # - name: run host x86_64 offline + # run: + # ninja -C build_offline check-ock-UnitCL + + # # build and run riscv m1, execute UnitCL and lit tests + # run_riscv_m1: + + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + + # # installs tools, ninja, installs llvm and sets up sccahe + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: 18 + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + + # - name: build riscv M1 + # uses: ./.github/actions/do_build_ock/do_build_m1 + + # - name: run riscv M1 lit + # run: + # ninja -C build check-ock-all-lit + + # - name: run riscv M1 UnitCL tests + # run: + # ninja -C build check-ock-UnitCL + + # # build and run clang-tidy + # run_clang_tidy_changes: + + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + + # # installs tools, ninja, installs llvm and sets up sccahe + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: 19 + # llvm_build_type: RelAssert + # clang_tidy: true + + # - name: build initial config files + # uses: ./.github/actions/do_build_ock + # with: + # build_type: ReleaseAssert + # host_image: ON + # build_targets: build.ninja + + # # Assume all clang-tidy prerequisites are files ending in '.cpp' or '.h'. + # - name: build actual targets needed + # run: + # ninja -C build $(ninja -C build -t targets all | sed -nE 's/(\.cpp|\.h):.*/\1/p') + + # - name: run clang-tidy + # run: | + # # TODO: Move to docker + # sudo apt-get -y install parallel + # git config --global --add safe.directory $PWD + # git fetch origin ${{ github.base_ref }} + # ./scripts/compute-dependants.py \ + # --exclude-filter='(/build/.*\.s$)|(.*/(external|cookie)/.*)' \ + # --build-dir="$PWD/build" \ + # `git diff --name-only --diff-filter=d \ + # HEAD..origin/${{ github.base_ref }} | \ + # grep -P '\.(c|cc|cxx|cpp|h|hh|hpp|hxx)$'` | \ + # tee /dev/stderr | \ + # parallel --verbose -- clang-tidy-19 --quiet -p "$PWD/build/" "{}" + # # ^ When updating the clang-tidy version, the version used by the cmake + # # target should match updated c.f. the `tidy` target + + # # run clang-format-diff on the repo + # run_clang_format: + + # runs-on: ubuntu-22.04 + + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + + # - name: setup-ubuntu-clang-format + # run: + # pip install clang-format==19.1.0 + + # - name: run clang-format + # run: | + # # we've installed clang-format-19 in the docker via pip, which just installs it as clang-format, + # # so just use clang-format-diff and -b clang-format directly + # git fetch origin ${{ github.base_ref }} + # git diff --no-color origin/${{ github.base_ref }} | \ + # clang-format-diff.py -p1 -regex \ + # "^(?!(.+\\/)*(external|cookie)\\/).*\\.(c|cc|cxx|cpp|h|hh|hxx|hpp)$" -b clang-format + + # # Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-offline + # run_windows_msvc_x86_64_llvm_latest_cl3_0_offline: + + # runs-on: windows-2019 + + # steps: + # - name: Setup Windows llvm base + # uses: llvm/actions/setup-windows@main + # with: + # arch: amd64 + + # - name: Checkout repo + # uses: actions/checkout@v4 + + # # installs tools, ninja, installs llvm and sets up ccache + # - name: setup-windows + # uses: ./.github/actions/setup_build + # with: + # llvm_version: 19 + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # os: windows + + # - name: build ock x86_64 relassert + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: check-ock + # enable_api: "" + # builtin_kernel: ON + # shell_to_use: pwsh + # gtest_launcher: "python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py" + # debug_support: ON + # enable_unitcl_expensive: ${{ !inputs.is_pull_request && 'ON' || 'OFF' }} + + # - name: build ock x86_64 offline + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: check-ock + # runtime_compiler_enabled: OFF + # external_clc: "${{ github.workspace }}/build/bin/clc.exe" + # shell_to_use: pwsh + # gtest_launcher: "python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py" + # debug_support: ON + # install_dir: ${{ github.workspace }}/install_offline + # build_dir: ${{ github.workspace }}/build_offline # Based on: mr-ubuntu-gcc-x86_64-riscv-fp16-cl3.0-unitcl_vecz - run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0_unitcl_vecz: - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 60 - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '18' - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock - uses: ./.github/actions/do_build_ock - with: - build_targets: check-ock-UnitCL-group-vecz - mux_targets_enable: riscv - mux_compilers_enable: riscv - riscv_enabled: ON - enable_rvv_scalable_vecz_check: ON - enable_rvv_scalable_vp_vecz_check: ON - use_linker: gold - hal_description: RV64GCV_Zfh - hal_refsi_soc: G1 - hal_refsi_thread_mode: WG - debug_support: ON - - # Based on: mr-ubuntu-clang-x86-llvm-previous-cl3-0-offline - run-ubuntu-clang-x86-llvm-latest-cl3-0-offline: - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 90 # offline needs longer timeout - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '19' - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - cross_arch: x86 - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock x86 relassert - uses: ./.github/actions/do_build_ock - with: - build_32_bit: ON - extra_flags: -DCMAKE_C_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang -DCMAKE_CXX_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang++ - build_targets: check-ock - enable_api: "" - builtin_kernel: ON - use_linker: gold - debug_support: ON - - name: build ock x86 offline - uses: ./.github/actions/do_build_ock - with: - build_32_bit: ON - extra_flags: -DCMAKE_C_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang -DCMAKE_CXX_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang++ - build_targets: check-ock - runtime_compiler_enabled: OFF - assemble_spirv_ll_lit_test_offline: ON - external_clc: ${GITHUB_WORKSPACE}/build/bin/clc - use_linker: gold - debug_support: ON - install_dir: $GITHUB_WORKSPACE/install_offline - build_dir: $GITHUB_WORKSPACE/build_offline - - # Based on: mr-ubuntu-gcc-x86_64-riscv-fp16-cl3-0 - run-ubuntu-gcc-x86_64-riscv-fp16-cl3-0: - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 60 - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '19' - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock - uses: ./.github/actions/do_build_ock - with: - build_targets: check-ock - mux_targets_enable: riscv - mux_compilers_enable: riscv - riscv_enabled: ON - disable_unitcl_vecz_checks: ON - enable_rvv_scalable_vecz_check: ON - enable_rvv_scalable_vp_vecz_check: ON - host_enable_builtins: OFF - use_linker: gold - hal_description: RV64GCV_Zfh - hal_refsi_soc: G1 - hal_refsi_thread_mode: WG - debug_support: ON - - # Based on: mr-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release - run-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release: - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 60 - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '19' - llvm_build_type: Release - save: ${{ inputs.update_cache }} - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock - uses: ./.github/actions/do_build_ock - with: - build_type: Release - build_targets: check-ock - host_image: ON - use_linker: gold - enable_api: "" - builtin_kernel: ON - - # Based on: mr-ubuntu-gcc-aarch64-llvm-previous-cl3-0-fp16 - run-ubuntu-gcc-aarch64-llvm-latest-cl3-0-fp16: - runs-on: cp-ubuntu-24.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 90 # aarch64 needs longer timeout - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '19' - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - cross_arch: aarch64 - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock - uses: ./.github/actions/do_build_ock - with: - build_targets: check-ock-cross - host_fp16: ON - use_linker: gold - debug_support: ON - builtin_kernel: ON - enable_api: "" - toolchain_file: "scripts/../platform/arm-linux/aarch64-toolchain.cmake" - extra_flags: -DCA_BUILTINS_TOOLS_DIR=${{ github.workspace }}/llvm_install_native/bin - - # Based on a combination of: mr-ubuntu-gcc-x86_64-clik - # and: mr-ubuntu-gcc-x86_64-clik-refsi - run-ubuntu-gcc-x86_64-clik-refsi: - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 60 - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: Install Ninja - uses: llvm/actions/install-ninja@main - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: Run Clik - run: | - cmake -Bbuild_clik -GNinja -DCMAKE_INSTALL_PREFIX=install clik - LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ninja -Cbuild_clik check - - name: Run Clik-Refsi # No initial clean - just point o/p at new dirs - run: | - cmake -Bbuild_clik_refsi -GNinja -DCMAKE_INSTALL_PREFIX=install_refsi -DCLIK_HAL_NAME=refsi -DHAL_REFSI_SOC=M1 -DCLIK_EXTERNAL_HAL_DIR=${{ github.workspace }}/examples/refsi/hal_refsi clik - LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ninja -Cbuild_clik_refsi check - - # Based on: mr-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0 - run-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0: - if: ${{ !inputs.is_pull_request }} # do not run as PR job for now to avoid flooding the concurrency - runs-on: ubuntu-22.04 - container: - image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest - volumes: - - ${{github.workspace}}:${{github.workspace}} - timeout-minutes: 60 - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '19' - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock - uses: ./.github/actions/do_build_ock - with: - build_targets: install # Build the install target so we don't miss compilation errors - mux_targets_enable: riscv - external_compiler_dirs: ${{ github.workspace }}/examples/refsi/refsi_g1_wi/compiler/refsi_g1_wi - mux_compilers_enable: refsi_g1_wi - riscv_enabled: ON - disable_unitcl_vecz_checks: ON - enable_rvv_scalable_vecz_check: ON - enable_rvv_scalable_vp_vecz_check: ON - use_linker: gold - hal_description: RV64GCV - hal_refsi_soc: G1 - hal_refsi_thread_mode: WI - debug_support: ON - # For now DO NOT include run_cities.py testing. Run commands generated by the import tool are: - #- run: python3 -u scripts/storage.py pull artefact.ca-opencl-cts --verbose --clean --path CA-OpenCL-CTS Ubuntu20 x86_64 14 Release - #- run: echo 'Subgroups,subgroups/test_subgroups barrier_functions_core' >> skipped.txt - #- run: python3 scripts/testing/run_cities.py -s scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv -i skipped.txt -b CA-OpenCL-CTS/bin -L build/lib -e OCL_ICD_FILENAMES=$PWD/build/lib/libCL.so -e OCL_ICD_VENDORS=/dev/null --timeout 00:10:00 --verbose -l build/cts.log -f build/cts.fail -r build/cts_refsi_g1_wi.xml - - run: ninja -C build check-ock - - run: ninja -C build check-ock-UnitCL-half - # For now DO NOT include upload of run_cities.py testing logs. Action commands generated by the import tool are: - #- uses: actions/upload-artifact@v4.1.0 - # if: success() - # with: - # name: ${{ github.job }} - # path: | - # oneapi-construction-kit/build/*.fail - # oneapi-construction-kit/build/*.log + # run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0_unitcl_vecz: + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 60 + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '18' + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: check-ock-UnitCL-group-vecz + # mux_targets_enable: riscv + # mux_compilers_enable: riscv + # riscv_enabled: ON + # enable_rvv_scalable_vecz_check: ON + # enable_rvv_scalable_vp_vecz_check: ON + # use_linker: gold + # hal_description: RV64GCV_Zfh + # hal_refsi_soc: G1 + # hal_refsi_thread_mode: WG + # debug_support: ON + + # # Based on: mr-ubuntu-clang-x86-llvm-previous-cl3-0-offline + # run-ubuntu-clang-x86-llvm-latest-cl3-0-offline: + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 90 # offline needs longer timeout + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '19' + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # cross_arch: x86 + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock x86 relassert + # uses: ./.github/actions/do_build_ock + # with: + # build_32_bit: ON + # extra_flags: -DCMAKE_C_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang -DCMAKE_CXX_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang++ + # build_targets: check-ock + # enable_api: "" + # builtin_kernel: ON + # use_linker: gold + # debug_support: ON + # - name: build ock x86 offline + # uses: ./.github/actions/do_build_ock + # with: + # build_32_bit: ON + # extra_flags: -DCMAKE_C_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang -DCMAKE_CXX_COMPILER=$GITHUB_WORKSPACE/llvm_install/bin/clang++ + # build_targets: check-ock + # runtime_compiler_enabled: OFF + # assemble_spirv_ll_lit_test_offline: ON + # external_clc: ${GITHUB_WORKSPACE}/build/bin/clc + # use_linker: gold + # debug_support: ON + # install_dir: $GITHUB_WORKSPACE/install_offline + # build_dir: $GITHUB_WORKSPACE/build_offline + + # # Based on: mr-ubuntu-gcc-x86_64-riscv-fp16-cl3-0 + # run-ubuntu-gcc-x86_64-riscv-fp16-cl3-0: + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 60 + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '19' + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: check-ock + # mux_targets_enable: riscv + # mux_compilers_enable: riscv + # riscv_enabled: ON + # disable_unitcl_vecz_checks: ON + # enable_rvv_scalable_vecz_check: ON + # enable_rvv_scalable_vp_vecz_check: ON + # host_enable_builtins: OFF + # use_linker: gold + # hal_description: RV64GCV_Zfh + # hal_refsi_soc: G1 + # hal_refsi_thread_mode: WG + # debug_support: ON + + # # Based on: mr-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release + # run-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release: + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 60 + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '19' + # llvm_build_type: Release + # save: ${{ inputs.update_cache }} + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock + # uses: ./.github/actions/do_build_ock + # with: + # build_type: Release + # build_targets: check-ock + # host_image: ON + # use_linker: gold + # enable_api: "" + # builtin_kernel: ON + + # # Based on: mr-ubuntu-gcc-aarch64-llvm-previous-cl3-0-fp16 + # run-ubuntu-gcc-aarch64-llvm-latest-cl3-0-fp16: + # runs-on: cp-ubuntu-24.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 90 # aarch64 needs longer timeout + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '19' + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # cross_arch: aarch64 + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: check-ock-cross + # host_fp16: ON + # use_linker: gold + # debug_support: ON + # builtin_kernel: ON + # enable_api: "" + # toolchain_file: "scripts/../platform/arm-linux/aarch64-toolchain.cmake" + # extra_flags: -DCA_BUILTINS_TOOLS_DIR=${{ github.workspace }}/llvm_install_native/bin + + # # Based on a combination of: mr-ubuntu-gcc-x86_64-clik + # # and: mr-ubuntu-gcc-x86_64-clik-refsi + # run-ubuntu-gcc-x86_64-clik-refsi: + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 60 + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: Install Ninja + # uses: llvm/actions/install-ninja@main + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: Run Clik + # run: | + # cmake -Bbuild_clik -GNinja -DCMAKE_INSTALL_PREFIX=install clik + # LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ninja -Cbuild_clik check + # - name: Run Clik-Refsi # No initial clean - just point o/p at new dirs + # run: | + # cmake -Bbuild_clik_refsi -GNinja -DCMAKE_INSTALL_PREFIX=install_refsi -DCLIK_HAL_NAME=refsi -DHAL_REFSI_SOC=M1 -DCLIK_EXTERNAL_HAL_DIR=${{ github.workspace }}/examples/refsi/hal_refsi clik + # LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ninja -Cbuild_clik_refsi check + + # # Based on: mr-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0 + # run-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0: + # if: ${{ !inputs.is_pull_request }} # do not run as PR job for now to avoid flooding the concurrency + # runs-on: ubuntu-22.04 + # container: + # image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest + # volumes: + # - ${{github.workspace}}:${{github.workspace}} + # timeout-minutes: 60 + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '19' + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: install # Build the install target so we don't miss compilation errors + # mux_targets_enable: riscv + # external_compiler_dirs: ${{ github.workspace }}/examples/refsi/refsi_g1_wi/compiler/refsi_g1_wi + # mux_compilers_enable: refsi_g1_wi + # riscv_enabled: ON + # disable_unitcl_vecz_checks: ON + # enable_rvv_scalable_vecz_check: ON + # enable_rvv_scalable_vp_vecz_check: ON + # use_linker: gold + # hal_description: RV64GCV + # hal_refsi_soc: G1 + # hal_refsi_thread_mode: WI + # debug_support: ON + # # For now DO NOT include run_cities.py testing. Run commands generated by the import tool are: + # #- run: python3 -u scripts/storage.py pull artefact.ca-opencl-cts --verbose --clean --path CA-OpenCL-CTS Ubuntu20 x86_64 14 Release + # #- run: echo 'Subgroups,subgroups/test_subgroups barrier_functions_core' >> skipped.txt + # #- run: python3 scripts/testing/run_cities.py -s scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv -i skipped.txt -b CA-OpenCL-CTS/bin -L build/lib -e OCL_ICD_FILENAMES=$PWD/build/lib/libCL.so -e OCL_ICD_VENDORS=/dev/null --timeout 00:10:00 --verbose -l build/cts.log -f build/cts.fail -r build/cts_refsi_g1_wi.xml + # - run: ninja -C build check-ock + # - run: ninja -C build check-ock-UnitCL-half + # # For now DO NOT include upload of run_cities.py testing logs. Action commands generated by the import tool are: + # #- uses: actions/upload-artifact@v4.1.0 + # # if: success() + # # with: + # # name: ${{ github.job }} + # # path: | + # # oneapi-construction-kit/build/*.fail + # # oneapi-construction-kit/build/*.log diff --git a/.github/workflows/run_pr_tests_caller.yml b/.github/workflows/run_pr_tests_caller.yml index 3df7768d1..479104256 100644 --- a/.github/workflows/run_pr_tests_caller.yml +++ b/.github/workflows/run_pr_tests_caller.yml @@ -23,12 +23,29 @@ concurrency: cancel-in-progress: true jobs: + # run-prs: + # name: Call PR testing on schedule + # if: ${{ (github.event_name == 'schedule' && github.repository == 'uxlfoundation/oneapi-construction-kit') || github.event_name == 'pull_request' }} + # uses: ./.github/workflows/run_pr_tests.yml + # with: + # update_cache: true + # #${{ github.event_name == 'schedule' }} + # is_pull_request: ${{ github.event_name != 'schedule' }} + run-prs: - name: Call PR testing on schedule - if: ${{ (github.event_name == 'schedule' && github.repository == 'uxlfoundation/oneapi-construction-kit') || github.event_name == 'pull_request' }} - uses: ./.github/workflows/run_pr_tests.yml - with: - update_cache: ${{ github.event_name == 'schedule' }} - is_pull_request: ${{ github.event_name != 'schedule' }} + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Call PR testing on schedule + if: ${{ (github.event_name == 'schedule' && github.repository == 'uxlfoundation/oneapi-construction-kit') || github.event_name == 'pull_request' }} + uses: ./.github/workflows/run_pr_tests.yml + with: + update_cache: true + #${{ github.event_name == 'schedule' }} + is_pull_request: ${{ github.event_name != 'schedule' }} + - name: delete old cache + run: + echo deleting old cache!! # additional ones here for cron and/or push to main - also can be in different file. diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 29ce490cb..c30e88f8b 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -25,7 +25,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # v4.2.0 with: persist-credentials: false