Merge pull request #250 from hakasapl/0.8.8 #576
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: Build and Publish Artifacts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Cache VCPKG | |
uses: actions/cache@v3 | |
with: | |
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }} | |
path: | | |
build/vcpkg_installed | |
- name: Cache Externals | |
uses: actions/cache@v3 | |
with: | |
key: externals-${{ runner.os }}-${{ hashFiles('.gitmodules') }} | |
path: | | |
build/external | |
- name: Build ParallaxGenMutagenWrapper | |
run: | | |
cd ParallaxGenMutagenWrapper | |
dotnet restore | |
msbuild /p:Configuration=RelWithDebInfo | |
- name: Configure CMake | |
run: | | |
New-Item -ItemType Directory -Path "build" -Force | |
cd build | |
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
- name: Build and Install ParallaxGen | |
run: | | |
cd build | |
cmake --build . --target install --config RelWithDebInfo | |
- name: Copy ParallaxGenMutagenWrapper build | |
run: | | |
New-Item -ItemType Directory -Path "build\ParallaxGenMutagenWrapper" -Force | |
Copy-Item -Path ParallaxGenMutagenWrapper\bin -Destination build\ParallaxGenMutagenWrapper\ -Recurse -Force | |
Copy-Item -Path ParallaxGenMutagenWrapper\obj -Destination build\ParallaxGenMutagenWrapper\ -Recurse -Force | |
- name: Upload Release Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: parallaxgen-release-artifacts-${{ github.sha }} | |
path: install | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: parallaxgen-build-artifacts-${{ github.sha }} | |
path: build |