Skip to content

Commit

Permalink
add vcpkg files
Browse files Browse the repository at this point in the history
  • Loading branch information
kvnp committed Dec 25, 2023
1 parent 21d6f0f commit b6d5774
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-windows-vcpkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CMake Build (Windows VCPKG)
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

env:
BUILD_TYPE: Release

jobs:
build:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target: [x64-windows, arm64-windows]

env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target }}

steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash

- name: Restore artifacts, or setup vcpkg for building artifacts
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
# This one is not needed, as it is the default value anyway.
# vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgJsonGlob: '**/vcpkg.json'

- 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: ${{runner.workspace}}
run: cmake -B build $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC=ON -DCMAKE_PREFIX_PATH=C:/tools/msys64/mingw64/qt5-static

- name: Make
working-directory: ${{runner.workspace}}/build
run: cmake --build .

- uses: actions/upload-artifact@v1
with:
name: melonDS-${{matrix.target}}
path: ${{runner.workspace}}\build\melonDS.exe
16 changes: 16 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "melonds",
"version-string": "0.9.5",
"dependencies": [
"sdl2",
"libarchive",
"libslirp",
"qtbase",
"qtsvg",
"qtmultimedia",
{
"name": "dirent",
"platform": "windows"
}
]
}

0 comments on commit b6d5774

Please sign in to comment.