use qt6 #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Build (Windows VCPKG) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
name: ${{ matrix.target }}-${{ github.workflow }} | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [x64-mingw-static, arm64-mingw-static] | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: "microsoft/vcpkg" | |
path: "vcpkg" | |
- name: Retrieve version | |
shell: "bash" | |
run: | | |
cd vcpkg | |
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
id: version | |
- uses: lukka/get-cmake@latest | |
- name: Restore artifacts, or setup vcpkg for building artifacts | |
uses: lukka/run-vcpkg@v11 | |
id: runvcpkg | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgJsonGlob: '**/vcpkg.json' | |
vcpkgGitCommitId: '${{ steps.version.outputs.GIT_COMMIT }}' | |
runVcpkgInstall: true | |
- name: List $RUNNER_WORKSPACE before build | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
- name: Prints output of run-vcpkg's action. | |
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' " | |
- name: Configure | |
#uses: lukka/run-cmake@v10 | |
working-directory: ${{github.workspace}} | |
run: cmake -B build $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC=ON -DUSE_QT6=ON -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
- name: Make | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: melonDS-${{matrix.target}} | |
path: ${{github.workspace}}\build\melonDS.exe |