Skip to content

run in bash

run in bash #8

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@v4
- uses: actions/checkout@v4
with:
repository: "microsoft/vcpkg"
path: "vcpkg"
- name: Retrieve version
shell: "bash"
run: |
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
id: version
- 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'
vcpkgGitCommitId: '${{ steps.version.outputs.GIT_COMMIT }}'
- 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