Skip to content

Commit 5eade1b

Browse files
committed
Switch to a meson build
1 parent 2093a0a commit 5eade1b

File tree

11 files changed

+268
-458
lines changed

11 files changed

+268
-458
lines changed

.github/workflows/main.yml

Lines changed: 66 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: build
23

34
on:
@@ -8,226 +9,96 @@ on:
89
pull_request:
910
branches: [ master ]
1011

11-
env:
12-
BUILD_TYPE: Release
12+
# matrix:
13+
# maya: [2024]
14+
# os: [macos-latest, ubuntu-latest, windows-latest]
15+
# include:
16+
# - maya: 2024
17+
# update: 2
1318

1419
jobs:
15-
#
16-
# Windows
17-
#
18-
# __
19-
# |\__/ \
20-
# | |
21-
# | __ |
22-
# \__/ \|
23-
#
24-
#
25-
maya-win:
26-
runs-on: windows-2019
27-
20+
compile_plugin:
2821
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.
32-
fail-fast: false
33-
3422
matrix:
35-
include:
36-
- maya: "2018"
37-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2018/Autodesk_Maya_2018_7_Update_DEVKIT_Windows.zip"
38-
- maya: "2019"
39-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2019/Autodesk_Maya_2019_3_Update_DEVKIT_Windows.zip"
40-
- maya: "2020"
41-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2020/Autodesk_Maya_2020_4_Update_DEVKIT_Windows.zip"
42-
- maya: "2022"
43-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_3_Update_DEVKIT_Windows.zip"
44-
- maya: "2023"
45-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_DEVKIT_Windows.zip"
46-
47-
steps:
48-
- name: Checkout code
49-
uses: actions/checkout@v3
50-
with:
51-
submodules: true
52-
53-
- name: Install devkit
54-
run: |
55-
Write-Host "Downloading Devkit: ${{matrix.devkit}}..."
56-
Invoke-WebRequest -Uri ${{matrix.devkit}} -OutFile "$pwd/devkit.zip"
57-
Write-Host "Extracting devkit.zip.."
58-
Expand-Archive -LiteralPath devkit.zip -DestinationPath $pwd
59-
60-
- name: Configure CMake
61-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$pwd/devkitBase"
62-
63-
- name: Build
64-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
65-
66-
- name: Repath Artifacts
67-
run: |
68-
mkdir artifacts/plug-ins
69-
Copy-Item "./build/${{env.BUILD_TYPE}}/BlurRelax.mll" -Destination "artifacts/plug-ins"
23+
maya: [2022, 2023, 2024, 2025]
24+
os: [macos-13, macos-latest, ubuntu-latest, windows-latest]
25+
include:
26+
# Add the maya update versions here
27+
- maya: 2022
28+
update: 5
29+
- maya: 2023
30+
update: 3
31+
- maya: 2024
32+
update: 2
33+
- maya: 2025
34+
update: 1
35+
36+
# cross-compiling is annoying so just fall back to macos-13
37+
exclude:
38+
- os: macos-latest
39+
maya: 2022
40+
- os: macos-latest
41+
maya: 2023
42+
- os: macos-13
43+
maya: 2024
44+
- os: macos-13
45+
maya: 2025
7046

71-
- name: Upload Artifacts
72-
uses: actions/upload-artifact@v3
73-
with:
74-
name: windows-${{matrix.maya}}
75-
path: |
76-
artifacts/plug-ins/BlurRelax.mll
77-
78-
maya-macos:
79-
runs-on: macos-10.15
80-
81-
strategy:
8247
fail-fast: false
8348

84-
matrix:
85-
include:
86-
- maya: "2018"
87-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2018/Autodesk_Maya_2018_7_Update_DEVKIT_Mac.dmg"
88-
- maya: "2019"
89-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2019/Autodesk_Maya_2019_3_Update_DEVKIT_Mac.dmg"
90-
- maya: "2020"
91-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2020/Autodesk_Maya_2020_4_Update_DEVKIT_Mac.dmg"
92-
- maya: "2022"
93-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_3_Update_DEVKIT_Mac.dmg"
94-
- maya: "2023"
95-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_DEVKIT_Mac.dmg"
96-
49+
runs-on: ${{ matrix.os }}
9750
steps:
98-
- name: Checkout code
99-
uses: actions/checkout@v3
100-
with:
101-
submodules: true
102-
103-
- name: Install devkit
104-
run: |
105-
curl -o devkit.dmg ${{matrix.devkit}}
106-
7z x devkit.dmg
51+
- uses: actions/checkout@v4
52+
- run: git fetch --force --tags origin
10753

108-
- uses: maxim-lobanov/setup-xcode@v1
54+
- name: Get Maya Devkit
55+
id: get-devkit
56+
uses: blurstudio/mayaModuleActions/getMayaDevkit@v1
10957
with:
110-
xcode-version: '10.3'
111-
112-
- name: Configure CMake
113-
run: |
114-
cmake -G Xcode -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="$PWD/devkitBase"
58+
maya: ${{ matrix.maya }}
59+
update: ${{ matrix.update }}
11560

