From fc159a2f5d56cb7ef01fa488802bffc4371cf63d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 01:56:23 +0200 Subject: [PATCH 01/20] Also make sure that the packaging tools can be run Contributes to CURA-8415 --- .github/workflows/macos.yml | 22 ++++++++++++++++++---- .github/workflows/windows.yml | 30 +++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4c77692cff..1b8eab877f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -242,27 +242,39 @@ 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: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + - 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 @@ -309,7 +321,9 @@ jobs: 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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f335605b91..37f7975129 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -199,29 +199,40 @@ 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 -Path ".\dist" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" + Compress-Archive -Path ".\cura_inst\packaging\" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip" - - name: upload the zipped dist folder + - name: upload the zipped dist and packaging folder uses: actions/upload-artifact@v3 with: name: dist path: | ${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip + ${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip retention-days: 5 cura-installer-create-exe: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + - name: Download the zipped dist uses: actions/download-artifact@v3 with: name: dist - name: Extract the zipped dist - run: Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + run: | + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-packaging.zip" -DestinationPath "." shell: powershell - name: Create PFX certificate from BASE64_PFX_CONTENT secret @@ -258,13 +269,22 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + - name: Download the dist uses: actions/download-artifact@v3 with: name: dist - name: Extract the zipped dist - run: Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + run: | + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.zip" -DestinationPath "." + Expand-Archive -Path ".\${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-packaging.zip" -DestinationPath "." shell: powershell - name: Create PFX certificate from BASE64_PFX_CONTENT secret From 05ded4885e8dcbe26635d747b1861919273dbcea Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 02:00:53 +0200 Subject: [PATCH 02/20] inherit secrets Contributes to CURA-8415 --- .github/workflows/installers.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 From cf97b97d9e6bdbd62f64f312b3383957f6f4cd29 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 02:13:25 +0200 Subject: [PATCH 03/20] don't cache pip Contributes to CURA-8415 --- .github/workflows/macos.yml | 9 ++++++--- .github/workflows/windows.yml | 8 ++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1b8eab877f..418e99c470 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -259,12 +259,10 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: - - name: Setup Python and pip + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10.x' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - name: Download the dist uses: actions/download-artifact@v3 @@ -315,6 +313,11 @@ jobs: needs: [ cura-installer-create ] runs-on: macos-11 steps: + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.x' + - name: Download the dist uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 37f7975129..8c5cad9d68 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -217,12 +217,10 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: - - name: Setup Python and pip + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10.x' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - name: Download the zipped dist uses: actions/download-artifact@v3 @@ -269,12 +267,10 @@ jobs: needs: [ cura-installer-create ] runs-on: ${{ inputs.operating_system }} steps: - - name: Setup Python and pip + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10.x' - cache: 'pip' - cache-dependency-path: .github/workflows/requirements-conan-package.txt - name: Download the dist uses: actions/download-artifact@v3 From deffdeb6427c1d4153851286ffe1f690554af6b0 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 02:42:17 +0200 Subject: [PATCH 04/20] checkout repo Contributes to CURA-8415 --- .github/workflows/macos.yml | 9 ++++++--- .github/workflows/windows.yml | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 418e99c470..024c64ad75 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -259,6 +259,9 @@ 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: @@ -313,6 +316,9 @@ 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: @@ -348,9 +354,6 @@ jobs: p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }} p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} - - name: Install MacOS system requirements - run: brew install create-dmg - - name: Create the Macos dmg and 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 8c5cad9d68..ef26baa8ad 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -217,6 +217,9 @@ jobs: 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: @@ -267,6 +270,9 @@ jobs: 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: From 365166e493c785949849628db9d19513631cfb5d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:01:53 +0200 Subject: [PATCH 05/20] few minor fixes Contributes to CURA-8415 --- .github/workflows/linux.yml | 1 - .github/workflows/macos.yml | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 024c64ad75..e5e8ead2cd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -300,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 @@ -354,7 +354,10 @@ jobs: p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }} p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} - - name: Create the Macos dmg and pkg (Bash) + - name: Install MacOS system requirements + run: brew install create-dmg + + - 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 From ddc4ec473e7604a155789c5fbb83203fe2f0d81f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:05:54 +0200 Subject: [PATCH 06/20] no trailing / Contributes to CURA-8415 --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ef26baa8ad..568a3c30de 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -202,7 +202,7 @@ jobs: - name: Archive the artifacts (Powershell) run: | Compress-Archive -Path ".\dist" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip" - Compress-Archive -Path ".\cura_inst\packaging\" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip" + Compress-Archive -Path ".\cura_inst\packaging" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}-packaging.zip" - name: upload the zipped dist and packaging folder uses: actions/upload-artifact@v3 From 28afca187c1feec77f3a8bb555b9039725435ae0 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:22:19 +0200 Subject: [PATCH 07/20] Nightlies Contributes to CURA-9494 --- .github/workflows/installers.yml | 103 ++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index ead3b7a87a..a0e11f63eb 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -24,6 +24,16 @@ on: default: false required: true type: boolean + nightly: + description: 'Upload to nightly release' + default: false + required: true + type: boolean + +env: + CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} + ENTERPRISE: ${{ inputs.enterprise }} + STAGING: ${{ inputs.staging }} jobs: windows-installer: @@ -79,4 +89,95 @@ jobs: staging: ${{ inputs.staging }} architecture: ARM64 operating_system: self-hosted - secrets: inherit \ No newline at end of file + secrets: inherit + + update-nightly-release: + runs-on: ubuntu-latest + needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] + steps: + + - name: Output the name file name and extension + id: filename + shell: python + run: | + import os + enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" + linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64-AppImage" + linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64-AppImage" + mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-dmg" + mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-pkg" + mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-dmg" + mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-pkg" + win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-msi + win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-exe" + output_env = os.environ["GITHUB_OUTPUT"] + content = "" + if os.path.exists(output_env): + with open(output_env, "r") as f: + content = f.read() + with open(output_env, "w") as f: + f.write(content) + f.writelines(f"LINUX_MODERN={linux_modern}\n") + f.writelines(f"LINUX_LEGACY={linux_legacy}\n") + f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") + f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") + f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") + f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") + f.writelines(f"WIN_MSI={win_msi}\n") + f.writelines(f"WIN_EXE={win_exe}\n") + + - name: Download linux modern installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.LINUX_MODERN }} + path: installers + + - name: Download linux legacy installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.LINUX_LEGACY }} + path: installers + + - name: Download mac x64 dmg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_X64_DMG }} + path: installers + + - name: Download mac x64 pkg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_X64_PKG }} + path: installers + + - name: Download mac arm dmg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_ARM_DMG }} + path: installers + + - name: Download mac arm pkg installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.MAC_ARM_PKG }} + path: installers + + - name: Download win msi installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.WIN_MSI }} + path: installers + + - name: Download win exe installer jobs artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ steps.filename.outputs.WIN_EXE }} + path: installers + + - name: Update nightly release + uses: pyTooling/Actions/releaser@main + with: + tag: nightly + rm: true + token: ${{ secrets.GITHUB_TOKEN }} + files: installers/*.* \ No newline at end of file From 76787b9898936cb7617bd34887263f0afe66c63b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 03:31:48 +0200 Subject: [PATCH 08/20] Update installers.yml for nightly release option Added a conditional statement for optionally triggering nightly releases in the installer workflow. This change allows us to initiate automatic nightly builds only when required, contributing to efficiency and resource utilization optimization. This is linked to Jira task CURA-9494. --- .github/workflows/installers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index a0e11f63eb..1a3a96bae0 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -92,6 +92,7 @@ jobs: secrets: inherit update-nightly-release: + if: ${{ inputs.nightly }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: From 43036953162739d77ec4a274cd45b59b16cffcec Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 14:08:00 +0200 Subject: [PATCH 09/20] Add automatic scheduled updates for nightly release A daily schedule for the update-nightly-release workflow was added. Now, apart from when the 'nightly' input is set to true, the release update will be triggered everyday at 5:20 CET. This functionality allows more up to date releases without manual input. Also, installer file names were updated and it now includes the daily creation timestamp which provides visibility on when the nightly build was generated. Contributes to CURA-9494 --- .github/workflows/installers.yml | 89 +++++++++++++++++++++++--------- .github/workflows/linux.yml | 15 ++++++ .github/workflows/macos.yml | 15 ++++++ .github/workflows/windows.yml | 15 ++++++ 4 files changed, 111 insertions(+), 23 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 1a3a96bae0..451387eddd 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -29,6 +29,9 @@ on: default: false required: true type: boolean + schedule: + # Daily at 5:20 CET + - cron: '20 4 * * *' env: CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }} @@ -91,26 +94,41 @@ jobs: operating_system: self-hosted secrets: inherit + # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: - if: ${{ inputs.nightly }} + if: ${{ inputs.nightly == 'true' || github.event_name == 'schedule' }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download the run info + uses: actions/download-artifact@v2 + with: + name: macos-run-info + + - name: Set the run info as environment variables + run: | + . run_info.sh - name: Output the name file name and extension id: filename shell: python run: | import os + import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64-AppImage" - linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64-AppImage" - mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-dmg" - mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-pkg" - mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-dmg" - mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-pkg" - win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-msi - win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-exe" + linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" + linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" + mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] + nightly_creation_time = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) output_env = os.environ["GITHUB_OUTPUT"] content = "" if os.path.exists(output_env): @@ -126,59 +144,84 @@ jobs: f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") f.writelines(f"WIN_MSI={win_msi}\n") f.writelines(f"WIN_EXE={win_exe}\n") + f.writelines(f"NIGHTLY_NAME={nightly_name}\n") + f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.LINUX_MODERN }} + name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.LINUX_LEGACY }} + name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_X64_DMG }} + name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_X64_PKG }} + name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_ARM_DMG }} + name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.MAC_ARM_PKG }} + name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.WIN_MSI }} + name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts uses: actions/download-artifact@v2 with: - name: ${{ steps.filename.outputs.WIN_EXE }} + name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers + - name: Rename installers to nightlies + run: | + mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage + mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage + mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg + mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg + mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg + mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg + mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi + mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe + - name: Update nightly release - uses: pyTooling/Actions/releaser@main - with: - tag: nightly - rm: true - token: ${{ secrets.GITHUB_TOKEN }} - files: installers/*.* \ No newline at end of file + run: | + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber + gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release description (with date) + run: | + gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}-alpha" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d58dcee34..7f68aed0b4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -252,6 +252,21 @@ jobs: dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage retention-days: 5 + - name: Write the run info + shell: python + run: | + import os + with open("run_info.sh", "w") as f: + f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + + - name: Upload the run info + uses: actions/upload-artifact@v3 + with: + name: linux-run-info + path: | + run_info.sh + retention-days: 5 + notify-export: if: ${{ always() }} needs: [ cura-installer-create ] diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4690d27878..6ba952d6bd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -259,6 +259,21 @@ jobs: dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg retention-days: 5 + - name: Write the run info + shell: python + run: | + import os + with open("run_info.sh", "w") as f: + f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + + - name: Upload the run info + uses: actions/upload-artifact@v3 + with: + name: macos-run-info + path: | + run_info.sh + retention-days: 5 + notify-export: if: ${{ always() }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 88d9d84e94..9844d7724c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -251,6 +251,21 @@ jobs: dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.exe retention-days: 5 + - name: Write the run info + shell: python + run: | + import os + with open("run_info.sh", "w") as f: + f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + + - name: Upload the run info + uses: actions/upload-artifact@v3 + with: + name: windows-run-info + path: | + run_info.sh + retention-days: 5 + notify-export: if: ${{ always() }} needs: [ cura-installer-create ] From d90da61f44199fe688dbc30bd5f216182d5f2dc3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 18:20:25 +0200 Subject: [PATCH 10/20] Fixed nighlty title alpha Contributes to CURA-9494 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 451387eddd..169d6af22a 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -221,7 +221,7 @@ jobs: - name: Update nightly release description (with date) run: | - gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}-alpha" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" + gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ac60b59da592eaea08af8d969a06f59c80002ca1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 18:53:25 +0200 Subject: [PATCH 11/20] Fixed nightlies run check Contributes to CURA-9494 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 169d6af22a..96b67a0541 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -96,7 +96,7 @@ jobs: # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: - if: ${{ inputs.nightly == 'true' || github.event_name == 'schedule' }} + if: ${{ inputs.nightly || github.event_name == 'schedule' }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: From 7efe485f65f31dc5e58a2c10cd298a7f4d9b0dc2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 19:24:38 +0200 Subject: [PATCH 12/20] Show version in Title bar except for actual releases Contributes to CURA-9494 --- cura/CuraApplication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 64d88d13dc..e81584660a 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -50,6 +50,7 @@ from UM.Settings.Validator import Validator from UM.View.SelectionPass import SelectionPass # For typing. from UM.Workspace.WorkspaceReader import WorkspaceReader from UM.i18n import i18nCatalog +from UM.Version import Version from cura import ApplicationMetadata from cura.API import CuraAPI from cura.API.Account import Account @@ -614,6 +615,9 @@ class CuraApplication(QtApplication): def _onEngineCreated(self): self._qml_engine.addImageProvider("print_job_preview", PrintJobPreviewImageProvider.PrintJobPreviewImageProvider()) + version = Version(self.getVersion()) + if version.hasPostFix(): + self._qml_engine.rootObjects()[0].setTitle(f"{ApplicationMetadata.CuraAppDisplayName} {ApplicationMetadata.CuraVersion}") @pyqtProperty(bool) def needToShowUserAgreement(self) -> bool: From 6424c26f782a9ec3dcccfd24dc8b81e543c28aed Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 20 Aug 2023 19:41:58 +0200 Subject: [PATCH 13/20] Show warning message when using nightly build Only shown in builds, for alpha versions Contributes to CURA-9494 --- cura/CuraApplication.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e81584660a..44ea69bd74 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -616,8 +616,15 @@ class CuraApplication(QtApplication): def _onEngineCreated(self): self._qml_engine.addImageProvider("print_job_preview", PrintJobPreviewImageProvider.PrintJobPreviewImageProvider()) version = Version(self.getVersion()) - if version.hasPostFix(): + if hasattr(sys, "frozen") and version.hasPostFix() and "beta" not in version.getPostfixType(): self._qml_engine.rootObjects()[0].setTitle(f"{ApplicationMetadata.CuraAppDisplayName} {ApplicationMetadata.CuraVersion}") + message = Message( + self._i18n_catalog.i18nc("@info:warning", + f"This version is not intended for production use. If you encounter any issues, please report them on our GitHub page, mentioning the full version {self.getVersion()}"), + lifetime = 0, + title = self._i18n_catalog.i18nc("@info:title", "Nightly build"), + message_type = Message.MessageType.WARNING) + message.show() @pyqtProperty(bool) def needToShowUserAgreement(self) -> bool: From 5765f398a3b9f7ad652f865b10065ca72f237bf7 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 13:03:56 +0200 Subject: [PATCH 14/20] Add clarifying comments: Why .sh 'on' Windows? part of CURA-9494 --- .github/workflows/windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5535f5f44f..f6de818eb4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -256,6 +256,7 @@ jobs: dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.exe retention-days: 5 + # NOTE: The extension is .sh, since this isn't going to build-environment, so not on the Win build image. - name: Write the run info shell: python run: | @@ -263,6 +264,7 @@ jobs: with open("run_info.sh", "w") as f: f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n') + # NOTE: The extension is .sh, since this isn't going to build-environment, so not on the Win build image. - name: Upload the run info uses: actions/upload-artifact@v3 with: From 13af77b4f6a97862fc528c2c04ccae7d9ce67f9c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 20:34:54 +0200 Subject: [PATCH 15/20] Nightlies workflow: Enable skipping OS's part of CURA-9494 --- .github/workflows/installers.yml | 208 +++++++++++++++++++++---------- 1 file changed, 144 insertions(+), 64 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 96b67a0541..6a139b0b45 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -29,6 +29,11 @@ on: default: false required: true type: boolean + os_list: + description: 'List of OS(-variant)s to build for' + default: "windows, linux-modern, linux-legacy, macos-x64, macos-arm64" + required: true + type: string schedule: # Daily at 5:20 CET - cron: '20 4 * * *' @@ -40,59 +45,74 @@ env: jobs: windows-installer: - uses: ./.github/workflows/windows.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: windows-2022 - secrets: inherit + steps: + - name: Build Windows installer + if: ${{ contains(inputs.os_list, "windows") }} + uses: ./.github/workflows/windows.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: windows-2022 + secrets: inherit linux-modern-installer: - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-22.04 - secrets: inherit + steps: + - name: Build (modern) Linux installer + if: ${{ contains(inputs.os_list, "linux-modern") }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-22.04 + secrets: inherit linux-legacy-installer: - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-20.04 - secrets: inherit + steps: + - name: Build (legacy) Linux installer + if: ${{ contains(inputs.os_list, "linux-legacy") }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-20.04 + secrets: inherit macos-installer: - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: macos-11.0 - secrets: inherit + steps: + - name: Build MacOS installer for Intel chips + if: ${{ contains(inputs.os_list, "macos-x64") }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: macos-11.0 + secrets: inherit macos-arm-installer: - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: ARM64 - operating_system: self-hosted - secrets: inherit + steps: + - name: Build MacOS installer for ARM chips + if: ${{ contains(inputs.os_list, "macos-arm64") }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: ARM64 + operating_system: self-hosted + secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: @@ -119,14 +139,20 @@ jobs: import os import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" - linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" - linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" - mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" - mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" - mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" - win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + os_list = [x.strip() for x in "${{ inputs.os_list }}".split(",")] + if "linux-modern" in os_list: + linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" + if "linux-legacy" in os_list: + linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" + if "macos-x64" in os_list: + mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" + if "macos-arm64" in os_list: + mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" + if "windows" in os_list: + win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" + win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] nightly_creation_time = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) output_env = os.environ["GITHUB_OUTPUT"] @@ -136,84 +162,139 @@ jobs: content = f.read() with open(output_env, "w") as f: f.write(content) - f.writelines(f"LINUX_MODERN={linux_modern}\n") - f.writelines(f"LINUX_LEGACY={linux_legacy}\n") - f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") - f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") - f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") - f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") - f.writelines(f"WIN_MSI={win_msi}\n") - f.writelines(f"WIN_EXE={win_exe}\n") + if "linux-modern" in os_list: + f.writelines(f"LINUX_MODERN={linux_modern}\n") + if "linux-legacy" in os_list: + f.writelines(f"LINUX_LEGACY={linux_legacy}\n") + if "macos-x64" in os_list: + f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") + f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") + if "macos-arm64" in os_list: + f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") + f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") + if "windows" in os_list: + f.writelines(f"WIN_MSI={win_msi}\n") + f.writelines(f"WIN_EXE={win_exe}\n") f.writelines(f"NIGHTLY_NAME={nightly_name}\n") f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts + if: ${{ contains(inputs.os_list, "linux-modern") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts + if: ${{ contains(inputs.os_list, "linux-legacy") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-x64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-x64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-arm64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts + if: ${{ contains(inputs.os_list, "macos-arm64") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts + if: ${{ contains(inputs.os_list, "windows") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts + if: ${{ contains(inputs.os_list, "windows") }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - - name: Rename installers to nightlies + - name: Rename Linux (modern) installer to nightlies + if: ${{ contains(inputs.os_list, "linux-modern") }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage + + - name: Rename Linux (legacy) installer to nightlies + if: ${{ contains(inputs.os_list, "linux-legacy") }} + run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage + + - name: Rename MacOS (X64) installers to nightlies + if: ${{ contains(inputs.os_list, "macos-x64") }} + run: | mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg + + - name: Rename MacOS (ARM-64) installers to nightlies + if: ${{ contains(inputs.os_list, "macos-arm64") }} + run: | mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg + + - name: Rename Windows installers to nightlies + if: ${{ contains(inputs.os_list, "windows") }} + run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - - name: Update nightly release + - name: Update nightly release for Linux (modern) + if: ${{ contains(inputs.os_list, "linux-modern") }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for Linux (legacy) + if: ${{ contains(inputs.os_list, "linux-legacy") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for MacOS (X64) + if: ${{ contains(inputs.os_list, "macos-x64") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for MacOS (ARM-64) + if: ${{ contains(inputs.os_list, "macos-arm64") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update nightly release for Windows + if: ${{ contains(inputs.os_list, "windows") }} + run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber env: @@ -224,4 +305,3 @@ jobs: gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From a35ce3d65221ef0788c8e6af8c7bae67e855ec0f Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 20:48:33 +0200 Subject: [PATCH 16/20] Use single quotes or 'if' doesn't work. part of CURA-9494 --- .github/workflows/installers.yml | 66 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 6a139b0b45..02b10e496b 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -47,7 +47,7 @@ jobs: windows-installer: steps: - name: Build Windows installer - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} uses: ./.github/workflows/windows.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -61,7 +61,7 @@ jobs: linux-modern-installer: steps: - name: Build (modern) Linux installer - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -75,7 +75,7 @@ jobs: linux-legacy-installer: steps: - name: Build (legacy) Linux installer - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} uses: ./.github/workflows/linux.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -89,7 +89,7 @@ jobs: macos-installer: steps: - name: Build MacOS installer for Intel chips - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} uses: ./.github/workflows/macos.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -103,7 +103,7 @@ jobs: macos-arm-installer: steps: - name: Build MacOS installer for ARM chips - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} uses: ./.github/workflows/macos.yml with: cura_conan_version: ${{ inputs.cura_conan_version }} @@ -140,17 +140,17 @@ jobs: import datetime enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else "" os_list = [x.strip() for x in "${{ inputs.os_list }}".split(",")] - if "linux-modern" in os_list: + if 'linux-modern' in os_list: linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64" - if "linux-legacy" in os_list: + if 'linux-legacy' in os_list: linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64" - if "macos-x64" in os_list: + if 'macos-x64' in os_list: mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64" - if "macos-arm64" in os_list: + if 'macos-arm64' in os_list: mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64" - if "windows" in os_list: + if 'windows' in os_list: win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64" nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0] @@ -162,122 +162,122 @@ jobs: content = f.read() with open(output_env, "w") as f: f.write(content) - if "linux-modern" in os_list: + if 'linux-modern' in os_list: f.writelines(f"LINUX_MODERN={linux_modern}\n") - if "linux-legacy" in os_list: + if 'linux-legacy' in os_list: f.writelines(f"LINUX_LEGACY={linux_legacy}\n") - if "macos-x64" in os_list: + if 'macos-x64' in os_list: f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n") f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n") - if "macos-arm64" in os_list: + if 'macos-arm64' in os_list: f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n") f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n") - if "windows" in os_list: + if 'windows' in os_list: f.writelines(f"WIN_MSI={win_msi}\n") f.writelines(f"WIN_EXE={win_exe}\n") f.writelines(f"NIGHTLY_NAME={nightly_name}\n") f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n") - name: Download linux modern installer jobs artifacts - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage path: installers - name: Download linux legacy installer jobs artifacts - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.LINUX_LEGACY }}-AppImage path: installers - name: Download mac x64 dmg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg path: installers - name: Download mac x64 pkg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg path: installers - name: Download mac arm dmg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg path: installers - name: Download mac arm pkg installer jobs artifacts - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg path: installers - name: Download win msi installer jobs artifacts - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_MSI }}-msi path: installers - name: Download win exe installer jobs artifacts - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} uses: actions/download-artifact@v2 with: name: ${{ steps.filename.outputs.WIN_EXE }}-exe path: installers - name: Rename Linux (modern) installer to nightlies - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} run: | mv installers/${{ steps.filename.outputs.LINUX_MODERN }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage - name: Rename Linux (legacy) installer to nightlies - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} run: | mv installers/${{ steps.filename.outputs.LINUX_LEGACY }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage - name: Rename MacOS (X64) installers to nightlies - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} run: | mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg - name: Rename MacOS (ARM-64) installers to nightlies - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} run: | mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg - name: Rename Windows installers to nightlies - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} run: | mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe - name: Update nightly release for Linux (modern) - if: ${{ contains(inputs.os_list, "linux-modern") }} + if: ${{ contains(inputs.os_list, 'linux-modern') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-modern-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Linux (legacy) - if: ${{ contains(inputs.os_list, "linux-legacy") }} + if: ${{ contains(inputs.os_list, 'linux-legacy') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (X64) - if: ${{ contains(inputs.os_list, "macos-x64") }} + if: ${{ contains(inputs.os_list, 'macos-x64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber @@ -285,7 +285,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for MacOS (ARM-64) - if: ${{ contains(inputs.os_list, "macos-arm64") }} + if: ${{ contains(inputs.os_list, 'macos-arm64') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber @@ -293,7 +293,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update nightly release for Windows - if: ${{ contains(inputs.os_list, "windows") }} + if: ${{ contains(inputs.os_list, 'windows') }} run: | gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber From 566fdfce1c75a75b360c92414ffe2d22468299f9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 20:51:56 +0200 Subject: [PATCH 17/20] Whitespace can be important. part of CURA-9494 --- .github/workflows/installers.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 02b10e496b..766c174ed1 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -56,7 +56,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: windows-2022 - secrets: inherit + secrets: inherit linux-modern-installer: steps: @@ -70,7 +70,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-22.04 - secrets: inherit + secrets: inherit linux-legacy-installer: steps: @@ -84,7 +84,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: ubuntu-20.04 - secrets: inherit + secrets: inherit macos-installer: steps: @@ -98,7 +98,7 @@ jobs: staging: ${{ inputs.staging }} architecture: X64 operating_system: macos-11.0 - secrets: inherit + secrets: inherit macos-arm-installer: steps: @@ -112,7 +112,7 @@ jobs: staging: ${{ inputs.staging }} architecture: ARM64 operating_system: self-hosted - secrets: inherit + secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: From e9fe6b9831324b65815817fa548772260398843e Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 21:10:46 +0200 Subject: [PATCH 18/20] Partial revert of unneeded code. It doesn't work out this way, and, due to the if-clause further on, it should work even if the 'need's aren't all met. part of CURA-9494 --- .github/workflows/installers.yml | 100 ++++++++++++++----------------- 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 766c174ed1..2fc4b76d41 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -45,73 +45,63 @@ env: jobs: windows-installer: - steps: - - name: Build Windows installer - if: ${{ contains(inputs.os_list, 'windows') }} - uses: ./.github/workflows/windows.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: windows-2022 + if: ${{ contains(inputs.os_list, 'windows') }} + uses: ./.github/workflows/windows.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: windows-2022 secrets: inherit linux-modern-installer: - steps: - - name: Build (modern) Linux installer - if: ${{ contains(inputs.os_list, 'linux-modern') }} - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-22.04 + if: ${{ contains(inputs.os_list, 'linux-modern') }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-22.04 secrets: inherit linux-legacy-installer: - steps: - - name: Build (legacy) Linux installer - if: ${{ contains(inputs.os_list, 'linux-legacy') }} - uses: ./.github/workflows/linux.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: ubuntu-20.04 + if: ${{ contains(inputs.os_list, 'linux-legacy') }} + uses: ./.github/workflows/linux.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: ubuntu-20.04 secrets: inherit macos-installer: - steps: - - name: Build MacOS installer for Intel chips - if: ${{ contains(inputs.os_list, 'macos-x64') }} - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: X64 - operating_system: macos-11.0 + if: ${{ contains(inputs.os_list, 'macos-x64') }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: X64 + operating_system: macos-11.0 secrets: inherit macos-arm-installer: - steps: - - name: Build MacOS installer for ARM chips - if: ${{ contains(inputs.os_list, 'macos-arm64') }} - uses: ./.github/workflows/macos.yml - with: - cura_conan_version: ${{ inputs.cura_conan_version }} - conan_args: ${{ inputs.conan_args }} - enterprise: ${{ inputs.enterprise }} - staging: ${{ inputs.staging }} - architecture: ARM64 - operating_system: self-hosted + if: ${{ contains(inputs.os_list, 'macos-arm64') }} + uses: ./.github/workflows/macos.yml + with: + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + architecture: ARM64 + operating_system: self-hosted secrets: inherit # Run and update nightly release when the nightly input is set to true or if the schedule is triggered From e1f2424f0ecc69c443d7ddebcc8f45f40dadcdaf Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 22:15:30 +0200 Subject: [PATCH 19/20] Should run nightly part even if some OS is skipped. part of CURA-9494 --- .github/workflows/installers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 2fc4b76d41..3b77fa7697 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -106,7 +106,7 @@ jobs: # Run and update nightly release when the nightly input is set to true or if the schedule is triggered update-nightly-release: - if: ${{ inputs.nightly || github.event_name == 'schedule' }} + if: ${{ always() && (! cancelled()) && contains(needs.*.result, 'success') && (! contains(needs.*.result, 'failure')) && (inputs.nightly || github.event_name == 'schedule') }} runs-on: ubuntu-latest needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ] steps: From 13962a563e514d26975fa6c4765a864b7ec82bca Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 7 Sep 2023 22:38:11 +0200 Subject: [PATCH 20/20] Make sure there is at least one run-info. part of CURA-9494 --- .github/workflows/installers.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 3b77fa7697..4ebea0660b 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -113,11 +113,26 @@ jobs: - name: Checkout uses: actions/checkout@v3 + # It's not necessary to download all three, but it does make sure we have at least one if an OS is skipped. + - name: Download the run info + if: ${{ contains(inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }} uses: actions/download-artifact@v2 with: name: macos-run-info + - name: Download the run info II + if: ${{ contains(inputs.os_list, 'linux-modern') || contains(inputs.os_list, 'linux-legacy') }} + uses: actions/download-artifact@v2 + with: + name: linux-run-info + + - name: Download the run info III + if: ${{ contains(inputs.os_list, 'windows') }} + uses: actions/download-artifact@v2 + with: + name: windows-run-info + - name: Set the run info as environment variables run: | . run_info.sh