1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 20:10:05 +00:00
DirectXTex/.github/workflows/wsl.yml
2024-09-04 17:50:45 -07:00

60 lines
1.5 KiB
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
name: 'CMake (WSL)'
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths-ignore:
- '*.md'
- LICENSE
- '.nuget/*'
- build/*.cmd
- build/*.json
- build/*.props
- build/*.ps1
- build/*.targets
- build/*.yml
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [x64-Debug-Linux, x64-Release-Linux]
gcc: [10, 11, 12]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v5
- uses: lukka/run-vcpkg@v11
with:
runVcpkgInstall: true
vcpkgJsonGlob: '**/build/vcpkg.json'
vcpkgGitCommitId: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da'
- 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 }}
- name: 'Build'
working-directory: ${{ github.workspace }}
run: cmake --build out/build/${{ matrix.build_type }}