11661
- name: Build
117-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
118-
119-
- name: Repath Artifacts
120-
run: |
121-
mkdir -p artifacts/plug-ins
122-
cp ./build/${{env.BUILD_TYPE}}/BlurRelax.bundle artifacts/plug-ins
123-
124-
- name: Upload Artifacts
125-
uses: actions/upload-artifact@v3
126-
with:
127-
name: mac-${{matrix.maya}}
128-
path: |
129-
artifacts/plug-ins/BlurRelax.bundle
130-
131-
maya-linux:
132-
runs-on: ubuntu-latest
133-
container: scottenglert/maya-build:${{matrix.maya}}
134-
135-
strategy:
136-
fail-fast: false
137-
138-
matrix:
139-
include:
140-
- maya: "2018.7"
141-
year: "2018"
142-
- maya: "2019.3"
143-
year: "2019"
144-
- maya: "2020.4"
145-
year: "2020"
146-
- maya: "2022.3"
147-
year: "2022"
148-
- maya: "2023"
149-
year: "2023"
150-
151-
steps:
152-
- name: Checkout code
153-
uses: actions/checkout@v3
62+
uses: blurstudio/mayaModuleActions/mesonBuild@v1
15463
with:
155-
submodules: true
156-
157-
- name: Configure CMake
158-
run: |
159-
mkdir build
160-
cd build
161-
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/usr/autodesk/devkitBase" ..
162-
163-
- name: Build
164-
run: cmake --build ./build --config ${{env.BUILD_TYPE}}
165-
166-
- name: Repath Artifacts
167-
run: |
168-
mkdir -p artifacts/plug-ins
169-
cp ./build/BlurRelax.so artifacts/plug-ins
64+
setup-args: >
65+
-Dmaya:maya_version=${{ matrix.maya }}
66+
-Dmaya:maya_devkit_base=${{ steps.get-devkit.outputs.devkit-path }}
67+
--buildtype release
68+
--backend ninja
17069
17170
- name: Upload Artifacts
172-
uses: actions/upload-artifact@v3
71+
uses: actions/upload-artifact@v4
17372
with:
174-
name: linux-${{matrix.year}}
175-
path: |
176-
artifacts/plug-ins/BlurRelax.so
73+
name: ${{ runner.os }}-${{ matrix.maya }}-plugin
74+
path: build/*.${{ steps.get-devkit.outputs.plugin-ext }}
75+
if-no-files-found: error
17776

178-
#
179-
# Shipping
180-
#
181-
# _________
182-
# |\ _ _ _ _\
183-
# | \________\
184-
# | | |
185-
# | | |
186-
# \|________|
187-
#
188-
#
18977
upload_release:
19078
name: Upload release
191-
needs: [maya-win, maya-linux, maya-macos]
79+
needs: compile_plugin
19280
runs-on: ubuntu-latest
193-
194-
# Only run on e.g. v0.1.0
195-
if: startsWith(github.ref, 'refs/tags/v')
196-
19781
steps:
198-
- name: Checkout code
199-
uses: actions/checkout@v3
200-
201-
- name: Download artifacts
202-
uses: actions/download-artifact@v3
203-
204-
# Omitting name: means "download all artifacts"
205-
# Destination directory structure:
206-
# ~/modules
207-
# /BlurRelax
208-
# /<os_name>-<maya_major_version>
209-
# /plug-ins
210-
# BlurRelax.mll
211-
# /BlurRelax.mod
212-
82+
- uses: actions/checkout@v4
83+
- run: git fetch --force --tags origin
84+
- name: 'Get Previous tag'
85+
id: previoustag
86+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
21387
with:
214-
path: modules/BlurRelax
215-
216-
- name: Set env
217-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
88+
fallback: 0.0.1
21889

219-
- name: Create distribution
220-
run: |
221-
cp ./BlurRelax.mod modules/
222-
mkdir -p modules/BlurRelax/scripts
223-
cp -r ./scripts modules/BlurRelax
224-
zip -r BlurRelax-${{env.RELEASE_VERSION}}.zip modules/
90+
- name: Package
91+
uses: blurstudio/mayaModuleActions/packageMayaModule@v1
92+
with:
93+
module-name: BlurRelax
94+
folder-list: scripts icons
95+
version: ${{ steps.previoustag.outputs.tag }}
22596

22697
- name: Upload distribution
227-
uses: "marvinpinto/action-automatic-releases@latest"
98+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
99+
uses: softprops/action-gh-release@v1
228100
with:
229-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
230-
automatic_release_tag: "latest"
101+
token: "${{ secrets.GITHUB_TOKEN }}"
231102
prerelease: false
232103
files: |
233-
BlurRelax-*.zip
104+
*.zip

BlurRelax.mod

Lines changed: 0 additions & 44 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)