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

name: Nightly Windows Workflow
on:
  schedule:
    - cron:  '0 0 * * *'
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:

  build-windows-msvc15-debug:
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      force-delete: true    # guarantees .gitattributes are respected in working dir
      submodules: true
      runs-on: '[ "Windows", "build" ]'
      artifact-out: build-windows-msvc15-debug
      artifact-path: ./build/install
      cmd: gitlab\build.bat "Visual Studio 15 2017 Win64" "v141" "Debug"

  test-windows-msvc15-debug:
    needs: build-windows-msvc15-debug
    secrets: inherit
    uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
    with:
      runs-on: '[ "Windows", "build" ]'
      artifact-in: build-windows-msvc15-debug
      cmd: |
        gitlab\run_tests.bat