From 02e0edae6fca44703eb9c7347a9db49a4c1d0ae5 Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Sat, 7 Feb 2026 18:28:44 +0900 Subject: [PATCH 1/4] Add real workflows ready to test. --- .github/workflows/check-dfdutils.yml | 91 ++++++++++++++++++++++++++++ .github/workflows/check-reuse.yml | 36 +++++++++++ 2 files changed, 127 insertions(+) diff --git a/.github/workflows/check-dfdutils.yml b/.github/workflows/check-dfdutils.yml index e69de29..e841e20 100644 --- a/.github/workflows/check-dfdutils.yml +++ b/.github/workflows/check-dfdutils.yml @@ -0,0 +1,91 @@ +# Copyright 2015-2020 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 +name: Check Config and Build of dfdutils and run test programs. + +# 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: + - README.md + - CODE_OF_CONDUCT.adoc + - CONTRIBUTING.adoc + - LICENSE.adoc + - LICENSES + - RELEASE_NOTES.adoc + - REUSE.toml + + # Allow manual trigger + workflow_dispatch: + workflow_call: + +jobs: + check-libktx-only: + strategy: + matrix: + os: [ macos-latest, ubuntu-latest, windows-latest ] + #warch: [ arm64, x64 ] + #larch: [ aarch64, x86_64 ] + #march: [ arm64, x86_64 ] + # runner.arch values are X86, X64, ARM, or ARM64. + config: [ Release, Debug ] + generator: [ 'Ninja Multi-Config' ] + exclude: + - os: windows-latest + generator: 'Ninja Multi-Config' + include: + # The NMC generator defaults to using GCC and GCC names dlls with + # a "lib" prefix and the import files with both the prefix and a + # ".dll.a" extension. I have neither the time nor energy to find out + # how to change the behaviour. Use VS. + - os: windows-latest + generator: 'Visual Studio 17 2022' + config: Release + static: OFF + - os: windows-latest + generator: 'Visual Studio 17 2022' + config: Release + static: ON + + runs-on: ${{ matrix.os }} + env: + GIT_LFS_SKIP_SMUDGE: 1 + BUILD_DIR: "build" + #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: Configure dfdutils + run: cmake -B ${{ env.BUILD_DIR }} -G "${{ matrix.generator }}" + - name: Build dfdutils Release config + run: cmake --build ${{ env.BUILD_DIR }} --config=${{ matrix.config }} + + - name: Run test programs + run: | + build/testcreatedfd + build/testinterpretdfd + build/testbidirectionalmapping + + - name: Upload artifact libdfdutils + if: matrix.config == 'Release' + uses: actions/upload-artifact@v4 + with: + name: libdfdutils-${{ runner.os }}-${{ runner.arch }} + path: ${{env.BUILD_DIR}}/Release/*dfdutils* + diff --git a/.github/workflows/check-reuse.yml b/.github/workflows/check-reuse.yml index e69de29..c358aa5 100644 --- a/.github/workflows/check-reuse.yml +++ b/.github/workflows/check-reuse.yml @@ -0,0 +1,36 @@ +# Copyright 2015-2020 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 +name: Check reuse lint + +# 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]+-*' + + # Allow manual trigger + workflow_dispatch: + +jobs: + check-reuse: + runs-on: ubuntu-latest + env: + GIT_LFS_SKIP_SMUDGE: 1 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v5 + From 4a54f37b9525e25080ecda9d7a5df5ad6b01b589 Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Sat, 7 Feb 2026 18:43:28 +0900 Subject: [PATCH 2/4] Add config name to executable path. --- .github/workflows/check-dfdutils.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-dfdutils.yml b/.github/workflows/check-dfdutils.yml index e841e20..c36e503 100644 --- a/.github/workflows/check-dfdutils.yml +++ b/.github/workflows/check-dfdutils.yml @@ -78,9 +78,9 @@ jobs: - name: Run test programs run: | - build/testcreatedfd - build/testinterpretdfd - build/testbidirectionalmapping + build/${{ matrix.config }}/testcreatedfd + build/${{ matrix.config }}testinterpretdfd + build/${{ matrix.config }}testbidirectionalmapping - name: Upload artifact libdfdutils if: matrix.config == 'Release' From 64663ff1b7ba9d97e6f49e859d82a9094bb6029c Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Sat, 7 Feb 2026 18:45:30 +0900 Subject: [PATCH 3/4] Add missing path separators. --- .github/workflows/check-dfdutils.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-dfdutils.yml b/.github/workflows/check-dfdutils.yml index c36e503..a97680a 100644 --- a/.github/workflows/check-dfdutils.yml +++ b/.github/workflows/check-dfdutils.yml @@ -79,8 +79,8 @@ jobs: - name: Run test programs run: | build/${{ matrix.config }}/testcreatedfd - build/${{ matrix.config }}testinterpretdfd - build/${{ matrix.config }}testbidirectionalmapping + build/${{ matrix.config }}/testinterpretdfd + build/${{ matrix.config }}/testbidirectionalmapping - name: Upload artifact libdfdutils if: matrix.config == 'Release' From 3becf5c99f429f7d581da4794174d6dc3185c32f Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Sat, 7 Feb 2026 18:58:28 +0900 Subject: [PATCH 4/4] Comment out artifact upload as OBJECT library does not produce any. --- .github/workflows/check-dfdutils.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-dfdutils.yml b/.github/workflows/check-dfdutils.yml index a97680a..6c1928e 100644 --- a/.github/workflows/check-dfdutils.yml +++ b/.github/workflows/check-dfdutils.yml @@ -82,10 +82,12 @@ jobs: build/${{ matrix.config }}/testinterpretdfd build/${{ matrix.config }}/testbidirectionalmapping - - name: Upload artifact libdfdutils - if: matrix.config == 'Release' - uses: actions/upload-artifact@v4 - with: - name: libdfdutils-${{ runner.os }}-${{ runner.arch }} - path: ${{env.BUILD_DIR}}/Release/*dfdutils* +# Presumable because it is built as an OBJECT library, a ninja build does +# not create a .a file. +# - name: Upload artifact libdfdutils +# if: matrix.config == 'Release' +# uses: actions/upload-artifact@v4 +# with: +# name: libdfdutils-${{ runner.os }}-${{ runner.arch }} +# path: ${{env.BUILD_DIR}}/Release/*dfdutils*