diff --git a/.github/workflows/build-windows-vcpkg.yml b/.github/workflows/build-windows-vcpkg.yml new file mode 100644 index 0000000000..df7ae1eb23 --- /dev/null +++ b/.github/workflows/build-windows-vcpkg.yml @@ -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 diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000000..6b8dffe0ab --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "melonds", + "version-string": "0.9.5", + "dependencies": [ + "sdl2", + "libarchive", + "libslirp", + "qtbase", + "qtsvg", + "qtmultimedia", + { + "name": "dirent", + "platform": "windows" + } + ] +} \ No newline at end of file