t7x/.github/workflows/build.yml

70 lines
1.8 KiB
YAML
Raw Normal View History

2022-05-21 14:16:20 -04:00
name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
types: [opened, synchronize, reopened]
2022-11-25 10:40:04 -05:00
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
2022-05-21 14:16:20 -04:00
jobs:
build:
2022-06-16 03:55:21 -04:00
name: Build
2022-05-21 14:16:20 -04:00
runs-on: windows-2022
strategy:
2022-10-18 02:02:41 -04:00
fail-fast: false
2022-05-21 14:16:20 -04:00
matrix:
configuration:
- Debug
- Release
steps:
- name: Check out files
2022-11-09 12:16:11 -05:00
uses: actions/checkout@v3
2022-05-21 14:16:20 -04:00
with:
submodules: true
fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Add msbuild to PATH
2022-10-18 02:17:38 -04:00
uses: microsoft/setup-msbuild@v1.1.3
2022-05-21 14:16:20 -04:00
- name: Generate project files
run: tools/premake5 vs2022
2022-05-21 14:16:20 -04:00
- name: Set up problem matching
uses: ammaraskar/msvc-problem-matcher@master
2022-06-16 03:55:21 -04:00
- name: Build ${{matrix.configuration}}
2022-05-29 10:02:50 -04:00
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=x64 build/boiii.sln
2022-05-21 14:16:20 -04:00
2022-06-16 03:55:21 -04:00
- name: Upload ${{matrix.configuration}} bundle
2022-10-18 02:17:38 -04:00
uses: actions/upload-artifact@v3.1.0
2022-05-21 14:16:20 -04:00
with:
2022-06-16 03:55:21 -04:00
name: ${{matrix.configuration}} Bundle
2022-05-21 14:16:20 -04:00
path: |
2022-11-09 12:14:17 -05:00
build/bin/x64/${{matrix.configuration}}/boiii.exe
build/bin/x64/${{matrix.configuration}}/boiii.pdb
2022-06-16 03:55:21 -04:00
- name: Upload ${{matrix.configuration}} binary
if: matrix.configuration == 'Release'
2022-10-18 02:17:38 -04:00
uses: actions/upload-artifact@v3.1.0
2022-06-16 03:55:21 -04:00
with:
name: ${{matrix.configuration}} Binary
path: |
2022-11-09 12:14:17 -05:00
build/bin/x64/${{matrix.configuration}}/boiii.exe
2022-06-16 04:07:06 -04:00
- name: Upload version
if: matrix.configuration == 'Release'
2022-10-18 02:17:38 -04:00
uses: actions/upload-artifact@v3.1.0
2022-06-16 04:07:06 -04:00
with:
name: Version
path: |
build/version.txt