Skip to content

Build

Build #45

Workflow file for this run

name: Build
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: Checkout (legacy)
uses: actions/checkout@v4
with:
ref: legacy
path: Legacy\
- name: Checkout (target)
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
path: Target\
- name: Package SDK
run: |
cd Target
Add-Content -Path $env:GITHUB_ENV -Value "GIT_HASH=$(git rev-parse --short HEAD)"
- name: Upload artifacts 1/3 (SDK)
uses: actions/upload-artifact@v4
with:
name: BveEX_SDK_${{ env.GIT_HASH }}
path: ./Target/SamplePlugins/*
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Restore project (legacy)
run: |
cd Legacy
dir
msbuild AtsEx.sln /t:Restore /p:Configuration=Release
nuget restore AtsEx.sln
- name: Restore project (target)
run: |
cd Target
dir
msbuild BveEx.sln /t:Restore /p:Configuration=Release
nuget restore BveEx.sln
- name: Restore BveTs dependencies
id: cache-dependencies
uses: actions/cache/restore@v4
with:
path: |
Legacy\LocalReferences\BveTs\Mackoy.IInputDevice.DLL
Legacy\LocalReferences\BveTs\Mackoy.XmlInterfaces.DLL
Target\LocalReferences\BveTs\Mackoy.IInputDevice.DLL
Target\LocalReferences\BveTs\Mackoy.XmlInterfaces.DLL
key: dependencies-1.0.0.0
- name: Setup BveTs dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
env:
BVETS6: ${{ secrets.BveTs6 }}
run: |
curl -L "$env:BVETS6" -o bvets6-msi.zip
7z x -obvets6 bvets6-msi.zip
cmd.exe /c start /wait msiexec /a bvets6\BveTs6Setup.msi /qn
mkdir Legacy\LocalReferences\BveTs
copy "C:\Program Files\mackoy\BveTs6\Mackoy.IInputDevice.DLL" Legacy\LocalReferences\BveTs\
copy "C:\Program Files\mackoy\BveTs6\Mackoy.XmlInterfaces.DLL" Legacy\LocalReferences\BveTs\
mkdir Target\LocalReferences\BveTs
copy "C:\Program Files\mackoy\BveTs6\Mackoy.IInputDevice.DLL" Target\LocalReferences\BveTs\
copy "C:\Program Files\mackoy\BveTs6\Mackoy.XmlInterfaces.DLL" Target\LocalReferences\BveTs\
- name: Cache BveTs dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
Legacy\LocalReferences\BveTs\Mackoy.IInputDevice.DLL
Legacy\LocalReferences\BveTs\Mackoy.XmlInterfaces.DLL
Target\LocalReferences\BveTs\Mackoy.IInputDevice.DLL
Target\LocalReferences\BveTs\Mackoy.XmlInterfaces.DLL
key: dependencies-1.0.0.0
- name: Restore DllExport
run: |
cd Target
.\DllExport.bat -action Restore
- name: Build (legacy)
run: msbuild Legacy\AtsEx.sln /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=none
- name: Build (target)
run: |
mkdir Target\LocalReferences\Legacy
copy Legacy\AtsEx\bin\Release\AtsEx.dll Target\LocalReferences\Legacy\
copy Legacy\AtsEx.Launcher\bin\Release\AtsEx.Launcher.dll Target\LocalReferences\Legacy\
msbuild Target\BveEx.sln /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=none
- name: Package
run: |
cd Target
.\package.bat bin\Core
.\package.bat bin\WithScenarios /s
- name: Upload artifacts 2/3 (Core)
uses: actions/upload-artifact@v4
with:
name: BveEX_${{ env.GIT_HASH }}
path: ./bin/Core/*
- name: Upload artifacts 3/3 (WithScenarios)
uses: actions/upload-artifact@v4
with:
name: BveEX_WithScenarios_${{ env.GIT_HASH }}
path: ./bin/WithScenarios/*