Add base for laser #76
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 plugins' | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/**' | |
- 'gamedata/**' | |
- 'sdk/**' | |
- 'src/**' | |
- '**/CMakeLists.txt' | |
- '**/*.ltx' | |
- '**/*.json' | |
pull_request: | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/**' | |
- 'gamedata/**' | |
- 'sdk/**' | |
- 'src/**' | |
- '**/CMakeLists.txt' | |
- '**/*.ltx' | |
- '**/*.json' | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
build-plugins: | |
name: 'Build plugins' | |
strategy: | |
matrix: | |
system: | |
- windows-2022 | |
preset: | |
- Plugins | |
platform: | |
- x64 | |
config: | |
- Debug | |
- RelWithDebInfo | |
- Release | |
runs-on: ${{ matrix.system }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache packages | |
uses: actions/cache@v4 | |
with: | |
key: ${{ matrix.preset }}-NuGet-${{ hashFiles('**/Packages.config') }} | |
restore-keys: | | |
${{ matrix.preset }}-NuGet-${{ hashFiles('**/Packages.config') }} | |
${{ matrix.preset }}-NuGet- | |
path: | | |
~/.nuget/packages | |
- name: Configure plugins | |
run: | | |
cmake ` | |
--preset ${{ matrix.preset }}-${{ matrix.platform }}-${{ runner.os }} | |
- name: Build plugins | |
run: | | |
cmake ` | |
--build ` | |
--preset ${{ matrix.preset }}-${{ matrix.platform }}-${{ runner.os }}-${{ matrix.config }} | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugins-binaries-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }} | |
path: | | |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.dlu | |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.mll | |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.dll | |
- name: Upload symbols | |
uses: actions/upload-artifact@v4 | |
if: ${{ matrix.config != 'Release' }} | |
with: | |
name: plugins-symbols-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }} | |
path: | | |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.pdb | |
- name: Upload libraries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugins-libraries-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }} | |
path: | | |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/lib/${{ matrix.config }}/ | |
- name: Upload packages | |
uses: actions/upload-artifact@v4 | |
if: ${{ (matrix.config == 'Debug' && matrix.platform == 'x64') }} | |
with: | |
name: plugins-packages-${{ matrix.system }}-${{ github.sha }} | |
path: | | |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/packages/ |