## Copyright 2022 Intel Corporation
## SPDX-License-Identifier: Apache-2.0

name: nightly

permissions: read-all

on:
  schedule:
    - cron:  '00 00 * * *'
  workflow_dispatch:

jobs:
  ################################################################################
  ################################################################################
  # GPU tests
  ################################################################################
  ###############################################################################

  ########################################
  # Linux
  ########################################
  nightly-linux-DG2-JIT-MULTILEVEL-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "build" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
      artifact-out: nightly-linux-DG2-JIT-MULTILEVEL-build
      artifact-path: ./build/*.tar.gz
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DG2-JIT-MULTILEVEL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  nightly-linux-DG2-JIT-MULTILEVEL-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["nightly-linux-DG2-JIT-MULTILEVEL-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
      artifact-in: nightly-linux-DG2-JIT-MULTILEVEL-build
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DG2-JIT-MULTILEVEL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  nightly-linux-DG2-INTERNAL-L0RTAS-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "build" ]'
      project: embree
      dpcpp-version: intel-llvm/nightly-2023-12-18-rk
      artifact-out: nightly-linux-DG2-INTERNAL-L0RTAS-build
      artifact-path: ./build/*.tar.gz
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DG2-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  linux-DG2-JIT-INTERNAL-L0RTAS-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["nightly-linux-DG2-INTERNAL-L0RTAS-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
      artifact-in: nightly-linux-DG2-INTERNAL-L0RTAS-build
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DG2-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  linux-DG2-JIT-PUBLIC-sycl-RC-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "build" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-out: linux-DG2-JIT-PUBLIC-sycl-RC-build
      artifact-path: ./build/*.tar.gz
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-DG2-JIT-PUBLIC-sycl-nightly-RK -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  linux-DG2-JIT-PUBLIC-sycl-RC-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["linux-DG2-JIT-PUBLIC-sycl-RC-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-in: linux-DG2-JIT-PUBLIC-sycl-RC-build
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-DG2-JIT-PUBLIC-sycl-nightly-RK -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  nightly-linux-PVC-JIT-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "build" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
      artifact-out: nightly-linux-PVC-JIT-build
      artifact-path: ./build/*.tar.gz
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-PVC-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target build

  nightly-linux-PVC-JIT-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["nightly-linux-PVC-JIT-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "pvc" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
      artifact-in: nightly-linux-PVC-JIT-build
      cmd: |
        export NEOReadDebugKeys=1
        export UseKmdMigration=0
        export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
        module load cmake/3.25.3
        cmake --preset nightly-linux-PVC-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target test_package

  linux-PVC-JIT-INTERNAL-SYCL-RC-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "build" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-out: linux-PVC-JIT-INTERNAL-SYCL-RC-build
      artifact-path: ./build/*.tar.gz
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  linux-PVC-JIT-INTERNAL-SYCL-RC-test-1T:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["linux-PVC-JIT-INTERNAL-SYCL-RC-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "pvc" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-internal.env
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-in: linux-PVC-JIT-INTERNAL-SYCL-RC-build
      cmd: |
        export NEOReadDebugKeys=1
        export UseKmdMigration=0
        export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
        export EnableImplicitScaling=0
        module load cmake/3.25.3
        cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  linux-PVC-JIT-INTERNAL-SYCL-RC-test-2T:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["linux-PVC-JIT-INTERNAL-SYCL-RC-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "pvc" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-internal.env
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-in: linux-PVC-JIT-INTERNAL-SYCL-RC-build
      cmd: |
        module load cmake/3.25.3
        export NEOReadDebugKeys=1
        export UseKmdMigration=0
        export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
        cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  linux-PVC-JIT-INTERNAL-SYCL-RC-test-flat:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["linux-PVC-JIT-INTERNAL-SYCL-RC-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "pvc" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-internal.env
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-in: linux-PVC-JIT-INTERNAL-SYCL-RC-build
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  linux-ATSM-JIT-SYCL-RC-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "build" ]'
      project: embree
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      artifact-out: linux-ATSM-JIT-SYCL-RC-build
      artifact-path: ./build/*.tar.gz
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  linux-ATSM-JIT-PUBLIC-SYCL-RC-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["linux-ATSM-JIT-SYCL-RC-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "atsm" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
      artifact-in: linux-ATSM-JIT-SYCL-RC-build
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  linux-ATSM-JIT-INTERNAL-SYCL-RC-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    needs: ["linux-ATSM-JIT-SYCL-RC-build"]
    with:
      image: embree/ubuntu:22.04
      options: --device=/dev/dri:/dev/dri
      runs-on: '[ "Linux", "docker", "atsm" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
      artifact-in: linux-ATSM-JIT-SYCL-RC-build
      cmd: |
        module load cmake/3.25.3
        cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  ########################################
  # Windows
  ########################################

  nightly-windows-DG2-JIT-ICX-RC-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
      dpcpp-version: icx/compiler_ppkg-rel/20240129
      artifact-out: nightly-windows-DG2-JIT-ICX-RC-build
      artifact-path: ./build/*.zip
      cmd: |
        cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --config Release --target build

  nightly-windows-DG2-JIT-ICX-RC-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    needs: ["nightly-windows-DG2-JIT-ICX-RC-build"]
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
      dpcpp-version: icx/compiler_ppkg-rel/20240110
      artifact-in: nightly-windows-DG2-JIT-ICX-RC-build
      cmd: |
        cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --config Release --target test_package

  nightly-windows-DG2-JIT-NIGHTLY-RK-bulid:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
      dpcpp-version: intel-llvm/nightly-2023-09-22-rk
      artifact-out: nightly-windows-DG2-JIT-NIGHTLY-RK-bulid
      artifact-path: ./build/*.zip
      cmd: |
        cmake --preset nightly-windows-DG2-JIT-NIGHTLY -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --config Release --target build

  nightly-windows-DG2-JIT-NIGHTLY-RK-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    needs: ["nightly-windows-DG2-JIT-NIGHTLY-RK-bulid"]
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
      dpcpp-version: intel-llvm/nightly-2023-09-22-rk
      artifact-in: nightly-windows-DG2-JIT-NIGHTLY-RK-bulid
      cmd: |
        cmake --preset nightly-windows-DG2-JIT-NIGHTLY -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --config Release --target test_package

  nightly-windows-DG2-JIT-INTERNAL-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
      artifact-out: nightly-windows-DG2-JIT-INTERNAL-build
      artifact-path: ./build/*.zip
      cmd: |
        cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target build

  nightly-windows-DG2-JIT-INTERNAL-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    needs: ["nightly-windows-DG2-JIT-INTERNAL-build"]
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
      artifact-in: nightly-windows-DG2-JIT-INTERNAL-build
      cmd: |
        cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target test_package

  nightly-windows-DG2-JIT-PUBLIC-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
      artifact-out: nightly-windows-DG2-JIT-PUBLIC-build
      artifact-path: ./build/*.zip
      cmd: |
        cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target build
        
  nightly-windows-DG2-JIT-PUBLIC-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    needs: ["nightly-windows-DG2-JIT-PUBLIC-build"]
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
      artifact-in: nightly-windows-DG2-JIT-PUBLIC-build
      cmd: |
        cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target test_package

  windows-DG2-JIT-INTERNAL-VALIDATION_API:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
      cmd: |
        python scripts/test.py configure platform:x64 compiler:dpcpp isa:SSE2 build:Release EMBREE_SYCL_SUPPORT:ON sycl:none rt_validation_api:ON implicit_dispatch_globals:OFF L0RTAS:OFF intensity:3 tasking:TBB2020.3
        python scripts/test.py build
        python scripts/test.py test

  windows-DG2-JIT-sycl-RC-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
      artifact-out: windows-DG2-JIT-sycl-RC-build
      artifact-path: ./build/*.zip
      cmd: |
        cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  windows-DG2-JIT-sycl-RC-PUBLIC-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    needs: ["windows-DG2-JIT-sycl-RC-build"]
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
      env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
      artifact-in: windows-DG2-JIT-sycl-RC-build
      cmd: |
        cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  windows-DG2-JIT-INTERNAL-L0RTAS-build:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      force-delete: true
      runs-on: '[ "Windows", "NAS", "build" ]'
      project: embree
      dpcpp-version: intel-llvm/nightly-2023-10-26-rk
      artifact-out: windows-DG2-JIT-INTERNAL-L0RTAS-build
      artifact-path: ./build/*.zip
      cmd: |
        cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target build

  windows-DG2-JIT-INTERNAL-L0RTAS-test:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    needs: ["windows-DG2-JIT-INTERNAL-L0RTAS-build"]
    with:
      runs-on: '[ "Windows", "NAS", "dg2" ]'
      project: embree
      env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
      artifact-in: windows-DG2-JIT-INTERNAL-L0RTAS-build
      cmd: |
        cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --config Release --target test_package

  ################################################################################
  ################################################################################
  # CPU tests
  ################################################################################
  ################################################################################

  ########################################
  # Linux
  ########################################

  # CLANG

  nightly-linux-DEBUG-CLANG4-SSE2-NAMESPACE:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-CLANG4-SSE2-NAMESPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG5-ISPC1_14_1-AVX2-INT-ADDRSANITIZER:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-CLANG5-ISPC1_14_1-AVX2-INT-ADDRSANITIZER -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-ISPC1_16_1-AVX2-TBB2021_9_0-STATIC:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-CLANG4-ISPC1_16_1-AVX2-TBB2021_9_0-STATIC -DCMAKE_BUILD_TYPE=RelWithDebInfo  -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  # GCC

  nightly-linux-DEBUG-CLANG4-ISPC1_16_1-AVX512VL-TBB2020_2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      runs-on: '[ "Linux", "docker", "avx512" ]'
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-CLANG4-ISPC1_16_1-AVX512VL-TBB2020_2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=3
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-GCC-ISPC1_16_1-SSE2-TBB2021_2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-GCC-ISPC1_16_1-SSE2-TBB2021_2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-GCC-ISPC1_16_1-AVX-TBB2019_9:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-GCC-ISPC1_16_1-AVX-TBB2019_9 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-GCC-ISPC1_17_0-AVX2-TBB2021_2_0:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-GCC-ISPC1_17_0-AVX2-TBB2021_2_0 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  # ICX
  nightly-linux-DEBUG-ICX2024_0-ISPC1_16_1-AVX-TBB2019_2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/rockylinux:8.7
      dpcpp-version: intel/2024.1.0
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-ICX-ISPC1_16_1-AVX-TBB2019_2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-ICX2024_0-ISPC1_16_1-AVX512VL-TBB2019_2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/rockylinux:8.7
      runs-on: '[ "Linux", "docker", "avx512" ]'
      dpcpp-version: intel/2024.1.0
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-ICX-ISPC1_16_1-AVX512VL-TBB2019_2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-ICX2024_0-ISPC1_16_1-AVX512-TBB2019_9:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      runs-on: '[ "Linux", "docker", "avx512" ]'
      dpcpp-version: intel/2024.1.0
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-ICX-ISPC1_16_1-AVX512-TBB2019_9 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-ICX2024_0-ISPC1_16_1-AVX2-TBB2021_2_0:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      dpcpp-version: intel/2024.1.0
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-ICX-ISPC1_16_1-AVX2-TBB2021_2_0 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-ICX2024_0-ISPC1_17_0-AVX2-TBB2019_9:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/rockylinux:8.7
      dpcpp-version: intel/2024.1.0
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-ICX-ISPC1_17_0-AVX2-TBB2019_9 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-ICX2024_0-ISPC1_17_0-AVX512VL-TBB2021_5_0:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:22.04
      runs-on: '[ "Linux", "docker", "avx512" ]'
      dpcpp-version: intel/2024.1.0
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-DEBUG-ICX-ISPC1_17_0-AVX512VL-TBB2021_5_0 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --target build
        cmake --build build --target test_package

  # Testing different distros

  nightly-ubuntu20_04-DEBUG:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:20.04
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-distrotest-ISPC1_14_1-TBB2021_2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-ubuntu20_04-RELEASE-ISPC1_14_1-TBB2021_2_0:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/ubuntu:20.04
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-distrotest-ISPC1_14_1-TBB2021_2 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --target build
        cmake --build build --target test_package


  nightly-fedora32-DEBUG-AVX512:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:32
      runs-on: '[ "Linux", "docker", "avx512" ]'
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-distrotest-AVX512 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --target build
        cmake --build build --target test_package
 

  # Testing single primiteve types

  nightly-linux-DEBUG-CLANG4-TRI:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-TRI -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-QUAD:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-QUAD -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-GRID:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-GRID -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-CURVE:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-CURVE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-SUBDIV:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-SUBDIV -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-USERGEOM:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-USERGEOM -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-INSTANCE:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-INSTANCE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-Debug-CLANG4-INSTANCE_ARRAY:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-INSTANCE_ARRAY -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-DEBUG-CLANG4-INSTANCE-INSTANCE_ARRAY:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-singleprimitive-INSTANCE-INSTANCE_ARRAY -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  # Compilation test of disabled features
  # just building - not running tests for this
  nightly-linux-feature-NO_ISPC:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-NO_ISPC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-feature-NO_TUTORIALS:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-NO_TUTORIALS -DCMAKE_BUILD_TYPE=RelWithDebInfo
        cmake --build build --target build

  nightly-linux-feature-BACKFACECULLING:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-BACKFACECULLING -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build

  nightly-linux-feature-IGNORE-INVALID-RAYS:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-IGNORE-INVALID-RAYS -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build

  nightly-linux-feature-NO-FILTER-FUNCTION:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-NO-FILTER-FUNCTION -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build

  nightly-linux-feature-RAYMASKS:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-RAYMASKS -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-feature-NO-PACKETS:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-NO-PACKETS -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build

  nightly-linux-feature-STATCOUNTER:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-feature-STATCOUNTER -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  # Compilation test of individual ISAs

  nightly-linux-individualisa-SSE2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-individualisa-SSE2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-individualisa-SSE42:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-individualisa-SSE42 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-individualisa-AVX:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-individualisa-AVX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-individualisa-AVX2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-individualisa-AVX2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-linux-individualisa-AVX512:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
    with:
      image: embree/fedora:29
      cmd: |
        module load cmake/3.25.3
        cmake --preset nightly-linux-individualisa-AVX512 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
        cmake --build build --target build
        cmake --build build --target test_package




########################################
# Windows
########################################
  nightly-windows-RELEASE-ICX2024_0-ISPC1_13_0-AVX2-TBB2021_5_0:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      dpcpp-version: oneAPI/compiler/2024.1
      cmd: |
        cmake --preset nightly-windows-RELEASE-ICX-ISPC1_13_0-AVX2-TBB2021_5_0 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target build
        cmake --build build --config Release --target test_package

  nightly-windows-RELEASE-ICX2024_0-ISPC1_13_0-AVX512-TBB2019_9:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
      dpcpp-version: oneAPI/compiler/2024.1
      cmd: |
        cmake --preset nightly-windows-RELEASE-ICX-ISPC1_13_0-AVX512-TBB2019_9 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target build
        cmake --build build --config Release --target test_package

  nightly-windows-RELEASE-ICX2024_0-ISPC1_14_1-AVX2-TBB2021_2_0:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      dpcpp-version: oneAPI/compiler/2024.1
      cmd: |
        cmake --preset nightly-windows-RELEASE-ICX-ISPC1_14_1-AVX2-TBB2021_2_0 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --config Release --target build
        cmake --build build --config Release --target test_package

  ########################################
  # MacOS
  ########################################

#  nightly-macosx-ARM-NEON:
#    secrets: inherit
#    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
#    with:
#      runs-on: '[ "macOS", "arm", "build" ]'
#      cmd: |
#        cmake --preset nightly-macosx-ARM-NEON -D EMBREE_TESTING_INTENSITY=2
#        cmake --build build --target package -j8
#        cd build
#        ctest -VV

  nightly-macosx-x64:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-x64 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
        cmake --build build --target build
        cmake --build build --target test_package

  # CLANG compilation and testing of different ISAs

  nightly-macosx-individualisa-CLANG-SSE2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-individualisa-CLANG-SSE2 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-macosx-individualisa-CLANG-AVX:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-individualisa-CLANG-AVX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-macosx-individualisa-CLANG-SSE2-STATIC:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-individualisa-CLANG-SSE2-STATIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  # AppleClang compilation and testing of different ISAs

  nightly-macosx-AVX:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-AVX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-macosx-AVX2-SIMD256:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "avx2", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-AVX2-SIMD256 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package

  nightly-macosx-AVX2:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
    with:
      runs-on: '[ "macOS", "avx2", "build", "x86_64" ]'
      cmd: |
        cmake --preset nightly-macosx-AVX2 -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
        cmake --build build --target build
        cmake --build build --target test_package





###  ########################################
###  # ARM EMULATION
###  ########################################
###
###  nightly-linux-arm-emulation:
###    secrets: inherit
###    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
###    with:
###      image: embree/arm64v8-ubuntu:22.04
###      runs-on: '[ "Linux", "docker-arm", "ARM64" ]'
###      cmd: |
###        cmake --preset nightly-linux-arm-emulation -D EMBREE_TESTING_INTENSITY=2
###        cmake --build build --target package -j8
###        cd build
###        ctest -VV
