summaryrefslogtreecommitdiff
path: root/.github/workflows/falcor-test.yml
blob: df2b1c2d56908d58267ea846764bf40e7edb7e4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This is a basic workflow to help you get started with Actions

name: Falcor Tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
jobs:
  build:
    runs-on: [Windows, self-hosted]
    timeout-minutes: 100
    continue-on-error: true
    strategy:
      fail-fast: false
      matrix:
        configuration: ['Release']
        platform: ['x64']
        include:
          - platform: x64
            testPlatform: x64
          - platform: x64
            testCategory: full
    steps:
    - uses: actions/checkout@v3
      with:
        submodules: 'true'
        fetch-depth: '0'
    - name: setup-msbuild
      uses: microsoft/setup-msbuild@v1
    - name: setup-falcor
      run: |
        mkdir FalcorBin
        cd FalcorBin
        Copy-Item -Path 'C:\Falcor\build\windows-vs2022\bin' -Destination '.\build\windows-vs2022\bin' -Recurse -Exclude ("*.pdb")
        Copy-Item -Path 'C:\Falcor\tests' -Destination '.\' -Recurse
        Copy-Item -Path 'C:\Falcor\tools' -Destination '.\' -Recurse
        Copy-Item -Path 'C:\Falcor\media' -Destination '.\' -Recurse
        Copy-Item -Path 'C:\Falcor\media_internal' -Destination '.\' -Recurse
        Copy-Item -Path 'C:\Falcor\scripts' -Destination '.\' -Recurse
        cd ..\
    - name: build
      run: |
        .\premake.bat vs2019 --arch=${{matrix.platform}} --deps=true --no-progress=true --enable-cuda=true
        
        .\make-slang-tag-version.bat
        
        MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 -maxcpucount:12

        Copy-Item -Path '.\bin\windows-${{matrix.platform}}\${{matrix.configuration}}\*' -Destination '.\FalcorBin\build\windows-vs2022\bin\Release\' -Recurse -Exclude ("*.pdb")
    - name: falcor-unit-test
      run: |
        $ErrorActionPreference = "SilentlyContinue"
        cd .\FalcorBin\tests
        python ./testing/run_unit_tests.py --config windows-vs2022-Release -t "-slow"
        cd ../../
    - name: falcor-image-test
      run: |
        $ErrorActionPreference = "SilentlyContinue"
        cd .\FalcorBin\tests
        python ./testing/run_image_tests.py --config windows-vs2022-Release --run-only
        cd ../../