Implement pre-CRT loader #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MSBuild | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
runs-on: windows-latest | |
env: | |
BUILD_CONFIGURATION: ${{matrix.configuration}} | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: ./mhw-cs-plugin-loader.sln | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
with: | |
vs-version: "[,17)" | |
msbuild-architecture: x64 | |
- name: Install vcpkg | |
uses: lukka/run-vcpkg@v10.2 | |
with: | |
vcpkgDirectory: "${{runner.workspace}}/b/vcpkg" | |
vcpkgGitCommitId: "c8696863d371ab7f46e213d8f5ca923c4aef2a00" # github.com/microsoft/vcpkg - 2023-12-12 release. | |
vcpkgJsonGlob: "**/vcpkg.json" | |
runVcpkgInstall: true | |
- name: Integrate vcpkg | |
working-directory: ${{env.VCPKG_ROOT}} | |
run: | | |
vcpkg integrate install | |
- name: Generate cimgui project files | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
cd ./dependencies/cimgui/ | |
cmake -B . -G 'Visual Studio 17 2022' | |
- name: Dotnet Restore | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
dotnet restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Build Utilities\ChunkBuilder (Release mode) | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# We _ALWAYS_ build ChunkBuilder in Release mode, as certain build scripts expect a release build path on disk, | |
run: msbuild /p:Configuration="Release" /p:Platform="x64" ${{env.SOLUTION_FILE_PATH}} /p:BuildProjectReferences=false /p:VcpkgEnableManifest=true /t:Utilities\ChunkBuilder | |
- name: Build Native\mhw-cs-plugin-loader | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="x64" ${{env.SOLUTION_FILE_PATH}} /p:VcpkgEnableManifest=true /t:Native\cimgui,Native\mhw-cs-plugin-loader | |
- name: Build Managed\SharpPluginLoader.Bootstrapper | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="x64" ${{env.SOLUTION_FILE_PATH}} /p:VcpkgEnableManifest=true /t:Managed\SharpPluginLoader_Bootstrapper | |
- name: Build Managed\SharpPluginLoader.Core | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="x64" ${{env.SOLUTION_FILE_PATH}} /p:VcpkgEnableManifest=true /t:Managed\SharpPluginLoader_Core | |
# TODO(Andoryuuta): Can't currently build solution directly due to build order issues + "Release" mode binaries expected on-disk for some build scripts. | |
# - name: Build Solution | |
# working-directory: ${{env.GITHUB_WORKSPACE}} | |
# # Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
# run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 /p:VcpkgEnableManifest=true ${{env.SOLUTION_FILE_PATH}} |