| 1 |
# This workflow uses actions that are not certified by GitHub. |
| 2 |
# They are provided by a third-party and are governed by |
| 3 |
# separate terms of service, privacy policy, and support |
| 4 |
# documentation. |
| 5 |
|
| 6 |
name: MSBuild latest |
| 7 |
|
| 8 |
on: |
| 9 |
push: |
| 10 |
branches: [ "master" ] |
| 11 |
pull_request: |
| 12 |
branches: [ "master" ] |
| 13 |
|
| 14 |
env: |
| 15 |
# Path to the solution file relative to the root of the project. |
| 16 |
SOLUTION_FILE_PATH: Ancient.sln |
| 17 |
|
| 18 |
permissions: |
| 19 |
contents: read |
| 20 |
|
| 21 |
jobs: |
| 22 |
build: |
| 23 |
strategy: |
| 24 |
matrix: |
| 25 |
build_configuration: [Release_Clang, Release] |
| 26 |
runs-on: windows-latest |
| 27 |
|
| 28 |
steps: |
| 29 |
- uses: actions/checkout@v3 |
| 30 |
|
| 31 |
- name: Add MSBuild to PATH |
| 32 |
uses: microsoft/[email protected] |
| 33 |
|
| 34 |
- name: Restore NuGet packages |
| 35 |
working-directory: ${{env.GITHUB_WORKSPACE}} |
| 36 |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} |
| 37 |
|
| 38 |
- name: Build x64 |
| 39 |
working-directory: ${{env.GITHUB_WORKSPACE}} |
| 40 |
# Add additional options to the MSBuild command line here (like platform or verbosity level). |
| 41 |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference |
| 42 |
run: | |
| 43 |
msbuild /m /p:Platform=x64 /p:Configuration=${{matrix.build_configuration}} ${{env.SOLUTION_FILE_PATH}} |
| 44 |
copy x64\Release*\Ancient.exe Ancient64.exe |
| 45 |
|
| 46 |
- name: Build x86 |
| 47 |
working-directory: ${{env.GITHUB_WORKSPACE}} |
| 48 |
# Add additional options to the MSBuild command line here (like platform or verbosity level). |
| 49 |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference |
| 50 |
run: | |
| 51 |
msbuild /m /p:Platform=x86 /p:Configuration=${{matrix.build_configuration}} ${{env.SOLUTION_FILE_PATH}} |
| 52 |
copy Release*\Ancient.exe Ancient32.exe |
| 53 |
|
| 54 |
- name: Upload |
| 55 |
uses: actions/upload-artifact@v4 |
| 56 |
with: |
| 57 |
name: windows_binaries_${{matrix.build_configuration}} |
| 58 |
path: | |
| 59 |
LICENSE |
| 60 |
LICENSE.bzip2 |
| 61 |
README.md |
| 62 |
Ancient32.exe |
| 63 |
Ancient64.exe |
| 64 |
if-no-files-found: error |