Skip to content

Commit f51d8d8

Browse files
committed
Test compiling in meson
1 parent 4bcc4a9 commit f51d8d8

File tree

1 file changed

+28
-250
lines changed

1 file changed

+28
-250
lines changed

Diff for: .github/workflows/main.yml

+28-250
Original file line numberDiff line numberDiff line change
@@ -1,291 +1,69 @@
11
name: build
22

3+
34
on:
4-
push:
5-
branches: [ master ]
6-
tags:
7-
- v*
85
pull_request:
96
branches: [ master ]
107

118
env:
129
BUILD_TYPE: Release
1310

1411
jobs:
15-
#
16-
# Windows
17-
#
18-
# __
19-
# |\__/ \
20-
# | |
21-
# | __ |
22-
# \__/ \|
23-
#
24-
#
2512
maya-win:
2613
runs-on: windows-latest
2714

2815
strategy:
29-
# Without this, all containers stop if any fail
30-
# That's bad, we want to know whether it's only one
31-
# or if it happens to multiples or all.
3216
fail-fast: false
3317

3418
matrix:
3519
include:
36-
- maya: "2022"
37-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Windows.zip"
38-
- maya: "2023"
39-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Windows.zip"
4020
- maya: "2024"
4121
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Windows.zip"
42-
- maya: "2025"
43-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2025/Autodesk_Maya_2025_1_Update_DEVKIT_Windows.zip"
4422

4523
steps:
4624
- name: Checkout code
4725
uses: actions/checkout@v4
4826
with:
4927
submodules: true
5028

51-
- name: Install devkit
29+
- name: Install devkit Windows
5230
run: |
53-
Write-Host "Downloading Devkit: ${{matrix.devkit}}..."
5431
Invoke-WebRequest -Uri ${{matrix.devkit}} -OutFile "$pwd/devkit.zip"
55-
Write-Host "Extracting devkit.zip.."
5632
Expand-Archive -LiteralPath devkit.zip -DestinationPath $pwd
5733
58-
- name: Configure CMake
59-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$pwd/devkitBase"
34+
- name: Install ninja Windows
35+
run: choco install ninja
6036

