mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Simplified All Installer workflow
No need to make exceptions in this workflow for different OSes it's called the **All** Installer for a reason. If people need a specific OS installer run the linux, macos or windows installer itself. Added a time-out to the macos workflow if the self-hosted isn't online. Moved the ARM64 jobs to the end and added an `always()` condition to the update of the release, such that the GH hosted runners will at least update. Add missing download for MacOS X64 Contributes to CURA-10475 and CURA-10591
This commit is contained in:
parent
8126b9a6f6
commit
69bdcfa52f
4 changed files with 782 additions and 825 deletions
174
.github/workflows/installers.yml
vendored
174
.github/workflows/installers.yml
vendored
|
@ -29,11 +29,7 @@ on:
|
|||
default: false
|
||||
required: true
|
||||
type: boolean
|
||||
os_list:
|
||||
description: 'List of OS(-variant)s to build for'
|
||||
default: "windows, linux`, macos-x64, macos-arm64"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
schedule:
|
||||
# Daily at 5:20 CET
|
||||
- cron: '20 4 * * *'
|
||||
|
@ -43,11 +39,9 @@ env:
|
|||
CONAN_ARGS: ${{ inputs.conan_args || '' }}
|
||||
ENTERPRISE: ${{ inputs.enterprise || false }}
|
||||
STAGING: ${{ inputs.staging || false }}
|
||||
OS_LIST: ${{ inputs.os_list || 'windows, linux, macos-x64, macos-arm64' }}
|
||||
|
||||
jobs:
|
||||
windows-installer:
|
||||
if: ${{ contains(github.event.inputs.os_list, 'windows') || github.event_name == 'schedule' }}
|
||||
uses: ./.github/workflows/windows.yml
|
||||
with:
|
||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||
|
@ -58,8 +52,7 @@ jobs:
|
|||
operating_system: windows-2022
|
||||
secrets: inherit
|
||||
|
||||
linux-modern-installer:
|
||||
if: ${{ contains(github.event.inputs.os_list, 'linux') || github.event_name == 'schedule' }}
|
||||
linux-installer:
|
||||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||
|
@ -71,7 +64,6 @@ jobs:
|
|||
secrets: inherit
|
||||
|
||||
macos-installer:
|
||||
if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || github.event_name == 'schedule' }}
|
||||
uses: ./.github/workflows/macos.yml
|
||||
with:
|
||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||
|
@ -83,7 +75,6 @@ jobs:
|
|||
secrets: inherit
|
||||
|
||||
macos-arm-installer:
|
||||
if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') || github.event_name == 'schedule' }}
|
||||
uses: ./.github/workflows/macos.yml
|
||||
with:
|
||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||
|
@ -106,23 +97,10 @@ jobs:
|
|||
# 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(github.event.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(github.event.inputs.os_list, 'linux') }}
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: linux-run-info
|
||||
|
||||
- name: Download the run info III
|
||||
if: ${{ contains(github.event.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
|
||||
|
@ -133,18 +111,12 @@ jobs:
|
|||
run: |
|
||||
import os
|
||||
import datetime
|
||||
enterprise = "-Enterprise" if "${{ env.ENTERPRISE }}" == "true" else ""
|
||||
os_list = [x.strip() for x in "${{ env.OS_LIST }}".split(",")]
|
||||
scheduled = "${{ github.event_name == 'schedule' }}" == "true"
|
||||
if 'linux-modern' in os_list or scheduled:
|
||||
linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64"
|
||||
if 'macos-x64' in os_list:
|
||||
enterprise = "-Enterprise" if "${{ github.event.inputs.enterprise }}" == "true" else ""
|
||||
linux = 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"
|
||||
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 or scheduled:
|
||||
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]
|
||||
|
@ -156,124 +128,106 @@ jobs:
|
|||
content = f.read()
|
||||
with open(output_env, "w") as f:
|
||||
f.write(content)
|
||||
if 'linux-modern' in os_list or scheduled:
|
||||
f.writelines(f"LINUX_MODERN={linux_modern}\n")
|
||||
if 'macos-x64' in os_list:
|
||||
f.writelines(f"LINUX={linux}\n")
|
||||
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 or scheduled:
|
||||
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(github.event.inputs.os_list, 'linux-modern') }}
|
||||
- name: Download linux installer jobs artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage
|
||||
name: ${{ steps.filename.outputs.LINUX }}-AppImage
|
||||
path: installers
|
||||
|
||||
- name: Download mac x64 dmg installer jobs artifacts
|
||||
if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }}
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg
|
||||
path: installers
|
||||
- name: Rename Linux installer to nightlies
|
||||
run: |
|
||||
mv installers/${{ steps.filename.outputs.LINUX }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage
|
||||
|
||||
- name: Download mac x64 pkg installer jobs artifacts
|
||||
if: ${{ contains(github.event.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(github.event.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(github.event.inputs.os_list, 'macos-arm64') }}
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg
|
||||
path: installers
|
||||
- name: Update nightly release for Linux
|
||||
run: |
|
||||
gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Download win msi installer jobs artifacts
|
||||
if: ${{ contains(github.event.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(github.event.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(github.event.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 MacOS (X64) installers to nightlies
|
||||
if: ${{ contains(github.event.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(github.event.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(github.event.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(github.event.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 MacOS (X64)
|
||||
if: ${{ contains(github.event.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(github.event.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(github.event.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:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Download MacOS (X64) dmg installer jobs artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg
|
||||
path: installers
|
||||
|
||||
- name: Download MacOS (X64) pkg installer jobs artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg
|
||||
path: installers
|
||||
|
||||
- name: Rename MacOS (X64) installers to nightlies
|
||||
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: Update nightly release for 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: Download MacOS (ARM-64) dmg installer jobs artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg
|
||||
path: installers
|
||||
|
||||
- name: Download acOS (ARM-64) pkg installer jobs artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg
|
||||
path: installers
|
||||
|
||||
- name: Rename MacOS (ARM-64) installers to nightlies
|
||||
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: Update nightly release for MacOS (ARM-64)
|
||||
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 description (with date)
|
||||
if: always()
|
||||
run: |
|
||||
gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}"
|
||||
env:
|
||||
|
|
3
.github/workflows/linux.yml
vendored
3
.github/workflows/linux.yml
vendored
|
@ -38,7 +38,7 @@ on:
|
|||
type: choice
|
||||
options:
|
||||
- ubuntu-22.04
|
||||
- ubuntu-20.04
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
cura_conan_version:
|
||||
|
@ -82,6 +82,7 @@ env:
|
|||
|
||||
jobs:
|
||||
cura-installer-create:
|
||||
timeout-minutes: 30
|
||||
runs-on: ${{ inputs.operating_system }}
|
||||
|
||||
steps:
|
||||
|
|
1
.github/workflows/macos.yml
vendored
1
.github/workflows/macos.yml
vendored
|
@ -90,6 +90,7 @@ env:
|
|||
|
||||
jobs:
|
||||
cura-installer-create:
|
||||
timeout-minutes: 30
|
||||
runs-on: ${{ inputs.operating_system }}
|
||||
|
||||
outputs:
|
||||
|
|
1
.github/workflows/windows.yml
vendored
1
.github/workflows/windows.yml
vendored
|
@ -82,6 +82,7 @@ env:
|
|||
|
||||
jobs:
|
||||
cura-installer-create:
|
||||
timeout-minutes: 30
|
||||
runs-on: ${{ inputs.operating_system }}
|
||||
|
||||
outputs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue