diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index cea2dee7d..38636db0d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -48,20 +48,6 @@ jobs: run: echo "DXSDK_DIR=${Env:HOMEDRIVE}${Env:HOMEPATH}\ccache\" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append if: matrix.config.os == 'windows-latest' && matrix.config.name != 'libretro-x86_64-w64-mingw32' - - name: bootstrap vcpkg - run: | - git clone https://github.com/microsoft/vcpkg - mkdir vcpkg\bincache - vcpkg\bootstrap-vcpkg.bat - if: endsWith(matrix.config.name, 'msvc') - - - uses: actions/cache@v2 - id: cache-vcpkg - with: - path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} - key: vcpkg-${{ hashFiles( 'vcpkg.json' ) }} - if: endsWith(matrix.config.name, 'msvc') - - uses: actions/cache@v2 with: path: /tmp/ccache @@ -118,6 +104,20 @@ jobs: brew install --build-from-source ./sdl2.rb if: matrix.config.name == 'apple-darwin' + - name: Bootstrap vcpkg (msvc) + run: | + git clone https://github.com/microsoft/vcpkg + mkdir vcpkg\bincache + vcpkg\bootstrap-vcpkg.bat + if: endsWith(matrix.config.name, 'msvc') + + - uses: actions/cache@v2 + id: cache-vcpkg + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: vcpkg-${{ hashFiles( 'vcpkg.json' ) }} + if: endsWith(matrix.config.name, 'msvc') + - name: CMake run: | cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.buildType }} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=artifact -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=artifact ${{ matrix.config.cmakeArgs }}