Skip to content

Refactor 3ds Max Exporter project to SDK format #5

Refactor 3ds Max Exporter project to SDK format

Refactor 3ds Max Exporter project to SDK format #5

Workflow file for this run

name: Exporters CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 12, Col: 6): Unexpected value '', (Line: 13, Col: 1): Unexpected value 'build-max'
on:
pull_request:
branches: [master]
env:
BuildConfiguration: Release
BuildPlatform: Any CPU
MAYA_VERSIONS: '2020 2022 2023 2024'
jobs:
build-max:
name: Build Max (${{ matrix.max_version }} / ${{ matrix.config }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
max_version: [2022, 2023, 2024, 2025, 2026, 2027]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: nuget/setup-nuget@v2
with:
nuget-version: '6.x'
- name: Version Update
shell: pwsh
run: |
$content = Get-Content -Path '3ds Max\Max2Babylon\Exporter\BabylonExporter.cs' -Raw
$content = $content -replace 'Custom\.Build\.Version', "${{ github.run_number }}"
Set-Content -Path '3ds Max\Max2Babylon\Exporter\BabylonExporter.cs' -Value $content
- name: NuGet Restore
run: nuget restore "3ds Max\Max2Babylon.sln"
- name: Build
run: msbuild "3ds Max\Max2Babylon.sln" `
/p:Configuration=${{ env.BuildConfiguration }}_${{ matrix.max_version }} `
/p:Platform=x64 `
/p:PostBuildEvent= `
/p:PreBuildEvent= `
/v:minimal
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: max-${{ matrix.config }}-${{ matrix.max_version }}
path: 3ds Max/**/bin/**/*.dll
build-maya:
name: Build Maya
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: nuget/setup-nuget@v2
with:
nuget-version: '6.x'
- name: Version Update
shell: pwsh
run: |
$content = Get-Content -Path 'Maya\Exporter\BabylonExporter.cs' -Raw
$content = $content -replace 'Custom\.Build\.Version', "${{ github.run_number }}"
Set-Content -Path 'Maya\Exporter\BabylonExporter.cs' -Value $content
- name: NuGet Restore
run: nuget restore "Maya\Maya2Babylon.sln"
- name: Build
run: msbuild "Maya\Maya2Babylon.sln" /p:Configuration=${{ env.BuildConfiguration }} "/p:Platform=${{ env.BuildPlatform }}" /p:PostBuildEvent= /p:PreBuildEvent= /v:minimal
- name: Copy Maya Templates
if: always()
shell: pwsh
run: |
foreach ($year in "${{ env.MAYA_VERSIONS }}".Split(' ')) {
$dest = "${{ github.workspace }}\artifacts\Maya\bin\Release\$year"
New-Item -ItemType Directory -Path $dest -Force | Out-Null
Copy-Item -Path "Maya\AETemplates\**\*.mel" -Destination $dest -Force -ErrorAction SilentlyContinue
Copy-Item -Path "Maya\NETemplates\**\*.xml" -Destination $dest -Force -ErrorAction SilentlyContinue
}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: maya-binaries
path: |
Maya/**/bin/**/*.dll
artifacts/
build-installer:
name: Build Installer
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: nuget/setup-nuget@v2
with:
nuget-version: '6.x'
- name: NuGet Restore
run: nuget restore "BabylonJS_Installer\BabylonJS_Installer.sln"
- name: Build
run: msbuild "BabylonJS_Installer\BabylonJS_Installer.sln" /p:Configuration=${{ env.BuildConfiguration }} "/p:Platform=${{ env.BuildPlatform }}" /p:PostBuildEvent= /v:minimal
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: installer-binaries
path: BabylonJS_Installer/Dist/**/*