61-
- name: Build
62-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
37+
- name: Install meson Windows
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: '3.10'
41+
run: pip install meson
42+
43+
- name: Meson Setup Windows
44+
run: >
45+
meson setup
46+
-Dmaya:maya_version="${{matrix.maya}}"
47+
-Dmaya:maya_devkit_base="$pwd/devkitBase"
48+
--buildtype debugoptimized
49+
--vsenv
50+
--backend ninja
51+
${{github.workspace}}/build
52+
.
53+
54+
- name: Compile
55+
run: |
56+
meson compile -C ${{github.workspace}}/build
57+
meson install -C ${{github.workspace}}/build
6358
64-
- name: Repath Artifacts
59+
- name: Repath Artifacts Windows
6560
run: |
6661
mkdir artifacts/plug-ins
67-
Copy-Item "./build/${{env.BUILD_TYPE}}/TwistSpline.mll" -Destination "artifacts/plug-ins"
62+
Copy-Item ${{github.workspace}}/build/TwistSpline.mll -Destination "artifacts/plug-ins"
6863
69-
- name: Upload Artifacts
64+
- name: Upload Artifacts Windows
7065
uses: actions/upload-artifact@v4
7166
with:
7267
name: windows-${{matrix.maya}}
7368
path: |
7469
artifacts/plug-ins/TwistSpline.mll
75-
76-
# Splitting mac-os into two different steps, as 2024 was made compatible with new arm architecture.
77-
maya-macos-x86_64:
78-
runs-on: macos-latest
79-
80-
strategy:
81-
fail-fast: false
82-
83-
matrix:
84-
include:
85-
- maya: "2022"
86-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Mac.dmg"
87-
- maya: "2023"
88-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Mac.dmg"
89-
90-
steps:
91-
- name: Checkout code
92-
uses: actions/checkout@v4
93-
with:
94-
submodules: true
95-
96-
- name: Install devkit
97-
run: |
98-
curl -o devkit.dmg ${{matrix.devkit}}
99-
hdiutil attach devkit.dmg
100-
101-
- uses: maxim-lobanov/setup-xcode@v1
102-
with:
103-
xcode-version: '14.3.1'
104-
105-
- name: Configure CMake
106-
run: |
107-
cmake -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/Volumes/devkitBase"
108-
109-
- name: Build
110-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
111-
112-
- name: Repath Artifacts
113-
run: |
114-
mkdir -p artifacts/plug-ins
115-
cp ./build/${{env.BUILD_TYPE}}/TwistSpline.bundle artifacts/plug-ins
116-
117-
- name: Upload Artifacts
118-
uses: actions/upload-artifact@v4
119-
with:
120-
name: mac-${{matrix.maya}}
121-
path: |
122-
artifacts/plug-ins/TwistSpline.bundle
123-
124-
# This will be compiled for both x86_64 and arm64 architectures, as arm support has been added starting from Maya 2024.
125-
maya-macos-arm64:
126-
runs-on: macos-latest
127-
128-
strategy:
129-
fail-fast: false
130-
131-
matrix:
132-
include:
133-
- maya: "2024"
134-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Mac.dmg"
135-
- maya: "2025"
136-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2025/Autodesk_Maya_2025_1_Update_DEVKIT_Mac.dmg"
137-
138-
steps:
139-
- name: Checkout code
140-
uses: actions/checkout@v4
141-
with:
142-
submodules: true
143-
144-
- name: Install devkit
145-
run: |
146-
curl -o devkit.dmg ${{matrix.devkit}}
147-
hdiutil attach devkit.dmg
148-
149-
- uses: maxim-lobanov/setup-xcode@v1
150-
with:
151-
xcode-version: '14.3.1'
152-
153-
- name: Configure CMake
154-
run: |
155-
cmake -G Xcode -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/Volumes/devkitBase"
156-
157-
- name: Build
158-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
159-
160-
- name: Repath Artifacts
161-
run: |
162-
mkdir -p artifacts/plug-ins
163-
cp ./build/${{env.BUILD_TYPE}}/TwistSpline.bundle artifacts/plug-ins
164-
165-
- name: Upload Artifacts
166-
uses: actions/upload-artifact@v4
167-
with:
168-
name: mac-${{matrix.maya}}
169-
path: |
170-
artifacts/plug-ins/TwistSpline.bundle
171-
172-
maya-linux:
173-
runs-on: ubuntu-latest
174-
175-
strategy:
176-
fail-fast: false
177-
178-
matrix:
179-
include:
180-
- maya: "2022"
181-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Linux.tgz"
182-
- maya: "2023"
183-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Linux.tgz"
184-
- maya: "2024"
185-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Linux.tgz"
186-
- maya: "2025"
187-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2025/Autodesk_Maya_2025_1_Update_DEVKIT_Linux.tgz"
188-
189-
steps:
190-
- name: Checkout code
191-
uses: actions/checkout@v4
192-
with:
193-
submodules: true
194-
195-
- name: Install OpenGL libraries
196-
run: |
197-
sudo apt install libglu1-mesa-dev
198-
199-
- name: Install devkit
200-
run: |
201-
curl -o devkit.tgz ${{matrix.devkit}}
202-
tar xvzf devkit.tgz
203-
204-
- name: Configure CMake
205-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$PWD/devkitBase"
206-
207-
- name: Build
208-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
209-
210-
- name: Repath Artifacts
211-
run: |
212-
mkdir -p artifacts/plug-ins
213-
cp "./build/TwistSpline.so" "artifacts/plug-ins"
214-
215-
- name: Upload Artifacts
216-
uses: actions/upload-artifact@v4
217-
with:
218-
name: linux-${{matrix.maya}}
219-
path: |
220-
artifacts/plug-ins/TwistSpline.so
221-
222-
223-
#
224-
# Shipping
225-
#
226-
# _________
227-
# |\ _ _ _ _\
228-
# | \________\
229-
# | | |
230-
# | | |
231-
# \|________|
232-
#
233-
#
234-
upload_release:
235-
name: Upload release
236-
needs: [maya-win, maya-linux, maya-macos-x86_64, maya-macos-arm64]
237-
runs-on: ubuntu-latest
238-
239-
steps:
240-
- name: Checkout code
241-
uses: actions/checkout@v4
242-
243-
- name: Download artifacts
244-
uses: actions/download-artifact@v4
245-
246-
# Omitting name: means "download all artifacts"
247-
# Destination directory structure:
248-
# ~/modules
249-
# /TwistSpline
250-
# /<os_name>-<maya_major_version>
251-
# /icons
252-
# /plug-ins
253-
# TwistSpline.mll
254-
# /scripts
255-
# *.py
256-
# *.mel
257-
# /TwistSpline.mod
258-
259-
with:
260-
path: modules/TwistSpline
261-
262-
- name: Set env
263-
run: |
264-
LATEST_TAG=$(git describe --tags --abbrev=0 || echo "NOTAG")
265-
echo "LatestTag: ${LATEST_TAG}"
266-
echo "RELEASE_VERSION=${LATEST_TAG}" >> $GITHUB_ENV
267-
268-
- name: Create distribution
269-
run: |
270-
cp ./TwistSpline.mod modules/
271-
mkdir -p modules/TwistSpline/scripts
272-
cp -r ./scripts modules/TwistSpline
273-
mkdir -p modules/TwistSpline/icons
274-
cp ./icons/*.png modules/TwistSpline/icons
275-
cp ./icons/*.xpm modules/TwistSpline/icons
276-
zip -r TwistSpline-${{env.RELEASE_VERSION}}.zip modules/
277-
278-
- name: Upload Artifacts
279-
uses: actions/upload-artifact@v4
280-
with:
281-
name: TwistSpline-module
282-
path: TwistSpline-${{env.RELEASE_VERSION}}.zip
283-
284-
- name: Upload distribution
285-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
286-
uses: softprops/action-gh-release@v1
287-
with:
288-
token: "${{ secrets.GITHUB_TOKEN }}"
289-
prerelease: false
290-
files: |
291-
*.zip

0 commit comments

Comments
 (0)