Skip to content

Commit

Permalink
fix build action to use vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Oct 20, 2023
1 parent 13e740f commit d0955c4
Showing 1 changed file with 38 additions and 28 deletions.
66 changes: 38 additions & 28 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,50 @@ on: [push]

env:
is_tag: ${{ startsWith(github.ref, 'refs/tags/') }}

PROJECT_FILE_PATH: blur.sln

BUILD_CONFIGURATION: Release
BUILD_PLATFORM: x64

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.PROJECT_FILE_PATH}}

- name: Upload
uses: actions/upload-artifact@v3
with:
name: Blur
path: |
bin/blur-cli/Release/blur-cli.exe
bin/blur-gui/Release/blur.exe
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ env.is_tag == 'true' }}
with:
files: |
bin/blur-cli/Release/blur-cli.exe
bin/blur-gui/Release/blur.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2

- name: Setup vcpkg (it does not install any package yet)
uses: lukka/run-vcpkg@v7
with:
vcpkgGitCommitId: '8eb57355a4ffb410a2e94c07b4dca2dffbee8e50'
vcpkgArguments: 'cxxopts fmt glfw3 imgui[glfw-binding] nlohmann-json'
vcpkgTriplet: '${{env.BUILD_PLATFORM}}-windows-static'
runVcpkgInstall: true

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
vcpkg integrate install
msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.PROJECT_FILE_PATH}}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Blur
path: |
bin/blur-cli/Release/blur-cli.exe
bin/blur-gui/Release/blur.exe
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ env.is_tag == 'true' }}
with:
files: |
bin/blur-cli/Release/blur-cli.exe
bin/blur-gui/Release/blur.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d0955c4

Please sign in to comment.