-
Notifications
You must be signed in to change notification settings - Fork 323
136 lines (111 loc) · 3.9 KB
/
Copy pathci.yml
File metadata and controls
136 lines (111 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Exporters CI
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/**/*