-
Notifications
You must be signed in to change notification settings - Fork 22
180 lines (173 loc) · 7.05 KB
/
build_maya.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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: Build USD Asset Resolvers against Maya
on:
release:
types: [released]
schedule:
- cron: '0 12 * * 6'
workflow_dispatch:
concurrency:
group: "build"
cancel-in-progress: false
jobs:
build_linux:
runs-on: ubuntu-latest
environment: maya
strategy:
matrix:
maya_product_name: ["maya"]
maya_product_version: ["2024.2", "2025.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Switch to latest release tag
run: |
git fetch --all --tags --force
latest_release_tag=$(git tag -l --sort=-version:refname v* | head -1)
git checkout tags/$latest_release_tag
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y zip
sudo apt-get install -y build-essential cmake
sudo apt-get install -y python3 python3-pip
sudo pip3 install requests
- name: Install Maya
run: |
repo_root=$(cd .; pwd)
sudo --preserve-env python3 .github/scripts/maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} --install_directory $repo_root/dependency
- name: Build USD File Resolver
run: |
.github/scripts/maya_build.sh fileResolver
- name: Build USD Python Resolver
run: |
.github/scripts/maya_build.sh pythonResolver
- name: Build USD Cached Resolver
run: |
.github/scripts/maya_build.sh cachedResolver
- name: Build USD Http Resolver
run: |
.github/scripts/maya_build.sh httpResolver
- name: Create single .zip archive
run: |
repo_root=$(cd .; pwd)
python3 .github/scripts/maya.py --artifact --artifact_src=$repo_root/dist --artifact_dst=$repo_root/artifacts --artifact_prefix=UsdAssetResolver --artifact_product_name ${{ matrix.maya_product_name }} --install_directory $repo_root/dependency
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: UsdAssetResolver-linux-${{ matrix.maya_product_name }}-${{ matrix.maya_product_version }}
path: artifacts/*.zip
build_windows_2019:
runs-on: windows-2019
environment: maya
strategy:
matrix:
maya_product_name: ["maya"]
maya_product_version: ["2024.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Switch to latest release tag
run: |
git fetch --all --tags --force
$latest_release_tag=git tag -l --sort=-version:refname v* | select -first 1
git checkout tags/$latest_release_tag
- name: Install system packages
run: |
pip3 install requests
- name: Install Maya
run: |
python3 .github\scripts\maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} --install_directory $pwd\dependency
- name: Build USD File Resolver
run: |
.\.github\scripts\maya_build.bat fileResolver "Visual Studio 16 2019" "v142"
- name: Build USD Python Resolver
run: |
.\.github\scripts\maya_build.bat pythonResolver "Visual Studio 16 2019" "v142"
- name: Build USD Cached Resolver
run: |
.\.github\scripts\maya_build.bat cachedResolver "Visual Studio 16 2019" "v142"
- name: Build USD Http Resolver
run: |
.\.github\scripts\maya_build.bat httpResolver "Visual Studio 16 2019" "v142"
- name: Create single .zip archive
run: |
& python $pwd\.github\scripts\maya.py --artifact --artifact_src=$pwd\dist --artifact_dst=$pwd\artifacts --artifact_prefix=UsdAssetResolver --artifact_product_name ${{ matrix.maya_product_name }} --install_directory $pwd\dependency
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: UsdAssetResolver-windows-${{ matrix.maya_product_name }}-${{ matrix.maya_product_version }}
path: artifacts/*.zip
build_windows_2022:
runs-on: windows-2022
environment: maya
strategy:
matrix:
maya_product_name: ["maya"]
maya_product_version: ["2025.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Switch to latest release tag
run: |
git fetch --all --tags --force
$latest_release_tag=git tag -l --sort=-version:refname v* | select -first 1
git checkout tags/$latest_release_tag
- name: Install system packages
run: |
pip3 install requests
- name: Install Maya
run: |
python3 .github\scripts\maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} --install_directory $pwd\dependency
- name: Build USD File Resolver
run: |
.\.github\scripts\maya_build.bat fileResolver "Visual Studio 17 2022" "v143"
- name: Build USD Python Resolver
run: |
.\.github\scripts\maya_build.bat pythonResolver "Visual Studio 17 2022" "v143"
- name: Build USD Cached Resolver
run: |
.\.github\scripts\maya_build.bat cachedResolver "Visual Studio 17 2022" "v143"
- name: Build USD Http Resolver
run: |
.\.github\scripts\maya_build.bat httpResolver "Visual Studio 17 2022" "v143"
- name: Create single .zip archive
run: |
& python $pwd\.github\scripts\maya.py --artifact --artifact_src=$pwd\dist --artifact_dst=$pwd\artifacts --artifact_prefix=UsdAssetResolver --artifact_product_name ${{ matrix.maya_product_name }} --install_directory $pwd\dependency
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: UsdAssetResolver-windows-${{ matrix.maya_product_name }}-${{ matrix.maya_product_version }}
path: artifacts/*.zip
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build_linux, build_windows_2019, build_windows_2022]
strategy:
matrix:
os: ["linux", "windows"]
maya_product_name: ["maya"]
maya_product_version: ["2024.2", "2025.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: UsdAssetResolver-${{ matrix.os }}-${{ matrix.maya_product_name }}-${{ matrix.maya_product_version }}
path: artifacts
- name: Upload artifacts as release assets
run: |
git fetch --all --tags --force
latest_release_tag=$(git tag -l --sort=-version:refname v* | head -1)
gh release upload $latest_release_tag artifacts/*.zip --clobber
env:
GITHUB_TOKEN: ${{ github.TOKEN }}