From c686326e2220e36997b63f1590547567ce3b0943 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 01:56:23 +0200 Subject: [PATCH] Parallelization fixes Contributes to CURA-8415 --- .github/workflows/installers.yml | 7 +++++- .github/workflows/linux.yml | 1 - .github/workflows/macos.yml | 35 ++++++++++++++++++++++++------ .github/workflows/windows.yml | 37 +++++++++++++++++++++++--------- 4 files changed, 62 insertions(+), 18 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 283fc76ee5..ead3b7a87a 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -35,6 +35,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: windows-2022 + secrets: inherit linux-modern-installer: uses: ./.github/workflows/linux.yml @@ -45,6 +46,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-22.04 + secrets: inherit linux-legacy-installer: uses: ./.github/workflows/linux.yml @@ -55,6 +57,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-20.04 + secrets: inherit macos-installer: uses: ./.github/workflows/macos.yml @@ -65,6 +68,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: macos-11.0 + secrets: inherit macos-arm-installer: uses: ./.github/workflows/macos.yml @@ -74,4 +78,5 @@ jobs: enterprise: ${{ inputs.enterprise }} staging: ${{ inputs.staging }} architecture: ARM64 - operating_system: self-hosted \ No newline at end of file + operating_system: self-hosted + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 42312219d6..70a15bcbb5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -179,7 +179,6 @@ jobs: run: | import os enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-${{ inputs.architecture }}" if "${{ inputs.operating_system }}" == "ubuntu-22.04": installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-${{ inputs.architecture }}" else: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4c77692cff..e5e8ead2cd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -242,27 +242,40 @@ jobs: f.writelines(f"`{package.key}/{package.version}`\n") - name: Archive the artifacts (bash) - run: tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz" "./dist/" + run: | + tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz" "./dist/" + tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}-package.tar.gz" "./cura_inst/packaging/" - - name: upload the tarred dist folder + - name: upload the tarred dist and packaging folder uses: actions/upload-artifact@v3 with: name: dist path: | ${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz + ${{ steps.filename.outputs.INSTALLER_FILENAME }}-package.tar.gz retention-days: 5 cura-installer-create-dmg: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + - name: Download the dist uses: actions/download-artifact@v3 with: name: dist - name: untar the dist folder - run: tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + run: | + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-package.tar.gz" - name: Remove Macos keychain (Bash) run: security delete-keychain signing_temp.keychain || true @@ -287,7 +300,7 @@ jobs: - name: Install MacOS system requirements run: brew install create-dmg - - name: Create the Macos dmg and pkg (Bash) + - name: Create the Macos dmg (Bash) run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_dmg --app_name "$CURA_APP_NAME" working-directory: dist @@ -303,13 +316,23 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + - name: Download the dist uses: actions/download-artifact@v3 with: name: dist - name: untar the dist folder - run: tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + run: | + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.tar.gz" + tar -zxf "./${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-package.tar.gz" - name: Remove Macos keychain (Bash) run: security delete-keychain signing_temp.keychain || true @@ -334,7 +357,7 @@ jobs: - name: Install MacOS system requirements run: brew install create-dmg - - name: Create the Macos dmg and pkg (Bash) + - name: Create the Macos pkg (Bash) run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_pkg --app_name "$CURA_APP_NAME" working-directory: dist diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f335605b91..99327f9602 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -199,29 +199,38 @@ jobs: for package in pkg_resources.working_set: f.writelines(f"`{package.key}/{package.version}`\n") - - name: Archive the artifacts (Powershell) - run: Compress-Archive -Path ".\dist" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" + run: Compress-Archive -Force -CompressionLevel NoCompression -Path @('.\dist', '.\cura_inst\packaging') -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" + shell: powershell - - name: upload the zipped dist folder + - name: upload the zipped dist and packaging folder uses: actions/upload-artifact@v3 with: - name: dist + name: dist-windows path: | ${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip - retention-days: 5 + retention-days: 1 + if-no-files-found: error cura-installer-create-exe: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + - name: Download the zipped dist uses: actions/download-artifact@v3 with: - name: dist + name: dist-windows - name: Extract the zipped dist - run: Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + run: Expand-Archive -Force -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath . shell: powershell - name: Create PFX certificate from BASE64_PFX_CONTENT secret @@ -258,13 +267,21 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: - - name: Download the dist + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + + - name: Download the zipped dist uses: actions/download-artifact@v3 with: - name: dist + name: dist-windows - name: Extract the zipped dist - run: Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + run: Expand-Archive -Force -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath . shell: powershell - name: Create PFX certificate from BASE64_PFX_CONTENT secret