From 94547e48548ef49f9330a43ff197399e4e3ec055 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 30 Jul 2023 22:01:08 -0700 Subject: [PATCH 1/4] GitHub actions: added build-nuget-package job --- .github/workflows/build-android.yml | 38 ----- .github/workflows/build-apple.yml | 89 ------------ .github/workflows/build-emscripten.yml | 51 ------- .github/workflows/build-linux.yml | 147 -------------------- .github/workflows/build-nuget-package.yml | 31 ----- .github/workflows/build-windows.yml | 54 ++----- .github/workflows/codeql.yml | 71 ---------- .github/workflows/msvc_analysis.yml | 76 ---------- .github/workflows/publish-nuget-package.yml | 36 ----- 9 files changed, 10 insertions(+), 583 deletions(-) delete mode 100644 .github/workflows/build-android.yml delete mode 100644 .github/workflows/build-apple.yml delete mode 100644 .github/workflows/build-emscripten.yml delete mode 100644 .github/workflows/build-linux.yml delete mode 100644 .github/workflows/build-nuget-package.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/msvc_analysis.yml delete mode 100644 .github/workflows/publish-nuget-package.yml diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml deleted file mode 100644 index cd2e0b0882..0000000000 --- a/.github/workflows/build-android.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Android build - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-20.04 - - strategy: - matrix: - include: - - name: "ARM32" - arch: "armeabi-v7a" - - - name: "ARM64" - arch: "arm64-v8a" - - name: Linux -> Android-${{ matrix.name }} - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up build environment - if: success() - uses: DiligentGraphics/github-action/setup-build-env@v1 - with: - platform: Android - - - name: Build with Gradle - env: - ANDROID_ARCH: ${{ matrix.arch }} - run: | - cd ./BuildTools/Android - chmod +x gradlew - ./gradlew buildCMakeDebug diff --git a/.github/workflows/build-apple.yml b/.github/workflows/build-apple.yml deleted file mode 100644 index 0ea5e0fa06..0000000000 --- a/.github/workflows/build-apple.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: MacOS/iOS/tvOS build - -on: [push, pull_request] - -jobs: - precheks: - runs-on: macos-12 - name: MacOS -> Pre-Checks - - steps: - - name: Clone repository - uses: actions/checkout@v3 - - - name: Format validation - shell: bash - working-directory: ${{github.workspace}}/BuildTools/FormatValidation - run: ./validate_format_mac.sh - - - build: - needs: precheks - runs-on: macos-12 - - strategy: - matrix: - platform: ["MacOS", "iOS", "tvOS"] - build_type: ["Debug", "Release"] - - exclude: - # Exclude tvOS-Debug - - platform: "tvOS" - build_type: "Debug" - - include: - - platform: "MacOS" - build_type: "Debug" - cmake_args: "-DDILIGENT_BUILD_TESTS=ON" - - - platform: "MacOS" - build_type: "Release" - # For some reason AVX2 causes invalid instruction exception on CI, so disable it - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_CLANG_RELEASE_COMPILE_OPTIONS=\"\"" - - - platform: "iOS" - cmake_args: "" - - - platform: "tvOS" - cmake_args: "" - - name: MacOS -> ${{ matrix.platform }}-${{ matrix.build_type }} - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up build environment - if: success() - uses: DiligentGraphics/github-action/setup-build-env@v1 - with: - platform: ${{ matrix.platform }} - - - name: Configure CMake - if: success() - uses: DiligentGraphics/github-action/configure-cmake@v1 - with: - build-type: ${{ matrix.build_type }} - cmake-args: ${{ matrix.cmake_args }} - - - name: Build - if: success() - uses: DiligentGraphics/github-action/build@v1 - with: - target: install - - - name: DiligentCoreTest - if: ${{ success() && matrix.platform == 'MacOS' }} - uses: DiligentGraphics/github-action/run-core-tests@v1 - - - name: Upload artifact - uses: actions/upload-artifact@v3 - if: ${{ success() && matrix.build_type == 'Release' }} - with: - name: DiligentCore-${{ matrix.platform }}-${{ matrix.build_type }} - path: | - ${{env.DILIGENT_INSTALL_DIR}} - !${{env.DILIGENT_INSTALL_DIR}}/**/*.a - retention-days: 90 diff --git a/.github/workflows/build-emscripten.yml b/.github/workflows/build-emscripten.yml deleted file mode 100644 index d10ef04162..0000000000 --- a/.github/workflows/build-emscripten.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Emscripten build - -on: [push, pull_request] - -jobs: - build: - strategy: - matrix: - os: ["windows-latest", "ubuntu-20.04", "macos-latest"] - build_type: ["Debug", "Release"] - - exclude: - # Exclude MacOS-Release - - os: "macos-latest" - build_type: "Release" - - include: - - os: "windows-latest" - host_name: "Win10" - - - os: "ubuntu-20.04" - host_name: "Linux" - - - os: "macos-latest" - host_name: "MacOS" - - runs-on: ${{ matrix.os }} - name: ${{ matrix.host_name }} -> Emscripten, ${{ matrix.build_type }} - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up build environment - if: success() - uses: DiligentGraphics/github-action/setup-build-env@v1 - with: - platform: Emscripten - - - name: Configure CMake - if: success() - uses: DiligentGraphics/github-action/configure-cmake@v1 - with: - build-type: ${{ matrix.build_type }} - cmake-args: "-DDILIGENT_BUILD_CORE_INCLUDE_TEST=ON" - - - name: Build - if: success() - uses: DiligentGraphics/github-action/build@v1 diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml deleted file mode 100644 index c53d74fc01..0000000000 --- a/.github/workflows/build-linux.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: Linux build - -on: [push, pull_request] - -jobs: - precheks: - runs-on: ubuntu-20.04 - name: Linux -> Pre-checks - - steps: - - name: Clone repository - uses: actions/checkout@v3 - - - name: Format validation - shell: bash - working-directory: ${{github.workspace}}/BuildTools/FormatValidation - run: ./validate_format_linux.sh - - - name: Codespell - uses: codespell-project/actions-codespell@master - with: - check_filenames: true - ignore_words_file: .github/.codespellignore - skip: ./.git,./ThirdParty - path: . - - - build: - needs: precheks - runs-on: ubuntu-20.04 - - strategy: - fail-fast: false - matrix: - include: - - name: "GCC" - build_type: "Debug" - cmake_generator: "Unix Makefiles" - cmake_args: "-DDILIGENT_BUILD_TESTS=ON" - cc: "gcc-9" - cxx: "g++-9" - - - name: "GCC" - build_type: "Release" - cmake_generator: "Unix Makefiles" - cmake_args: "-DDILIGENT_BUILD_TESTS=ON" - cc: "gcc-9" - cxx: "g++-9" - - - name: "Clang" - build_type: "Debug" - cmake_generator: "Ninja" - cmake_args: "-DDILIGENT_BUILD_TESTS=ON" - cc: "clang-12" - cxx: "clang++-12" - - - name: "Clang" - build_type: "Release" - cmake_generator: "Ninja" - cmake_args: "-DDILIGENT_BUILD_TESTS=ON" - cc: "clang-12" - cxx: "clang++-12" - - - name: "Clang-NO_GLSLANG" - build_type: "Debug" - cmake_generator: "Ninja" - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_NO_OPENGL=ON -DDILIGENT_NO_GLSLANG=ON" - cc: "clang-12" - cxx: "clang++-12" - - - name: "Clang-NO_GLSLANG-NO_HLSL" - build_type: "Release" - cmake_generator: "Ninja" - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON" - cc: "clang-12" - cxx: "clang++-12" - - name: Linux -> ${{ matrix.name }}-x64, ${{ matrix.build_type }} - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up build environment - if: success() - uses: DiligentGraphics/github-action/setup-build-env@v1 - with: - platform: Linux - cmake-generator: ${{ matrix.cmake_generator }} - - - name: Configure CMake - if: success() - uses: DiligentGraphics/github-action/configure-cmake@v1 - with: - cc: ${{ matrix.cc }} - cxx: ${{ matrix.cxx }} - generator: ${{ matrix.cmake_generator }} - build-type: ${{ matrix.build_type }} - cmake-args: ${{ matrix.cmake_args }} - - - - name: Build - id: build - if: success() - uses: DiligentGraphics/github-action/build@v1 - with: - target: install - - - name: DiligentCoreTest - if: success() - uses: DiligentGraphics/github-action/run-core-tests@v1 - - - name: DiligentCoreAPITest VK - # NB: it is essential to include failure() to override the default status check of success() - # that is automatically applied to if conditions that don't contain a status check function. - if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }} - uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - with: - mode: vk_sw - args: --gtest_filter=-DrawCommandTest.DrawIndexedInstancedIndirect_FirstInstance_BaseVertex_FirstIndex_VBOffset_IBOffset_InstOffset:TextureCreation/TextureCreationTest.CreateTexture/TEX_FORMAT_BGRA8_TYPELESS - - - name: DiligentCoreAPITest GL - if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }} - uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - with: - mode: gl - args: "--gtest_filter=-DrawCommandTest.MultiDrawIndirectCount:DrawCommandTest.MultiDrawIndexedIndirectCount:PipelineResourceSignatureTest.StructuredBuffers" - - - name: DiligentCoreAPITest GL with Non-Separable Programs - if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }} - uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - with: - mode: gl - non-separable-progs: true - args: "--gtest_filter=-DrawCommandTest.MultiDrawIndirectCount:DrawCommandTest.MultiDrawIndexedIndirectCount:PipelineResourceSignatureTest.StructuredBuffers:DrawCommandTest.StructuredBufferArray" - - - name: Upload artifact - uses: actions/upload-artifact@v3 - if: ${{ success() && matrix.build_type != 'Debug' }} - with: - name: DiligentCore-Linux-${{ matrix.name }}-x64-${{ matrix.build_type }} - path: | - ${{env.DILIGENT_INSTALL_DIR}} - !${{env.DILIGENT_INSTALL_DIR}}/**/*.a - retention-days: 90 diff --git a/.github/workflows/build-nuget-package.yml b/.github/workflows/build-nuget-package.yml deleted file mode 100644 index 037bee09d4..0000000000 --- a/.github/workflows/build-nuget-package.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build NuGet package - -on: [push, pull_request] - -env: - MSBuildEnableWorkloadResolver: false - -jobs: - build: - strategy: - matrix: - toolset: [x64] - config: [Debug, Release] - - runs-on: windows-latest - name: Windows 10, ${{ matrix.config }} ${{ matrix.toolset }} - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - - name: Install python packages - working-directory: ${{github.workspace}} - run: python -m pip install -r ./BuildTools/.NET/requirements.txt - - - name: Build and run - working-directory: ${{github.workspace}} - run: python ./BuildTools/.NET/dotnet-build-package.py -c ${{matrix.config}} -s ./BuildTools/.NET/dotnet-build-settings.json -d ./ --dotnet-tests --free-memory diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 24ba570c3a..5238f0c2bb 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -28,52 +28,9 @@ jobs: toolset: ["Win32", "x64"] build_type: ["Debug", "Release"] cmake_generator: ["Visual Studio 17 2022"] - cmake_args: ["-DDILIGENT_BUILD_TESTS=ON"] + cmake_args: ["-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_VULKAN=ON -DDILIGENT_NO_OPENGL=ON"] platform: ["Win32"] - include: - - name: "Win10-Dev" - platform: "Win32" - toolset: "x64" - build_type: "RelWithDebInfo" - cmake_generator: "Visual Studio 17 2022" - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_DEVELOPMENT=ON -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON" - - - name: "Win8.1" - platform: "Win32" - toolset: "x64" - build_type: "Release" - cmake_generator: "Visual Studio 17 2022" - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DCMAKE_SYSTEM_VERSION=8.1" - - - name: "Win10-Ninja" - platform: "Win32" - toolset: "x64" - build_type: "Debug" - cmake_generator: "Ninja" - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON" - - - name: "MinGW" - platform: "Win32" - toolset: "x64" - build_type: "Release" - cmake_generator: "MinGW Makefiles" - cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON" - - - name: "UWP" - platform: "UWP" - toolset: "x64" - build_type: "Debug" - cmake_generator: "Visual Studio 17 2022" - cmake_args: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON" - - - name: "UWP" - platform: "UWP" - toolset: "x64" - build_type: "Release" - cmake_generator: "Visual Studio 17 2022" - cmake_args: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON" - name: Win10 -> ${{ matrix.name }}-${{ matrix.toolset }}, ${{ matrix.build_type }} steps: @@ -143,3 +100,12 @@ jobs: !${{env.DILIGENT_INSTALL_DIR}}/**/*.lib !${{env.DILIGENT_INSTALL_DIR}}/**/*.a retention-days: 90 + + + build-nuget-package: + needs: build + runs-on: windows-2022 + + steps: + - name: Clone repository + uses: actions/checkout@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index e3548e07d1..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: CodeQL Code Scanning - -on: [push, pull_request] - -jobs: - run-analysis: - strategy: - matrix: - toolset: ["x64"] - build_type: ["Debug"] - host_name: ["Win10", "Linux"] - cmake_args: ["-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON"] - include: - - host_name: "Win10" - platform: "Win32" - os: "windows-2022" - cmake_generator: "Visual Studio 17 2022" - - - host_name: "Linux" - platform: "Linux" - os: "ubuntu-20.04" - cmake_generator: "Ninja" - cc: "clang-12" - cxx: "clang++-12" - - runs-on: ${{ matrix.os }} - name: ${{ matrix.host_name }} -> Code QL, ${{ matrix.toolset }}, ${{ matrix.build_type }} - - permissions: - # required for all workflows - security-events: write - # only required for workflows in private repositories - actions: read - contents: read - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up build environment - if: success() - uses: DiligentGraphics/github-action/setup-build-env@v1 - with: - platform: ${{ matrix.platform }} - cmake-generator: ${{ matrix.cmake_generator }} - - - name: Configure CMake - if: success() - uses: DiligentGraphics/github-action/configure-cmake@v1 - with: - cc: ${{ matrix.cc }} - cxx: ${{ matrix.cxx }} - generator: ${{ matrix.cmake_generator }} - vs-arch: ${{ matrix.toolset }} - build-type: ${{ matrix.build_type }} - cmake-args: ${{ matrix.cmake_args }} - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: cpp - queries: security-and-quality - - - name: Build - if: success() - uses: DiligentGraphics/github-action/build@v1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/msvc_analysis.yml b/.github/workflows/msvc_analysis.yml deleted file mode 100644 index 12273ef884..0000000000 --- a/.github/workflows/msvc_analysis.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: MSVC Code Analysis - -on: [push, pull_request] - -jobs: - run-analysis: - strategy: - matrix: - include: - - host_name: "Win10" - platform: "Win32" - toolset: "x64" - build_type: "Debug" - cmake_args: "-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON" - cmake_generator: "Visual Studio 17 2022" - - runs-on: windows-2022 - name: ${{ matrix.host_name }} -> MSVC Analysis, ${{ matrix.toolset }}, ${{ matrix.build_type }} - - permissions: - # required for all workflows - security-events: write - # only required for workflows in private repositories - actions: read - contents: read - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up build environment - if: success() - uses: DiligentGraphics/github-action/setup-build-env@v1 - with: - platform: ${{ matrix.platform }} - cmake-generator: ${{ matrix.cmake_generator }} - - - name: Configure CMake - if: success() - uses: DiligentGraphics/github-action/configure-cmake@v1 - with: - generator: ${{ matrix.cmake_generator }} - vs-arch: ${{ matrix.toolset }} - build-type: ${{ matrix.build_type }} - cmake-args: ${{ matrix.cmake_args }} - - - name: Build - if: success() - uses: DiligentGraphics/github-action/build@v1 - - - name: Run MSVC Code Analysis - uses: microsoft/msvc-code-analysis-action@v0.1.1 - # Provide a unique ID to access the sarif output path - id: run-analysis - with: - cmakeBuildDirectory: ${{ env.DILIGENT_BUILD_DIR }} - buildConfiguration: ${{ matrix.build_type }} - # Ruleset file that will determine what checks will be run - ruleset: NativeRecommendedRules.ruleset - # Paths to ignore analysis of CMake targets and includes - ignoredPaths: '${{ github.workspace }}/ThirdParty' - - # Upload SARIF file to GitHub Code Scanning Alerts - - name: Upload SARIF to GitHub - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: ${{ steps.run-analysis.outputs.sarif }} - - # Upload SARIF file as an Artifact to download and view - - name: Upload SARIF as an Artifact - uses: actions/upload-artifact@v3 - with: - name: sarif-file - path: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/publish-nuget-package.yml b/.github/workflows/publish-nuget-package.yml deleted file mode 100644 index d954dfe522..0000000000 --- a/.github/workflows/publish-nuget-package.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Publish NuGet package - -on: - push: - tags: - - 'v*' - - 'API*' - workflow_dispatch: - -env: - MSBuildEnableWorkloadResolver: false - NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' - -jobs: - deploy: - runs-on: windows-latest - name: Deploying NuGet package - - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - - name: Install python packages - working-directory: ${{github.workspace}} - run: python -m pip install -r ./BuildTools/.NET/requirements.txt - - - name: Build and run - working-directory: ${{github.workspace}} - run: python ./BuildTools/.NET/dotnet-build-package.py -c Release -s ./BuildTools/.NET/dotnet-build-settings.json -d ./ --dotnet-publish - - - name: Publish NuGet package - run: dotnet nuget push *.nupkg -k ${{secrets.NUGET_AUTH_TOKEN}} -s ${{env.NUGET_SOURCE_URL}} - working-directory: ${{github.workspace}}/build/.NET/Graphics/GraphicsEngine.NET/bin/Release From 00acb4ab8d2b7c44ae1c3ae44631d3c3fc91c77f Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 30 Jul 2023 22:12:03 -0700 Subject: [PATCH 2/4] Simplified build steps --- .github/workflows/build-windows.yml | 69 +++++++++++++++++------------ 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 5238f0c2bb..d197a4df32 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -28,7 +28,7 @@ jobs: toolset: ["Win32", "x64"] build_type: ["Debug", "Release"] cmake_generator: ["Visual Studio 17 2022"] - cmake_args: ["-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_VULKAN=ON -DDILIGENT_NO_OPENGL=ON"] + cmake_args: ["-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_VULKAN=ON -DDILIGENT_NO_OPENGL=ON -DDILIGENT_BUILD_CORE_INCLUDE_TEST=OFF"] platform: ["Win32"] name: Win10 -> ${{ matrix.name }}-${{ matrix.toolset }}, ${{ matrix.build_type }} @@ -63,33 +63,33 @@ jobs: with: target: install - - name: DiligentCoreTest - if: ${{ success() && matrix.name != 'UWP'}} - uses: DiligentGraphics/github-action/run-core-tests@v1 - - - name: DiligentCoreAPITest D3D11 - # NB: it is essential to include failure() to override the default status check of success() - # that is automatically applied to if conditions that don't contain a status check function. - if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win8.1') }} - uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - with: - mode: d3d11_sw - - - name: DiligentCoreAPITest D3D12 - if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} - uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - with: - mode: d3d12_sw - - - name: DiligentCoreAPITest D3D12 DXC - if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} - uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - with: - mode: d3d12_sw - use-dxc: true - # Disable texture creation tests that are not relevant for DXC to save time - args: --gtest_filter=-TextureCreation* - + #- name: DiligentCoreTest + # if: ${{ success() && matrix.name != 'UWP'}} + # uses: DiligentGraphics/github-action/run-core-tests@v1 + # + #- name: DiligentCoreAPITest D3D11 + # # NB: it is essential to include failure() to override the default status check of success() + # # that is automatically applied to if conditions that don't contain a status check function. + # if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win8.1') }} + # uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 + # with: + # mode: d3d11_sw + # + #- name: DiligentCoreAPITest D3D12 + # if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} + # uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 + # with: + # mode: d3d12_sw + # + #- name: DiligentCoreAPITest D3D12 DXC + # if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} + # uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 + # with: + # mode: d3d12_sw + # use-dxc: true + # # Disable texture creation tests that are not relevant for DXC to save time + # args: --gtest_filter=-TextureCreation* + # - name: Upload artifact uses: actions/upload-artifact@v3 if: ${{ success() && matrix.build_type != 'Debug' && matrix.cmake_generator != 'Ninja' }} @@ -109,3 +109,16 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v3 + + #- name: Extract artifacts + # working-directory: ${{github.workspace}} + # run: + # https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts + + - name: Install python packages + working-directory: ${{github.workspace}} + run: python -m pip install -r ./BuildTools/.NET/requirements.txt + + #- name: Build and run + # working-directory: ${{github.workspace}} + # run: python ./BuildTools/.NET/dotnet-build-package.py -c ${{matrix.config}} -s ./BuildTools/.NET/dotnet-build-settings.json -d ./ --dotnet-tests --free-memory From a61be00ac7c134f21450bfbb0e86f9abac21b66f Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 30 Jul 2023 22:29:19 -0700 Subject: [PATCH 3/4] Renamed workflow; pack test executable to artifacts --- ...ld-windows.yml => build-nuget-package.yml} | 36 +++---------------- 1 file changed, 5 insertions(+), 31 deletions(-) rename .github/workflows/{build-windows.yml => build-nuget-package.yml} (65%) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-nuget-package.yml similarity index 65% rename from .github/workflows/build-windows.yml rename to .github/workflows/build-nuget-package.yml index d197a4df32..6981183ddb 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-nuget-package.yml @@ -1,4 +1,4 @@ -name: Win32/UWP build +name: Build NuGet package on: [push, pull_request] @@ -17,7 +17,7 @@ jobs: run: validate_format_win.bat - build: + native-build: needs: precheks runs-on: windows-2022 @@ -63,47 +63,21 @@ jobs: with: target: install - #- name: DiligentCoreTest - # if: ${{ success() && matrix.name != 'UWP'}} - # uses: DiligentGraphics/github-action/run-core-tests@v1 - # - #- name: DiligentCoreAPITest D3D11 - # # NB: it is essential to include failure() to override the default status check of success() - # # that is automatically applied to if conditions that don't contain a status check function. - # if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win8.1') }} - # uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - # with: - # mode: d3d11_sw - # - #- name: DiligentCoreAPITest D3D12 - # if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} - # uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - # with: - # mode: d3d12_sw - # - #- name: DiligentCoreAPITest D3D12 DXC - # if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} - # uses: DiligentGraphics/github-action/run-core-gpu-tests@v1 - # with: - # mode: d3d12_sw - # use-dxc: true - # # Disable texture creation tests that are not relevant for DXC to save time - # args: --gtest_filter=-TextureCreation* - # - name: Upload artifact uses: actions/upload-artifact@v3 - if: ${{ success() && matrix.build_type != 'Debug' && matrix.cmake_generator != 'Ninja' }} + if: ${{ success() && matrix.build_type != 'Debug' }} with: name: DiligentCore-${{ matrix.name }}-${{ matrix.toolset }}-${{ matrix.build_type }} path: | ${{env.DILIGENT_INSTALL_DIR}} !${{env.DILIGENT_INSTALL_DIR}}/**/*.lib !${{env.DILIGENT_INSTALL_DIR}}/**/*.a + ${{env.DILIGENT_BUILD_DIR}}/Tests/DiligentCoreAPITest/${{ matrix.build_type }}/*.exe retention-days: 90 build-nuget-package: - needs: build + needs: native-build runs-on: windows-2022 steps: From 0acd053b79f0ce552976a3001b0055ddd62380a3 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 30 Jul 2023 23:05:14 -0700 Subject: [PATCH 4/4] Package debug artifacts --- .github/workflows/build-nuget-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-nuget-package.yml b/.github/workflows/build-nuget-package.yml index 6981183ddb..eb557c4488 100644 --- a/.github/workflows/build-nuget-package.yml +++ b/.github/workflows/build-nuget-package.yml @@ -28,7 +28,7 @@ jobs: toolset: ["Win32", "x64"] build_type: ["Debug", "Release"] cmake_generator: ["Visual Studio 17 2022"] - cmake_args: ["-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_VULKAN=ON -DDILIGENT_NO_OPENGL=ON -DDILIGENT_BUILD_CORE_INCLUDE_TEST=OFF"] + cmake_args: ["-DILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_NO_VULKAN=ON -DDILIGENT_NO_OPENGL=ON"] platform: ["Win32"] name: Win10 -> ${{ matrix.name }}-${{ matrix.toolset }}, ${{ matrix.build_type }} @@ -65,7 +65,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 - if: ${{ success() && matrix.build_type != 'Debug' }} + if: ${{ success() }} with: name: DiligentCore-${{ matrix.name }}-${{ matrix.toolset }}-${{ matrix.build_type }} path: |