From 59e819c794427eed5500ab53b8c520f80960b6fd Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 3 Sep 2024 21:05:57 -0700 Subject: [PATCH] Add WSL GitHub action --- .github/workflows/wsl.yml | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/wsl.yml diff --git a/.github/workflows/wsl.yml b/.github/workflows/wsl.yml new file mode 100644 index 00000000..8d7fd39a --- /dev/null +++ b/.github/workflows/wsl.yml @@ -0,0 +1,54 @@ +# 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] + + 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_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: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }}