Skip to content

Update msbuild.yml

Update msbuild.yml #29

Workflow file for this run

name: MSBuild
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_CONFIGURATION: Release
PLATFORM: x64 # Ensure this matches your build platform
permissions:
contents: read
jobs:
build-compiler_lib:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Restore NuGet packages
run: nuget restore braze_compiler.sln
- name: Build braze_compiler Static Library
run: msbuild compiler_lib/compiler_lib.vcxproj /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}
# build-braze_compiler:
# runs-on: windows-latest
# needs: build-compiler_lib
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Add MSBuild to PATH
# uses: microsoft/[email protected]
#
# - name: Restore NuGet packages
# run: nuget restore braze_compiler.sln
#
# - name: Build braze_compiler executable
# run: msbuild braze_compiler/braze_compiler.vcxproj /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }} /verbosity:diagnostic
build-unit_test:
runs-on: windows-latest
needs: build-compiler_lib
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Restore NuGet packages
run: nuget restore braze_compiler.sln
- name: Build unit_test Project
run: msbuild unit_test/unit_test.vcxproj /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}
- name: Copy exe
run: robocopy D:\a\braze_compiler\braze_compiler\unit_test\x64\Release\ D:\a\braze_compiler\braze_compiler\unit_test\
- name: Run Unit Tests
run: D:\a\braze_compiler\braze_compiler\unit_test\unit_test.exe