From c83496b7eb016567fe26dde2588912c686bb3676 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 16:36:13 -0700 Subject: [PATCH 1/9] Combine the artifacts for easier downloading --- .github/workflows/main.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fd71aed..975350c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,8 +61,8 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: windows-${{matrix.maya}} - path: artifacts/plug-ins/blurPostDeform.mll + name: blurdeform + path: artifacts/windows-${{matrix.maya}}/plug-ins/blurPostDeform.mll maya-macos: runs-on: macos-latest @@ -113,8 +113,9 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: mac-${{matrix.maya}} - path: artifacts/plug-ins/blurPostDeform.bundle + name: blurdeform + path: artifacts/mac-${{matrix.maya}}/plug-ins/blurPostDeform.bundle + maya-linux: runs-on: ubuntu-latest @@ -160,8 +161,8 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: linux-${{matrix.year}} - path: artifacts/plug-ins/blurPostDeform.so + name: blurdeform + path: artifacts/linux-${{matrix.maya}}/plug-ins/blurPostDeform.so # # Shipping @@ -199,7 +200,7 @@ jobs: # /blurdeform.mod with: - path: modules/blurdeform + path: modules - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV @@ -209,13 +210,12 @@ jobs: cp ./blurdeform.mod modules/ mkdir -p modules/blurdeform/scripts cp -r ./scripts/blurdeform modules/blurdeform/scripts - # zip -r blurPostDeform-${{env.RELEASE_VERSION}}.zip modules/ - zip -r blurPostDeform.zip modules/ + zip -r blurPostDeform-${{env.RELEASE_VERSION}}.zip modules/ - name: Upload distribution uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" + automatic_release_tag: "${{env.RELEASE_VERSION}}" prerelease: false - files: blurPostDeform.zip + files: blurPostDeform-*.zip From a5014b2c91180ad38987b7265c1f0909ccc9c89e Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 17:00:32 -0700 Subject: [PATCH 2/9] Fix folder paths, and run fewer jobs for testing --- .github/workflows/main.yml | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 975350c..9855d6b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,14 +23,14 @@ jobs: 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: "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" @@ -55,8 +55,8 @@ jobs: - name: Repath Artifacts run: | - mkdir artifacts/plug-ins - Copy-Item "./build/${{env.BUILD_TYPE}}/blurPostDeform.mll" -Destination "artifacts/plug-ins" + mkdir artifacts/windows-${{matrix.maya}}/plug-ins + Copy-Item "./build/${{env.BUILD_TYPE}}/blurPostDeform.mll" -Destination "artifacts/windows-${{matrix.maya}}/plug-ins" - name: Upload Artifacts uses: actions/upload-artifact@v3 @@ -72,14 +72,14 @@ jobs: 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: "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" @@ -107,8 +107,8 @@ jobs: - name: Repath Artifacts run: | - mkdir -p artifacts/plug-ins - cp ./build/${{env.BUILD_TYPE}}/blurPostDeform.bundle artifacts/plug-ins + mkdir -p artifacts/mac-${{matrix.maya}}/plug-ins + cp ./build/${{env.BUILD_TYPE}}/blurPostDeform.bundle artifacts/mac-${{matrix.maya}}/plug-ins - name: Upload Artifacts uses: actions/upload-artifact@v3 @@ -131,10 +131,10 @@ jobs: # year: "2018" #- maya: "2019.3" # year: "2019" - - maya: "2020.4" - year: "2020" - - maya: "2022.3" - year: "2022" + #- maya: "2020.4" + # year: "2020" + #- maya: "2022.3" + # year: "2022" - maya: "2023" year: "2023" @@ -155,8 +155,8 @@ jobs: - name: Repath Artifacts run: | - mkdir -p artifacts/plug-ins - cp ./build/blurPostDeform.so artifacts/plug-ins + mkdir -p artifacts/linux-${{matrix.maya}}/plug-ins + cp ./build/blurPostDeform.so artifacts/linux-${{matrix.maya}}/plug-ins - name: Upload Artifacts uses: actions/upload-artifact@v3 From e57b1ba2809df93599e8d0b35657a3539a9c1267 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 17:16:27 -0700 Subject: [PATCH 3/9] Add empty blurdeform.mod files to keep structure --- .github/workflows/main.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9855d6b..e4f2389 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,10 +59,13 @@ jobs: Copy-Item "./build/${{env.BUILD_TYPE}}/blurPostDeform.mll" -Destination "artifacts/windows-${{matrix.maya}}/plug-ins" - name: Upload Artifacts + run: New-Item -Name artifacts/blurdeform.mod -ItemType File uses: actions/upload-artifact@v3 with: name: blurdeform - path: artifacts/windows-${{matrix.maya}}/plug-ins/blurPostDeform.mll + path: | + artifacts/windows-${{matrix.maya}}/plug-ins/blurPostDeform.mll + artifacts/blurdeform.mod maya-macos: runs-on: macos-latest @@ -111,10 +114,13 @@ jobs: cp ./build/${{env.BUILD_TYPE}}/blurPostDeform.bundle artifacts/mac-${{matrix.maya}}/plug-ins - name: Upload Artifacts + run: touch artifacts/blurdeform.mod uses: actions/upload-artifact@v3 with: name: blurdeform - path: artifacts/mac-${{matrix.maya}}/plug-ins/blurPostDeform.bundle + path: | + artifacts/mac-${{matrix.maya}}/plug-ins/blurPostDeform.bundle + artifacts/blurdeform.mod maya-linux: @@ -159,10 +165,13 @@ jobs: cp ./build/blurPostDeform.so artifacts/linux-${{matrix.maya}}/plug-ins - name: Upload Artifacts + run: touch artifacts/blurdeform.mod uses: actions/upload-artifact@v3 with: name: blurdeform - path: artifacts/linux-${{matrix.maya}}/plug-ins/blurPostDeform.so + path: | + artifacts/linux-${{matrix.maya}}/plug-ins/blurPostDeform.so + artifacts/blurdeform.mod # # Shipping From 988ea45c356ad369394b799da5634250eb2ba590 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 17:18:34 -0700 Subject: [PATCH 4/9] Combine runs --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4f2389..4d36872 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,9 +57,9 @@ jobs: run: | mkdir artifacts/windows-${{matrix.maya}}/plug-ins Copy-Item "./build/${{env.BUILD_TYPE}}/blurPostDeform.mll" -Destination "artifacts/windows-${{matrix.maya}}/plug-ins" + New-Item -Name artifacts/blurdeform.mod -ItemType File - name: Upload Artifacts - run: New-Item -Name artifacts/blurdeform.mod -ItemType File uses: actions/upload-artifact@v3 with: name: blurdeform @@ -112,9 +112,9 @@ jobs: run: | mkdir -p artifacts/mac-${{matrix.maya}}/plug-ins cp ./build/${{env.BUILD_TYPE}}/blurPostDeform.bundle artifacts/mac-${{matrix.maya}}/plug-ins + touch artifacts/blurdeform.mod - name: Upload Artifacts - run: touch artifacts/blurdeform.mod uses: actions/upload-artifact@v3 with: name: blurdeform @@ -163,9 +163,9 @@ jobs: run: | mkdir -p artifacts/linux-${{matrix.maya}}/plug-ins cp ./build/blurPostDeform.so artifacts/linux-${{matrix.maya}}/plug-ins + touch artifacts/blurdeform.mod - name: Upload Artifacts - run: touch artifacts/blurdeform.mod uses: actions/upload-artifact@v3 with: name: blurdeform From 83d346dd1ba4b7296068294286c81a200df79ed1 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 18:16:04 -0700 Subject: [PATCH 5/9] Write a script to build the modfile --- .github/workflows/main.yml | 61 +++++++++++++++++++++++++++++++------- blurdeform.mod | 45 ---------------------------- buildmodfile.py | 45 ++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 55 deletions(-) delete mode 100644 blurdeform.mod create mode 100644 buildmodfile.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d36872..a75a8e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,8 +55,8 @@ jobs: - name: Repath Artifacts run: | - mkdir artifacts/windows-${{matrix.maya}}/plug-ins - Copy-Item "./build/${{env.BUILD_TYPE}}/blurPostDeform.mll" -Destination "artifacts/windows-${{matrix.maya}}/plug-ins" + mkdir artifacts/blurdeform/win64-${{matrix.maya}}/plug-ins + Copy-Item "./build/${{env.BUILD_TYPE}}/blurPostDeform.mll" -Destination "artifacts/blurdeform/win64-${{matrix.maya}}/plug-ins" New-Item -Name artifacts/blurdeform.mod -ItemType File - name: Upload Artifacts @@ -64,7 +64,7 @@ jobs: with: name: blurdeform path: | - artifacts/windows-${{matrix.maya}}/plug-ins/blurPostDeform.mll + artifacts/blurdeform/win64-${{matrix.maya}}/plug-ins/blurPostDeform.mll artifacts/blurdeform.mod maya-macos: @@ -110,8 +110,8 @@ jobs: - name: Repath Artifacts run: | - mkdir -p artifacts/mac-${{matrix.maya}}/plug-ins - cp ./build/${{env.BUILD_TYPE}}/blurPostDeform.bundle artifacts/mac-${{matrix.maya}}/plug-ins + mkdir -p artifacts/blurdeform/mac-${{matrix.maya}}/plug-ins + cp ./build/${{env.BUILD_TYPE}}/blurPostDeform.bundle artifacts/blurdeform/mac-${{matrix.maya}}/plug-ins touch artifacts/blurdeform.mod - name: Upload Artifacts @@ -119,7 +119,7 @@ jobs: with: name: blurdeform path: | - artifacts/mac-${{matrix.maya}}/plug-ins/blurPostDeform.bundle + artifacts/blurdeform/mac-${{matrix.maya}}/plug-ins/blurPostDeform.bundle artifacts/blurdeform.mod @@ -161,8 +161,8 @@ jobs: - name: Repath Artifacts run: | - mkdir -p artifacts/linux-${{matrix.maya}}/plug-ins - cp ./build/blurPostDeform.so artifacts/linux-${{matrix.maya}}/plug-ins + mkdir -p artifacts/blurdeform/linux-${{matrix.maya}}/plug-ins + cp ./build/blurPostDeform.so artifacts/blurdeform/linux-${{matrix.maya}}/plug-ins touch artifacts/blurdeform.mod - name: Upload Artifacts @@ -170,9 +170,50 @@ jobs: with: name: blurdeform path: | - artifacts/linux-${{matrix.maya}}/plug-ins/blurPostDeform.so + artifacts/blurdeform/linux-${{matrix.maya}}/plug-ins/blurPostDeform.so artifacts/blurdeform.mod + + build_modfile: + name: Package release + needs: [maya-win, maya-linux, maya-macos] + 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: + # ~/artifacts + # /blurdeform + # /- + # /plug-ins + # blurPostDeform.mll + # /blurdeform.mod + + with: + path: artifacts + + - name: Build Modfile + run: | + python buildmodfile.py artifacts/blurdeform.mod + + - name: Create distribution + run: | + mkdir -p artifacts/blurdeform/scripts + cp -r ./scripts/blurdeform artifacts/blurdeform/scripts + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: blurdeform + path: artifacts/ + + # # Shipping # @@ -186,7 +227,7 @@ jobs: # upload_release: name: Upload release - needs: [maya-win, maya-linux, maya-macos] + needs: [maya-win, maya-linux, maya-macos, build_modfile] runs-on: ubuntu-latest # Only run on e.g. v0.1.0 diff --git a/blurdeform.mod b/blurdeform.mod deleted file mode 100644 index dcb8ae6..0000000 --- a/blurdeform.mod +++ /dev/null @@ -1,45 +0,0 @@ - -+ PLATFORM:win64 MAYAVERSION:2018 blurdeform 1.0.0 blurdeform -plug-ins: windows-2018/plug-ins - -+ PLATFORM:linux MAYAVERSION:2018 blurdeform 1.0.0 blurdeform -plug-ins: linux-2018/plug-ins - -+ PLATFORM:mac MAYAVERSION:2018 blurdeform 1.0.0 blurdeform -plug-ins: mac-2018/plug-ins - -+ PLATFORM:win64 MAYAVERSION:2019 blurdeform 1.0.0 blurdeform -plug-ins: windows-2019/plug-ins - -+ PLATFORM:linux MAYAVERSION:2019 blurdeform 1.0.0 blurdeform -plug-ins: linux-2019/plug-ins - -+ PLATFORM:mac MAYAVERSION:2019 blurdeform 1.0.0 blurdeform -plug-ins: mac-2019/plug-ins - -+ PLATFORM:win64 MAYAVERSION:2020 blurdeform 1.0.0 blurdeform -plug-ins: windows-2020/plug-ins - -+ PLATFORM:linux MAYAVERSION:2020 blurdeform 1.0.0 blurdeform -plug-ins: linux-2020/plug-ins - -+ PLATFORM:mac MAYAVERSION:2020 blurdeform 1.0.0 blurdeform -plug-ins: mac-2020/plug-ins - -+ PLATFORM:win64 MAYAVERSION:2022 blurdeform 1.0.0 blurdeform -plug-ins: windows-2022/plug-ins - -+ PLATFORM:linux MAYAVERSION:2022 blurdeform 1.0.0 blurdeform -plug-ins: linux-2022/plug-ins - -+ PLATFORM:mac MAYAVERSION:2022 blurdeform 1.0.0 blurdeform -plug-ins: mac-2022/plug-ins - -+ PLATFORM:win64 MAYAVERSION:2023 blurdeform 1.0.0 blurdeform -plug-ins: windows-2023/plug-ins - -+ PLATFORM:linux MAYAVERSION:2023 blurdeform 1.0.0 blurdeform -plug-ins: linux-2023/plug-ins - -+ PLATFORM:mac MAYAVERSION:2023 blurdeform 1.0.0 blurdeform -plug-ins: mac-2023/plug-ins diff --git a/buildmodfile.py b/buildmodfile.py new file mode 100644 index 0000000..5116237 --- /dev/null +++ b/buildmodfile.py @@ -0,0 +1,45 @@ +import re +import argparse +from pathlib import Path, PurePosixPath + + +def main(outpath, modname, modver, modpath): + outpath = Path(outpath).absolute() + modpath = modpath or modname + + basePath = outpath.parent + plugPaths = list(basePath.glob(str(Path('**') / 'plug-ins'))) + + lines = [] + for pp in plugPaths: + rel = PurePosixPath(pp.relative_to(basePath)) + match = re.search(r"(?Pwin64|linux|mac)-(?P\d+)", str(rel)) + if not match: + continue + plat, year = match['platform'], match['year'] + lines.append(f"+ PLATFORM:{plat} MAYAVERSION:{year} {modname} {modver} {modpath}") + lines.append(f"plug-ins: {rel}") + lines.append("") + + with open(outpath, 'w') as f: + f.write('\n'.join(lines)) + + +def parse(): + parser = argparse.ArgumentParser( + prog='buildmodfile', + description='builds a mod file ensuring that plugins are loaded for the proper maya versions', + ) + parser.add_argument('outpath', help="The output filepath") + parser.add_argument('-n', '--name', help="The name of the module", required=True) + parser.add_argument('-v', '--version', help="The version of the module", default="1.0.0") + parser.add_argument('-p', '--path', help="The relative path to the module") + args = parser.parse_args() + + main(args.outpath, args.name, args.version, args.path) + + +if __name__ == "__main__": + parse() + + From 7b288e0384373c38c298c71218eca3dd6ce747a3 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 18:20:59 -0700 Subject: [PATCH 6/9] Fix name arg --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a75a8e4..1963599 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -200,7 +200,7 @@ jobs: - name: Build Modfile run: | - python buildmodfile.py artifacts/blurdeform.mod + python buildmodfile.py artifacts/blurdeform.mod --name blurdeform - name: Create distribution run: | From d8e33fd1ca805b3f4cd090dfca66eef2b073cda1 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 18:49:43 -0700 Subject: [PATCH 7/9] Fix the python script, and deal with artifacts --- .github/workflows/main.yml | 6 ++++-- buildmodfile.py | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1963599..b8dd54c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -200,7 +200,7 @@ jobs: - name: Build Modfile run: | - python buildmodfile.py artifacts/blurdeform.mod --name blurdeform + python buildmodfile.py artifacts/blurdeform.mod --name blurdeform --path artifacts/blurdeform - name: Create distribution run: | @@ -211,7 +211,9 @@ jobs: uses: actions/upload-artifact@v3 with: name: blurdeform - path: artifacts/ + path: | + artifacts/blurdeform/scripts + artifacts/blurdeform.mod # diff --git a/buildmodfile.py b/buildmodfile.py index 5116237..0fcf855 100644 --- a/buildmodfile.py +++ b/buildmodfile.py @@ -5,19 +5,21 @@ def main(outpath, modname, modver, modpath): outpath = Path(outpath).absolute() - modpath = modpath or modname - basePath = outpath.parent - plugPaths = list(basePath.glob(str(Path('**') / 'plug-ins'))) + basepath = outpath.parent + modpath = Path(modpath).absolute() + modrel = modpath.relative_to(basepath) + + plugPaths = list(modpath.glob(str(Path('**') / 'plug-ins'))) lines = [] for pp in plugPaths: - rel = PurePosixPath(pp.relative_to(basePath)) + rel = PurePosixPath(pp.relative_to(modpath)) match = re.search(r"(?Pwin64|linux|mac)-(?P\d+)", str(rel)) if not match: continue plat, year = match['platform'], match['year'] - lines.append(f"+ PLATFORM:{plat} MAYAVERSION:{year} {modname} {modver} {modpath}") + lines.append(f"+ PLATFORM:{plat} MAYAVERSION:{year} {modname} {modver} {modrel}") lines.append(f"plug-ins: {rel}") lines.append("") @@ -33,7 +35,7 @@ def parse(): parser.add_argument('outpath', help="The output filepath") parser.add_argument('-n', '--name', help="The name of the module", required=True) parser.add_argument('-v', '--version', help="The version of the module", default="1.0.0") - parser.add_argument('-p', '--path', help="The relative path to the module") + parser.add_argument('-p', '--path', help="The path to the module folder", required=True) args = parser.parse_args() main(args.outpath, args.name, args.version, args.path) From 0341965605f286fa8e3238e64f340bb76e75e281 Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 19:19:06 -0700 Subject: [PATCH 8/9] Fix the modfile filepaths and re-enable everything --- .github/workflows/main.yml | 84 +++++++++++++------------------------- 1 file changed, 28 insertions(+), 56 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8dd54c..f601548 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,6 @@ name: build on: push: - branches: [ main ] tags: - v* pull_request: @@ -23,14 +22,14 @@ jobs: 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: "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" @@ -75,14 +74,14 @@ jobs: 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: "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" @@ -137,10 +136,10 @@ jobs: # year: "2018" #- maya: "2019.3" # year: "2019" - #- maya: "2020.4" - # year: "2020" - #- maya: "2022.3" - # year: "2022" + - maya: "2020.4" + year: "2020" + - maya: "2022.3" + year: "2022" - maya: "2023" year: "2023" @@ -185,35 +184,25 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 - - # Omitting name: means "download all artifacts" - # Destination directory structure: - # ~/artifacts - # /blurdeform - # /- - # /plug-ins - # blurPostDeform.mll - # /blurdeform.mod - with: path: artifacts - name: Build Modfile run: | - python buildmodfile.py artifacts/blurdeform.mod --name blurdeform --path artifacts/blurdeform + python buildmodfile.py artifacts/blurdeform/blurdeform.mod --name blurdeform --path artifacts/blurdeform/blurdeform - name: Create distribution run: | - mkdir -p artifacts/blurdeform/scripts - cp -r ./scripts/blurdeform artifacts/blurdeform/scripts + mkdir -p artifacts/blurdeform/blurdeform/scripts + cp -r ./scripts/blurdeform artifacts/blurdeform/blurdeform/scripts - name: Upload Artifacts uses: actions/upload-artifact@v3 with: name: blurdeform path: | - artifacts/blurdeform/scripts - artifacts/blurdeform.mod + artifacts/blurdeform/blurdeform/scripts + artifacts/blurdeform/blurdeform.mod # @@ -236,38 +225,21 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') 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 - # /blurdeform - # /- - # /plug-ins - # blurPostDeform.mll - # /blurdeform.mod - with: - path: modules + path: artifacts - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Create distribution + - name: Create zipfile run: | - cp ./blurdeform.mod modules/ - mkdir -p modules/blurdeform/scripts - cp -r ./scripts/blurdeform modules/blurdeform/scripts - zip -r blurPostDeform-${{env.RELEASE_VERSION}}.zip modules/ + zip -r blurPostDeform-${{env.RELEASE_VERSION}}.zip artifacts/blurdeform - name: Upload distribution uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "${{env.RELEASE_VERSION}}" prerelease: false files: blurPostDeform-*.zip From 9ca14a7bea74a63dacdcd8ae027fdd7153d161ad Mon Sep 17 00:00:00 2001 From: Tyler Fox Date: Mon, 21 Aug 2023 19:27:20 -0700 Subject: [PATCH 9/9] Use the simple year for linux builds --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f601548..1fd4909 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -160,8 +160,8 @@ jobs: - name: Repath Artifacts run: | - mkdir -p artifacts/blurdeform/linux-${{matrix.maya}}/plug-ins - cp ./build/blurPostDeform.so artifacts/blurdeform/linux-${{matrix.maya}}/plug-ins + mkdir -p artifacts/blurdeform/linux-${{matrix.year}}/plug-ins + cp ./build/blurPostDeform.so artifacts/blurdeform/linux-${{matrix.year}}/plug-ins touch artifacts/blurdeform.mod - name: Upload Artifacts @@ -169,7 +169,7 @@ jobs: with: name: blurdeform path: | - artifacts/blurdeform/linux-${{matrix.maya}}/plug-ins/blurPostDeform.so + artifacts/blurdeform/linux-${{matrix.year}}/plug-ins/blurPostDeform.so artifacts/blurdeform.mod