diff --git a/.github/workflows/check-dfdutils.yml b/.github/workflows/check-dfdutils.yml index e69de29..6c1928e 100644 --- a/.github/workflows/check-dfdutils.yml +++ b/.github/workflows/check-dfdutils.yml @@ -0,0 +1,93 @@ +# 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/${{ matrix.config }}/testcreatedfd + build/${{ matrix.config }}/testinterpretdfd + build/${{ matrix.config }}/testbidirectionalmapping + +# 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* + 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 +