forked from H-uru/korman
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (91 loc) · 3.19 KB
/
ci_build.yml
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
name: CI Build
on: [push, pull_request]
jobs:
windows-build:
strategy:
matrix:
cfg:
- {
os: windows-2022,
generator: Visual Studio 17 2022,
cmake-arch: Win32,
python-arch: x86,
str: windows-x86,
blender-url: "https://github.com/Hoikas/blender2.7/releases/download/blender2.79_20221113/blender-2.79.0-git20221114.f970f178c093-windows32.zip",
}
- {
os: windows-2022,
generator: Visual Studio 17 2022,
cmake-arch: x64,
python-arch: x64,
str: windows-x64,
blender-url: "https://github.com/Hoikas/blender2.7/releases/download/blender2.79_20221113/blender-2.79.0-git20221114.f970f178c093-windows64.zip",
}
env:
CMAKE_GENERATOR: ${{ matrix.cfg.generator }}
CMAKE_GENERATOR_PLATFORM: ${{ matrix.cfg.cmake-arch }}
runs-on: ${{ matrix.cfg.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: korman
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.7"
architecture: ${{ matrix.cfg.python-arch }}
- name: Download Blender
run: |
curl --location "${{ matrix.cfg.blender-url }}" --output blender.zip
mkdir blender
7z x blender.zip -oblender -bsp1
- name: Build Standalone Korman
run: |
$BlenderSubDir = Split-Path -LeafBase $([System.URI]"${{ matrix.cfg.blender-url }}").Segments[-1]
korman/build.ps1 `
-Modern `
-BlenderDir "${{ github.workspace }}/blender/$BlenderSubDir" `
-NoInstaller -NoBlender
- name: Upload Standalone Korman
uses: actions/upload-artifact@v4
with:
name: korman-standalone-${{ matrix.cfg.str }}
path: build/package
- name: Build Korman+Blender Bundle
if: startsWith(github.ref, 'refs/tags')
run: |
Remove-Item -Recurse -Force build/package
korman/build.ps1 -Modern
- name: Upload Korman+Blender Bundle
if: startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v4
with:
name: korman-blender-${{ matrix.cfg.str }}
path: build/package
publish:
if: startsWith(github.ref, 'refs/tags')
needs: [windows-build]
runs-on: windows-latest
steps:
- name: Checkout Korman
uses: actions/checkout@v4
with:
path: korman
- name: Download Artifacts
id: download
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Release
run: |
korman/release.ps1 `
-Repository "${{ github.repository }}" `
-Token "${{ secrets.GITHUB_TOKEN }}" `
-UploadDir "${{ steps.download.outputs.download-path }}" `
-SubDirs @{
"korman-standalone-windows-x86" = "standalone"
"korman-standalone-windows-x64" = "standalone"
"korman-blender-windows-x86" = "bundled"
"korman-blender-windows-x64" = "bundled"
}