# Copyright 2015-2020 The Khronos Group Inc. # SPDX-License-Identifier: Apache-2.0 name: KTX-Software MingW CI # Seems no way to avoid duplicating this on logic in each .yml file. # See https://github.com/actions/starter-workflows/issues/245. on: # Trigger the workflow on a pull request, pull_request: push: # And on pushes to main, which will occur when a PR is merged. branches: - main # Also trigger on push of release tags to any branch. Useful # for testing release builds before merging to main. tags: - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9]+.[0-9]+.[0-9]+-*' paths-ignore: - .appveyor.yml - .github/workflows/android.yml - .github/workflows/check-mkvk.yml - .github/workflows/docs.yml - .github/workflows/formatting.yml - .github/workflows/publish-pyktx.yml - .github/workflows/windows.yml - .travis.yml - README.md - CODE_OF_CONDUCT.md - CONTRIBUTING.md - LICENSE.md - LICENSES - RELEASE_NOTES.md - REUSE.toml - install-gitconfig* - vcpkg.json - vcpkg-configuration.json # Allow manual trigger workflow_dispatch: workflow_call: jobs: mingw: runs-on: windows-latest defaults: run: shell: bash env: # To avoid bandwidth charges skip downloading source and golden images # for texturetests etc., loadtests and legacy tool tests. They will be # pulled later as necessary GIT_LFS_SKIP_SMUDGE: 1 WERROR: ON steps: - uses: actions/checkout@v4 with: # Fetch all history to make sure tags are # included (used for version creation) fetch-depth: 0 - name: GCC Version run: gcc --version # If this fails MINGW is not setup correctly - name: Force update provoking tag # Work around https://github.com/actions/checkout/issues/290. if: github.ref_type == 'tag' run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} - name: Pull test images from Git LFS run: git lfs pull --include=tests/srcimages,tests/testimages - name: Fetch CTS Submodule run: git submodule update --init --recursive tests/cts - name: Install Ninja run: choco install ninja --no-progress - name: Configure Mingw x64 run: cmake -B build -G "Ninja Multi-Config" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DKTX_FEATURE_TOOLS=TRUE -DKTX_FEATURE_TOOLS_CTS=TRUE -DKTX_WERROR=$WERROR - name: Build Mingw x64 Debug run: cmake --build build --config Debug - name: Build Mingw x64 Release run: cmake --build build --config Release - name: Test Mingw build run: ctest --output-on-failure --test-dir build -C Release # - name: Upload test log # shell: pwsh # if: ${{ failure() }} # run: scripts/on_failure.ps1