Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
wasimabbas-arm committed Aug 26, 2024
2 parents b8ccb41 + a46e85f commit c1b8938
Show file tree
Hide file tree
Showing 1,618 changed files with 29,886 additions and 105,576 deletions.
13 changes: 13 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
---
# Use defaults from the Google style with the following exceptions:
Language: Cpp
BasedOnStyle: Google
IndentWidth: 4
IndentCaseLabels: false
AccessModifierOffset: -2
ColumnLimit: 100
SortIncludes: false
IndentPPDirectives: BeforeHash
...
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0

# Some note about why this hash is ignored (placeholder for initial formatting)
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ build/msvs/* eol=crlf

# Force line endings for unix shell scripts and other specific files
tests/toktx-tests eol=lf
expandkw eol=lf
mkversion eol=lf
scripts/expandkw eol=lf
scripts/mkversion eol=lf
.ktx-stamp eol=lf
GNUmakefile eol=lf

Expand Down
9 changes: 7 additions & 2 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Copyright 2016-2020 The Khronos Group Inc.
# Copyright 2016-2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0

# Use ktx compare for diff'ing .ktx2 files.
# Note ktx-compare-git expects `ktx` to be in the user's path
[diff "ktx-compare"]
command = bash scripts/ktx-compare-git

# Filters used by KTX repo
[filter "keyworder"]
smudge = bash expand_kw %f
smudge = bash scripts/expand_kw %f
clean = bash -c \"sed -e 's/\\$Date.*\\$/\\$Date\\$/'\"

# Needed to avoid merge conflicts
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
runs-on: ubuntu-latest

env:
GIT_LFS_SKIP_SMUDGE: 1
WERROR: ON

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Fetch all history to make sure tags are
# included (used for version creation)
Expand All @@ -53,15 +54,15 @@ jobs:
run: sudo apt-get install -y ninja-build

- name: android_Debug_arm64-v8a
run: ./ci_scripts/build_android.sh
run: ./scripts/build_android.sh
env:
ANDROID_ABI: arm64-v8a
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
ASTCENC_ISA: "ASTCENC_ISA_NEON=ON"
CONFIGURATION: Debug

- name: android_arm64-v8a
run: ./ci_scripts/build_android.sh
run: ./scripts/build_android.sh
env:
ANDROID_ABI: arm64-v8a
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
Expand All @@ -72,13 +73,13 @@ jobs:
# and not supported by ARM ASTC encoder

# - name: android_x86
# run: ./ci_scripts/build_android.sh
# run: ./scripts/build_android.sh
# env:
# ANDROID_ABI: x86
# ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}

- name: android_x86_64
run: ./ci_scripts/build_android.sh
run: ./scripts/build_android.sh
env:
ANDROID_ABI: x86_64
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
Expand All @@ -94,7 +95,7 @@ jobs:
# by the preceding steps and uploads the zip.
- name: upload artifact
id: upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: KTX-Software-${{env.KTX_VERSION}}-Android
path: install-android
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/check-mkvk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2015-2020 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
name: KTX-Software Check mkvk 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
- .travis.yml

# Allow manual trigger
workflow_dispatch:

jobs:
check-mkvk:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]

runs-on: ${{ matrix.os }}
env:
GIT_LFS_SKIP_SMUDGE: 1
BUILD_DIR: "build"
WERROR: ON

steps:
- uses: actions/checkout@v4

- name: Clone KTX-Specification repo
run: |
pushd ..; git clone https://github.com/KhronosGroup/KTX-Specification.git; popd
- name: Configure CMake build
run: cmake -B ${{ env.BUILD_DIR }} -DKTX_GENERATE_VK_FILES=ON -DKTX_FEATURE_TESTS=OFF -DKTX_FEATURE_TOOLS=OFF -DKTX_WERROR=${{ env.WERROR }}
- name: Test file generation
run: |
cmake --build ${{ env.BUILD_DIR }} --target mkvk --clean-first
git diff --quiet HEAD
20 changes: 20 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 The Khronos Group Inc.
# Copyright 2024 RasterGrid Kft.
# SPDX-License-Identifier: Apache-2.0
name: Formatting

on:
workflow_call:

permissions:
contents: read

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format
uses: jidicula/[email protected]
with:
clang-format-version: '17'
5 changes: 3 additions & 2 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ jobs:
run:
shell: bash
env:
GIT_LFS_SKIP_SMUDGE: 1
WERROR: ON

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Fetch all history to make sure tags are
# included (used for version creation)
Expand Down Expand Up @@ -62,4 +63,4 @@ jobs:
- name: Upload test log
shell: pwsh
if: ${{ failure() }}
run: ci_scripts/on_failure.ps1
run: scripts/on_failure.ps1
138 changes: 138 additions & 0 deletions .github/workflows/publish-pyktx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Copyright 2023 Shukant Pal
# SPDX-License-Identifier: Apache-2.0

name: Publish Python 🐍 distribution 📦 to PyPI or TestPyPI

# https://github.com/pypa/gh-action-pypi-publish strongly recommends a
# separate publishing job when building platform-specific distribution
# packages, hence this.
#
# This should not be run until the release artifacts have been deployed.
# The only way I can see to trigger this automatically is to have all
# platform builds in a single workflow file and use on: `workflow_run`
# so this is triggered when that workflow completes. Once all platform
# builds are moved to GitHub Actions we can try making each platform
# workflow reusable and making another workflow that calls each of
# them via `uses` and use `on: workflow_run` here.
#
# We also have to figure out how to determine if the workflow deployed
# to releases. Maybe can use the GitHub REST API to get an artifact
# from the triggering workflow that is set only when deploying
# releases. See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow.
# Alternatively maybe there is some way of querying what triggered
# the workflow that we can test in an `if:` in the job as noted below.

on:
workflow_dispatch:
inputs:
# repository-url:
# description: 'destination repository'
# required: true
# default: 'https://pypi.org'
# type: choice
# options:
# - https://test.pypi.org
# - https://pypi.org
test-pypi:
type: boolean
description: 'Deploy to test pypi registry'
required: true
default: false
prerelease:
type: boolean
description: 'Deploy pre-release'
required: false
default: false

# Example to try in future.
# workflow_run:
# workflows: [KTX-Software Build All]
# types:
# - completed
# An unknown is how to limit the trigger to when deploy is run in
# Windows CI which is happens when that workflow is triggered by
# a push with the tags below.
# push:
# # Trigger on push of release tags. There is no way to limit the trigger
# # to a specific branch. A later build step checks for the main branch.
# tags:
# - 'v[0-9]+\.[0-9]+\.[0-9]+'
# - 'v[0-9]+\.[0-9]+\.[0-9]+-*'

env:
GIT_LFS_SKIP_SMUDGE: 1
INPUT_PRERELEASE: ${{ inputs.prerelease }}

jobs:
publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: ${{ ! inputs.test-pypi }}
runs-on: ubuntu-latest
# environment:
# name: pypi
# url: https://pypi.org/p/pyktx
# permissions:
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# When using workflow_run it is necessary to check for successful
# completion of the workflow with
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
# Maybe it is possible to test for a release tag here too.
steps:
- uses: actions/checkout@v4

- name: Set up .netrc
env:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
run: echo -e "machine api.github.com login $GH_API_TOKEN" >> ~/.netrc
- name: Download pyktx assets from latest (pre-)release
run: |
echo INPUT_PRERELEASE = $INPUT_PRERELEASE
if [ "$INPUT_PRERELEASE" = "true" ]; then
option="--pre-release"
else
option=
fi
# Omit linux packages since PyPI won't accept them and, at the
# moment, we don't have a workflow to build manylinux wheels, which
# it will accept. It's non-trivial to implement that. See
# https://github.com/pypa/manylinux?tab=readme-ov-file#docker-images
scripts/download_release_assets.sh $option --filter '(?:^pyktx)(?!.*linux.*)' --output-dir dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: ${{ inputs.test-pypi }}
runs-on: ubuntu-latest
# environment:
# name: testpypi
# url: https://pypi.org/p/pyktx
# permissions:
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# When using workflow_run it is necessary to check for successful
# completion of the workflow with
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
# Maybe it is possible to test for a release tag here too.
steps:
- uses: actions/checkout@v4

- name: Set up .netrc
env:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
run: echo -e "machine api.github.com login $GH_API_TOKEN" >> ~/.netrc
- name: Download pyktx assets from latest (pre-)release
run: |
echo INPUT_PRERELEASE = $INPUT_PRERELEASE
if [ "$INPUT_PRERELEASE" = "true" ]; then
option="--pre-release"
else
option=
fi
scripts/download_release_assets.sh $option --filter '(?:^pyktx)(?!.*linux.*)' --output-dir dist
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TESTPYPI_API_TOKEN }}
38 changes: 0 additions & 38 deletions .github/workflows/publish.yml

This file was deleted.

Loading

0 comments on commit c1b8938

Please sign in to comment.