Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/check-dfdutils.yml
Original file line number Diff line number Diff line change
@@ -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*

36 changes: 36 additions & 0 deletions .github/workflows/check-reuse.yml
Original file line number Diff line number Diff line change
@@ -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