-
Notifications
You must be signed in to change notification settings - Fork 41
165 lines (142 loc) · 4.44 KB
/
main.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
name: build
on:
push:
branches: [ master ]
tags:
- v*
pull_request:
branches: [ master ]
# matrix:
# maya: [2024]
# os: [macos-latest, ubuntu-latest, windows-latest]
# include:
# - maya: 2024
# update: 2
jobs:
compile_plugin:
strategy:
matrix:
maya: [2022, 2023, 2024, 2025]
os: [macos-13, macos-latest, ubuntu-latest, windows-latest]
include:
# Add the maya update versions here
- maya: 2022
update: 5
- maya: 2023
update: 3
- maya: 2024
update: 2
- maya: 2025
update: 1
# cross-compiling is annoying so just fall back to macos-13
exclude:
- os: macos-latest
maya: 2022
- os: macos-latest
maya: 2023
- os: macos-13
maya: 2024
- os: macos-13
maya: 2025
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: git fetch --force --tags origin
- name: Get Maya Devkit
id: get-devkit
uses: blurstudio/mayaModuleActions/getMayaDevkit@v1
with:
maya: ${{ matrix.maya }}
update: ${{ matrix.update }}
- name: Build Maya
uses: blurstudio/mayaModuleActions/mesonBuild@v1
with:
setup-args: >
-Dmaya:maya_version=${{ matrix.maya }}
-Dmaya:maya_devkit_base=${{ steps.get-devkit.outputs.devkit-path }}
-Dmaya_build=true
-Dpython_build=false
--buildtype release
--backend ninja
install-args: --skip-subprojects
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ matrix.maya }}-plugin
path: output_Maya${{ matrix.maya }}/*.${{ steps.get-devkit.outputs.plugin-ext }}
if-no-files-found: error
compile_python:
strategy:
matrix:
# Sorry x86 MacOS, The switch to ARM is maiking this too complicated
# Maya modules don't detect the architecture of the OS, so I've gotta pick
os: [macos-latest, ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: git fetch --force --tags origin
- name: Get pyver macos-latest
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
run: echo "PY_VER=3.9" >> $GITHUB_ENV
- name: Get pyver
if: ${{ matrix.os != 'macos-latest' }}
shell: bash
run: echo "PY_VER=3.7" >> $GITHUB_ENV
- name: Get an older python version
uses: actions/setup-python@v5
with:
python-version: ${{ env.PY_VER }}
- name: Build Python
uses: blurstudio/mayaModuleActions/mesonBuild@v1
with:
setup-args: >
-Dmaya_build=false
-Dpython_build=true
--buildtype release
--backend ninja
install-args: --skip-subprojects
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-pyModule
path: output_Python/*.*
if-no-files-found: error
upload_release:
name: Upload release
needs: [compile_plugin, compile_python]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git fetch --force --tags origin
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.0.1
- name: Package
uses: blurstudio/mayaModuleActions/packageMayaModule@v1
with:
module-name: simplex
folder-list: scripts icons
version: ${{ steps.previoustag.outputs.tag }}
python-limited-api: true
- name: Upload distribution
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
*.zip
- name: Publish To PyPI
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m pip install -U pip
python3 -m pip install -U twine
python3 -m twine upload --verbose *.whl