mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 12:16:14 +01:00
Add GitHub Action for super-lint (#618)
This commit is contained in:
9
.github/linters/.editorconfig-checker.json
vendored
Normal file
9
.github/linters/.editorconfig-checker.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Format": "github-actions",
|
||||
"exclude": [
|
||||
".git",
|
||||
"LICENSE",
|
||||
"Tests",
|
||||
"Common/d3dx12.h"
|
||||
]
|
||||
}
|
||||
20
.github/linters/.markdown-lint.yml
vendored
Normal file
20
.github/linters/.markdown-lint.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# line-length
|
||||
MD013: false
|
||||
|
||||
# blanks-around-headings
|
||||
MD022: false
|
||||
|
||||
# blanks-around-lists
|
||||
MD032: false
|
||||
|
||||
# no-inline-html
|
||||
MD033: false
|
||||
|
||||
# no-bare-urls
|
||||
MD034: false
|
||||
|
||||
# first-line-heading
|
||||
MD041: false
|
||||
5
.github/linters/.powershell-psscriptanalyzer.psd1
vendored
Normal file
5
.github/linters/.powershell-psscriptanalyzer.psd1
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# PSScriptAnalyzerSettings.psd1
|
||||
@{
|
||||
Severity=@('Error','Warning')
|
||||
ExcludeRules=@('PSAvoidUsingWriteHost')
|
||||
}
|
||||
17
.github/linters/.yaml-lint.yml
vendored
Normal file
17
.github/linters/.yaml-lint.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
ignore-from-file: .gitignore
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
truthy:
|
||||
check-keys: false
|
||||
document-start: disable
|
||||
line-length:
|
||||
max: 160
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
new-lines:
|
||||
type: dos
|
||||
148
.github/workflows/bvt.yml
vendored
148
.github/workflows/bvt.yml
vendored
@@ -7,7 +7,7 @@ name: 'CTest (BVTs)'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -50,84 +50,84 @@ jobs:
|
||||
arch: [amd64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Clone test repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: walbourn/directxtextest
|
||||
path: Tests
|
||||
ref: main
|
||||
- name: Clone test repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: walbourn/directxtextest
|
||||
path: Tests
|
||||
ref: main
|
||||
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
|
||||
- name: 'Set triplet'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "amd64")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "^arm64ec")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "::error Unknown architecture/build-type triplet mapping"
|
||||
}
|
||||
- name: 'Set triplet'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "amd64")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "^arm64ec")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "::error Unknown architecture/build-type triplet mapping"
|
||||
}
|
||||
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
- name: 'Run BVTs'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: ctest --preset=${{ matrix.build_type }} --output-on-failure
|
||||
- name: 'Run BVTs'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: ctest --preset=${{ matrix.build_type }} --output-on-failure
|
||||
|
||||
44
.github/workflows/codeql.yml
vendored
44
.github/workflows/codeql.yml
vendored
@@ -7,7 +7,7 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -50,29 +50,29 @@ jobs:
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
||||
with:
|
||||
languages: c-cpp
|
||||
build-mode: manual
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
||||
with:
|
||||
languages: c-cpp
|
||||
build-mode: manual
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=x64-Debug
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=x64-Debug
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\x64-Debug
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\x64-Debug
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
||||
with:
|
||||
category: "/language:c-cpp"
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
||||
with:
|
||||
category: "/language:c-cpp"
|
||||
|
||||
46
.github/workflows/lint.yml
vendored
Normal file
46
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
#
|
||||
# http://go.microsoft.com/fwlink/?LinkId=248926
|
||||
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- LICENSE
|
||||
- build/*.in
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
statuses: write
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Lint Code Base
|
||||
uses: super-linter/super-linter@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0
|
||||
env:
|
||||
DEFAULT_BRANCH: origin/main
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
IGNORE_GITIGNORED_FILES: true
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
VALIDATE_CHECKOV: true
|
||||
VALIDATE_EDITORCONFIG: true
|
||||
VALIDATE_GITHUB_ACTIONS: true
|
||||
VALIDATE_JSON: true
|
||||
VALIDATE_MARKDOWN: true
|
||||
VALIDATE_POWERSHELL: true
|
||||
VALIDATE_GITLEAKS: true
|
||||
VALIDATE_YAML: true
|
||||
72
.github/workflows/main.yml
vendored
72
.github/workflows/main.yml
vendored
@@ -7,7 +7,7 @@ name: 'CMake (Windows)'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -98,47 +98,47 @@ jobs:
|
||||
arch: amd64_arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }}
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }}
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
|
||||
- if: matrix.arch != 'amd64_arm64'
|
||||
name: 'Configure CMake (Spectre)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON
|
||||
- if: matrix.arch != 'amd64_arm64'
|
||||
name: 'Configure CMake (Spectre)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON
|
||||
|
||||
- if: matrix.arch != 'amd64_arm64'
|
||||
name: 'Build (Spectre)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- if: matrix.arch != 'amd64_arm64'
|
||||
name: 'Build (Spectre)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
- if: matrix.arch != 'amd64_arm64'
|
||||
name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
- if: matrix.arch != 'amd64_arm64'
|
||||
name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
|
||||
- name: 'Configure CMake (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
|
||||
- name: 'Configure CMake (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
- name: 'Build (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
65
.github/workflows/msbuild.yml
vendored
65
.github/workflows/msbuild.yml
vendored
@@ -7,7 +7,7 @@ name: MSBuild
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -15,7 +15,7 @@ on:
|
||||
- '.nuget/*'
|
||||
- build/*
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -28,7 +28,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-${{ matrix.vs }}
|
||||
runs-on: windows-2022 # has v142 tools but not v142 spectre libs
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -37,33 +37,48 @@ jobs:
|
||||
vs: [2019, 2022]
|
||||
build_type: [Debug, Release]
|
||||
platform: [x86, x64, ARM64]
|
||||
exclude:
|
||||
- vs: 2019
|
||||
platform: ARM64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
|
||||
- if: matrix.platform != 'ARM64'
|
||||
name: Build
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln
|
||||
- if: matrix.platform != 'ARM64'
|
||||
name: Build
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
|
||||
DirectXTex_Desktop_${{ matrix.vs }}.sln
|
||||
|
||||
- name: 'Build (Windows 10)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln
|
||||
- name: 'Build (Windows 10)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
|
||||
DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln
|
||||
|
||||
- if: matrix.vs == '2022'
|
||||
name: 'Build (UWP)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Windows10_2022.sln
|
||||
- if: matrix.vs == '2022'
|
||||
name: 'Build (UWP)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
|
||||
DirectXTex_Windows10_2022.sln
|
||||
|
||||
- if: matrix.platform != 'ARM64'
|
||||
name: 'Build (Spectre)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln
|
||||
- if: matrix.platform != 'ARM64' && matrix.vs != '2019'
|
||||
name: 'Build (Spectre)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
|
||||
/p:SpectreMitigation=Spectre
|
||||
DirectXTex_Desktop_${{ matrix.vs }}.sln
|
||||
|
||||
- if: matrix.platform != 'ARM64'
|
||||
name: 'Build (Spectre Windows 10)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln
|
||||
- if: matrix.platform != 'ARM64' && matrix.vs != '2019'
|
||||
name: 'Build (Spectre Windows 10)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
|
||||
/p:SpectreMitigation=Spectre
|
||||
DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln
|
||||
|
||||
4
.github/workflows/msvc.yml
vendored
4
.github/workflows/msvc.yml
vendored
@@ -7,7 +7,7 @@ name: Microsoft C++ Code Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
|
||||
170
.github/workflows/test.yml
vendored
170
.github/workflows/test.yml
vendored
@@ -7,7 +7,7 @@ name: 'CTest (Windows)'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -90,95 +90,99 @@ jobs:
|
||||
arch: amd64_arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Clone test repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: walbourn/directxtextest
|
||||
path: Tests
|
||||
ref: main
|
||||
- name: Clone test repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
repository: walbourn/directxtextest
|
||||
path: Tests
|
||||
ref: main
|
||||
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
|
||||
- name: 'Set triplet'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "amd64")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "^arm64ec")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "::error Unknown architecture/build-type triplet mapping"
|
||||
}
|
||||
- name: 'Set triplet'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "amd64")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "^arm64ec")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "::error Unknown architecture/build-type triplet mapping"
|
||||
}
|
||||
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
|
||||
-DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
|
||||
- name: 'Configure CMake (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DBUILD_SHARED_LIBS=ON
|
||||
- name: 'Configure CMake (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
|
||||
-DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
- name: 'Build (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
48
.github/workflows/uwp.yml
vendored
48
.github/workflows/uwp.yml
vendored
@@ -7,7 +7,7 @@ name: 'CMake (UWP)'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -65,32 +65,32 @@ jobs:
|
||||
arch: amd64_arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
uwp: true
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
uwp: true
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }}
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }}
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: Remove-Item -Path out -Recurse -Force
|
||||
|
||||
- name: 'Configure CMake (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
|
||||
- name: 'Configure CMake (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
- name: 'Build (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build (DLL)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
166
.github/workflows/vcpkg.yml
vendored
166
.github/workflows/vcpkg.yml
vendored
@@ -7,7 +7,7 @@ name: 'CMake (Windows using VCPKG)'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -18,7 +18,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -43,117 +43,119 @@ jobs:
|
||||
toolver: ['14.29', '14']
|
||||
build_type: [x64-Debug-VCPKG]
|
||||
arch: [amd64]
|
||||
shared: [OFF]
|
||||
shared: ['OFF']
|
||||
include:
|
||||
- toolver: '14'
|
||||
build_type: x64-Debug-Clang-VCPKG
|
||||
arch: amd64
|
||||
shared: OFF
|
||||
shared: 'OFF'
|
||||
- toolver: '14'
|
||||
build_type: x86-Debug-VCPKG
|
||||
arch: amd64_x86
|
||||
shared: OFF
|
||||
shared: 'OFF'
|
||||
- toolver: '14'
|
||||
build_type: arm64-Debug-VCPKG
|
||||
arch: amd64_arm64
|
||||
shared: OFF
|
||||
shared: 'OFF'
|
||||
- toolver: '14'
|
||||
build_type: arm64ec-Debug-VCPKG
|
||||
arch: amd64_arm64
|
||||
shared: OFF
|
||||
shared: 'OFF'
|
||||
- toolver: '14'
|
||||
build_type: x64-Debug-MinGW
|
||||
arch: amd64
|
||||
shared: OFF
|
||||
shared: 'OFF'
|
||||
- toolver: '14'
|
||||
build_type: x64-Release-MinGW
|
||||
arch: amd64
|
||||
shared: OFF
|
||||
shared: 'OFF'
|
||||
- toolver: '14'
|
||||
build_type: x64-Debug-MinGW
|
||||
arch: amd64
|
||||
shared: ON
|
||||
shared: 'ON'
|
||||
- toolver: '14'
|
||||
build_type: x64-Release-MinGW
|
||||
arch: amd64
|
||||
shared: ON
|
||||
shared: 'ON'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
- name: 'Install Ninja'
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
toolset: ${{ matrix.toolver }}
|
||||
|
||||
- name: 'Set triplet'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "amd64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "MinGW")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "^arm64ec")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "::error Unknown architecture/build-type triplet mapping"
|
||||
}
|
||||
- name: 'Set triplet'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "amd64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "MinGW")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_x86")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
|
||||
{
|
||||
if ("${{ matrix.build_type }}" -match "^arm64ec")
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "::error Unknown architecture/build-type triplet mapping"
|
||||
}
|
||||
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=OFF -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=OFF
|
||||
-DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out\build\${{ matrix.build_type }}
|
||||
|
||||
107
.github/workflows/wsl.yml
vendored
107
.github/workflows/wsl.yml
vendored
@@ -7,7 +7,7 @@ name: 'CMake (WSL)'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -20,7 +20,7 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: "main"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- LICENSE
|
||||
@@ -33,6 +33,9 @@ on:
|
||||
- build/*.targets
|
||||
- build/*.xvd
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -45,63 +48,63 @@ jobs:
|
||||
gcc: [12, 13, 14]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
|
||||
- uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
|
||||
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
- name: Get vcpkg commit hash
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ($Env:vcpkgRelease) {
|
||||
echo "Using vcpkg commit from repo variable..."
|
||||
$VCPKG_COMMIT_ID = $Env:vcpkgRelease
|
||||
}
|
||||
else {
|
||||
echo "Fetching latest vcpkg commit hash..."
|
||||
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
|
||||
$VCPKG_COMMIT_ID = $commit
|
||||
}
|
||||
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
|
||||
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
|
||||
env:
|
||||
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
vcpkgJsonGlob: '**/build/vcpkg.json'
|
||||
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
|
||||
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="x64-linux"
|
||||
- name: 'Configure CMake'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="x64-linux"
|
||||
|
||||
env:
|
||||
CC: gcc-${{ matrix.gcc }}
|
||||
CXX: g++-${{ matrix.gcc }}
|
||||
env:
|
||||
CC: gcc-${{ matrix.gcc }}
|
||||
CXX: g++-${{ matrix.gcc }}
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out/build/${{ matrix.build_type }}
|
||||
- name: 'Build'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out/build/${{ matrix.build_type }}
|
||||
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: rm -rf out
|
||||
- name: 'Clean up'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: rm -rf out
|
||||
|
||||
- name: 'Configure CMake (-shared)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="x64-linux" -DBUILD_SHARED_LIBS=ON
|
||||
- name: 'Configure CMake (-shared)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: >
|
||||
cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
|
||||
-DVCPKG_TARGET_TRIPLET="x64-linux" -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
env:
|
||||
CC: gcc-${{ matrix.gcc }}
|
||||
CXX: g++-${{ matrix.gcc }}
|
||||
env:
|
||||
CC: gcc-${{ matrix.gcc }}
|
||||
CXX: g++-${{ matrix.gcc }}
|
||||
|
||||
- name: 'Build (-shared)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out/build/${{ matrix.build_type }}
|
||||
- name: 'Build (-shared)'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake --build out/build/${{ matrix.build_type }}
|
||||
|
||||
Reference in New Issue
Block a user