mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 04:16:12 +01:00
Add GitHub Action for super-lint (#618)
This commit is contained in:
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