Try again #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- v* | |
pull_request: | |
branches: [ master ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
maya-win: | |
runs-on: windows-2019 | |
strategy: | |
# Without this, all containers stop if any fail | |
# That's bad, we want to know whether it's only one | |
# or if it happens to multiples or all. | |
fail-fast: false | |
matrix: | |
include: | |
- maya: "2018" | |
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" | |
- maya: "2019" | |
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" | |
- maya: "2020" | |
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" | |
- maya: "2022" | |
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" | |
- maya: "2023" | |
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_DEVKIT_Windows.zip" | |
- maya: "2024" | |
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_1_Update_DEVKIT_Windows.zip" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install devkit | |
run: | | |
Write-Host "Downloading Devkit: ${{matrix.devkit}}..." | |
Invoke-WebRequest -Uri ${{matrix.devkit}} -OutFile "$pwd/devkit.zip" | |
Write-Host "Extracting devkit.zip.." | |
Expand-Archive -LiteralPath devkit.zip -DestinationPath $pwd | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$pwd/devkitBase" | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Repath Artifacts | |
run: | | |
mkdir artifacts/plug-ins | |
mkdir artifacts/pyModules | |
Copy-Item "./build/src/maya/${{env.BUILD_TYPE}}/simplex_maya.mll" -Destination "artifacts/plug-ins" | |
Copy-Item "./build/src/python/${{env.BUILD_TYPE}}/py*simplex.pyd" -Destination "artifacts/pyModules" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: win64-${{matrix.maya}} | |
path: | | |
artifacts/plug-ins/simplex_maya.mll | |
artifacts/pyModules/py*simplex.pyd | |
maya-macos-11: | |
runs-on: macos-11 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- maya: "2018" | |
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" | |
- maya: "2019" | |
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" | |
- maya: "2020" | |
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" | |
- maya: "2022" | |
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" | |
- maya: "2023" | |
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_DEVKIT_Mac.dmg" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install devkit | |
run: | | |
curl -o devkit.dmg ${{matrix.devkit}} | |
7z x devkit.dmg | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '11.7' | |
- name: Configure CMake | |
run: | | |
cmake -G Xcode -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="$PWD/devkitBase" | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Repath Artifacts | |
run: | | |
mkdir -p artifacts/plug-ins | |
mkdir -p artifacts/pyModules | |
cp ./build/src/maya/${{env.BUILD_TYPE}}/simplex_maya.bundle artifacts/plug-ins | |
cp ./build/src/python/${{env.BUILD_TYPE}}/py*simplex.so artifacts/pyModules | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mac-${{matrix.maya}} | |
path: | | |
artifacts/plug-ins/simplex_maya.bundle | |
artifacts/pyModules/py*simplex.so | |
maya-macos-12: | |
runs-on: macos-12 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- maya: "2024" | |
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_1_Update_DEVKIT_Mac.dmg" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install devkit | |
run: | | |
curl -o devkit.dmg ${{matrix.devkit}} | |
MOUNTDIR=$(hdiutil mount devkit.dmg | awk 'END {$1=$2=""; print $0}') | |
cp -r $MOUNTDIR . | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '13.4' | |
- name: Configure CMake | |
run: | | |
cmake -G Xcode -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="$PWD/devkitBase" | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Repath Artifacts | |
run: | | |
mkdir -p artifacts/plug-ins | |
mkdir -p artifacts/pyModules | |
cp ./build/src/maya/${{env.BUILD_TYPE}}/simplex_maya.bundle artifacts/plug-ins | |
cp ./build/src/python/${{env.BUILD_TYPE}}/py*simplex.so artifacts/pyModules | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mac-${{matrix.maya}} | |
path: | | |
artifacts/plug-ins/simplex_maya.bundle | |
artifacts/pyModules/py*simplex.so | |
maya-linux: | |
runs-on: ubuntu-latest | |
container: scottenglert/maya-build:${{matrix.maya}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# The 2018 and 2019 containers use cmake 3.9, and I'm using functions introduced in 3.16 | |
#- maya: "2018.7" | |
# year: "2018" | |
#- maya: "2019.3" | |
# year: "2019" | |
- maya: "2020.4" | |
year: "2020" | |
- maya: "2022.3" | |
year: "2022" | |
- maya: "2023" | |
year: "2023" | |
- maya: "2024" | |
year: "2024" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Configure CMake | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/usr/autodesk/devkitBase" .. | |
- name: Build | |
run: cmake --build ./build --config ${{env.BUILD_TYPE}} | |
- name: Repath Artifacts | |
run: | | |
mkdir -p artifacts/plug-ins | |
mkdir -p artifacts/pyModules | |
cp ./build/src/maya/simplex_maya.so artifacts/plug-ins | |
cp ./build/src/python/py*simplex.so artifacts/pyModules | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-${{matrix.year}} | |
path: | | |
artifacts/plug-ins/simplex_maya.so | |
artifacts/pyModules/py*simplex.so | |
# | |
# Shipping | |
# | |
# _________ | |
# |\ _ _ _ _\ | |
# | \________\ | |
# | | | | |
# | | | | |
# \|________| | |
# | |
# | |
upload_release: | |
name: Upload release | |
needs: [maya-win, maya-linux, maya-macos-11, maya-macos-12] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
# Omitting name: means "download all artifacts" | |
# Destination directory structure: | |
# ~/modules | |
# /simplex | |
# /<os_name>-<maya_major_version> | |
# /plug-ins | |
# simplex_maya.mll | |
# /py2Modules | |
# py2simplex.pyd | |
# /py3Modules | |
# py3simplex.pyd | |
# /simplex.mod | |
with: | |
path: modules/simplex | |
- name: Build Modfile | |
run: | | |
python buildmodfile.py modules/simplex.mod --name simplex --path modules/simplex | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Create distribution | |
run: | | |
mkdir -p modules/simplex/scripts | |
cp -r ./scripts/simplexui modules/simplex/scripts | |
cd modules | |
zip -r ../simplex.zip . | |
cd .. | |
- name: Upload Artifacts | |
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: simplex-module | |
path: simplex.zip | |
- name: Rename Zip | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
run: mv simplex.zip simplex-${{env.RELEASE_VERSION}}.zip | |
- name: Upload distribution | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
simplex-*.zip |