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
462
.github/workflows/installers.yml
vendored
462
.github/workflows/installers.yml
vendored
|
@ -2,279 +2,233 @@ name: All installers
|
||||||
run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }}
|
run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
nightly:
|
nightly:
|
||||||
description: 'Upload to nightly release'
|
description: 'Upload to nightly release'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
os_list:
|
|
||||||
description: 'List of OS(-variant)s to build for'
|
schedule:
|
||||||
default: "windows, linux`, macos-x64, macos-arm64"
|
# Daily at 5:20 CET
|
||||||
required: true
|
- cron: '20 4 * * *'
|
||||||
type: string
|
|
||||||
schedule:
|
|
||||||
# Daily at 5:20 CET
|
|
||||||
- cron: '20 4 * * *'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version || 'cura/latest@ultimaker/testing' }}
|
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version || 'cura/latest@ultimaker/testing' }}
|
||||||
CONAN_ARGS: ${{ inputs.conan_args || '' }}
|
CONAN_ARGS: ${{ inputs.conan_args || '' }}
|
||||||
ENTERPRISE: ${{ inputs.enterprise || false }}
|
ENTERPRISE: ${{ inputs.enterprise || false }}
|
||||||
STAGING: ${{ inputs.staging || false }}
|
STAGING: ${{ inputs.staging || false }}
|
||||||
OS_LIST: ${{ inputs.os_list || 'windows, linux, macos-x64, macos-arm64' }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows-installer:
|
windows-installer:
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'windows') || github.event_name == 'schedule' }}
|
uses: ./.github/workflows/windows.yml
|
||||||
uses: ./.github/workflows/windows.yml
|
with:
|
||||||
|
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||||
|
conan_args: ${{ github.event.inputs.conan_args }}
|
||||||
|
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
||||||
|
staging: ${{ github.event.inputs.staging == 'true' }}
|
||||||
|
architecture: X64
|
||||||
|
operating_system: windows-2022
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
linux-installer:
|
||||||
|
uses: ./.github/workflows/linux.yml
|
||||||
|
with:
|
||||||
|
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||||
|
conan_args: ${{ github.event.inputs.conan_args }}
|
||||||
|
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
||||||
|
staging: ${{ github.event.inputs.staging == 'true' }}
|
||||||
|
architecture: X64
|
||||||
|
operating_system: ubuntu-22.04
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
macos-installer:
|
||||||
|
uses: ./.github/workflows/macos.yml
|
||||||
|
with:
|
||||||
|
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||||
|
conan_args: ${{ github.event.inputs.conan_args }}
|
||||||
|
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
||||||
|
staging: ${{ github.event.inputs.staging == 'true' }}
|
||||||
|
architecture: X64
|
||||||
|
operating_system: macos-11.0
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
macos-arm-installer:
|
||||||
|
uses: ./.github/workflows/macos.yml
|
||||||
|
with:
|
||||||
|
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
||||||
|
conan_args: ${{ github.event.inputs.conan_args }}
|
||||||
|
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
||||||
|
staging: ${{ github.event.inputs.staging == 'true' }}
|
||||||
|
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:
|
||||||
|
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-installer, macos-installer, macos-arm-installer ]
|
||||||
|
steps:
|
||||||
|
- 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
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
name: linux-run-info
|
||||||
conan_args: ${{ github.event.inputs.conan_args }}
|
|
||||||
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
|
||||||
staging: ${{ github.event.inputs.staging == 'true' }}
|
|
||||||
architecture: X64
|
|
||||||
operating_system: windows-2022
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
linux-modern-installer:
|
- name: Set the run info as environment variables
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'linux') || github.event_name == 'schedule' }}
|
run: |
|
||||||
uses: ./.github/workflows/linux.yml
|
. run_info.sh
|
||||||
|
|
||||||
|
- name: Output the name file name and extension
|
||||||
|
id: filename
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import datetime
|
||||||
|
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"
|
||||||
|
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):
|
||||||
|
with open(output_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
with open(output_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
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")
|
||||||
|
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")
|
||||||
|
f.writelines(f"NIGHTLY_NAME={nightly_name}\n")
|
||||||
|
f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n")
|
||||||
|
|
||||||
|
- name: Download linux installer jobs artifacts
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
name: ${{ steps.filename.outputs.LINUX }}-AppImage
|
||||||
conan_args: ${{ github.event.inputs.conan_args }}
|
path: installers
|
||||||
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
|
||||||
staging: ${{ github.event.inputs.staging == 'true' }}
|
|
||||||
architecture: X64
|
|
||||||
operating_system: ubuntu-22.04
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
macos-installer:
|
- name: Rename Linux installer to nightlies
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || github.event_name == 'schedule' }}
|
run: |
|
||||||
uses: ./.github/workflows/macos.yml
|
mv installers/${{ steps.filename.outputs.LINUX }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage
|
||||||
|
|
||||||
|
- 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
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
name: ${{ steps.filename.outputs.WIN_MSI }}-msi
|
||||||
conan_args: ${{ github.event.inputs.conan_args }}
|
path: installers
|
||||||
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
|
||||||
staging: ${{ github.event.inputs.staging == 'true' }}
|
|
||||||
architecture: X64
|
|
||||||
operating_system: macos-11.0
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
macos-arm-installer:
|
- name: Download win exe installer jobs artifacts
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') || github.event_name == 'schedule' }}
|
uses: actions/download-artifact@v2
|
||||||
uses: ./.github/workflows/macos.yml
|
|
||||||
with:
|
with:
|
||||||
cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
|
name: ${{ steps.filename.outputs.WIN_EXE }}-exe
|
||||||
conan_args: ${{ github.event.inputs.conan_args }}
|
path: installers
|
||||||
enterprise: ${{ github.event.inputs.enterprise == 'true' }}
|
|
||||||
staging: ${{ github.event.inputs.staging == 'true' }}
|
|
||||||
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
|
- name: Rename Windows installers to nightlies
|
||||||
update-nightly-release:
|
run: |
|
||||||
if: ${{ always() && (! cancelled()) && contains(needs.*.result, 'success') && (! contains(needs.*.result, 'failure')) && (inputs.nightly || github.event_name == 'schedule') }}
|
mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi
|
||||||
runs-on: ubuntu-latest
|
mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe
|
||||||
needs: [ windows-installer, linux-installer, macos-installer, macos-arm-installer ]
|
|
||||||
steps:
|
|
||||||
- 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: Update nightly release for 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 the run info
|
- name: Download MacOS (X64) dmg installer jobs artifacts
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'macos-x64') || contains(inputs.os_list, 'macos-arm64') }}
|
uses: actions/download-artifact@v2
|
||||||
uses: actions/download-artifact@v2
|
with:
|
||||||
with:
|
name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg
|
||||||
name: macos-run-info
|
path: installers
|
||||||
|
|
||||||
- name: Download the run info II
|
- name: Download MacOS (X64) pkg installer jobs artifacts
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'linux') }}
|
uses: actions/download-artifact@v2
|
||||||
uses: actions/download-artifact@v2
|
with:
|
||||||
with:
|
name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg
|
||||||
name: linux-run-info
|
path: installers
|
||||||
|
|
||||||
- name: Download the run info III
|
- name: Rename MacOS (X64) installers to nightlies
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'windows') }}
|
run: |
|
||||||
uses: actions/download-artifact@v2
|
mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg
|
||||||
with:
|
mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg
|
||||||
name: windows-run-info
|
|
||||||
|
|
||||||
- name: Set the run info as environment variables
|
- name: Update nightly release for MacOS (X64)
|
||||||
run: |
|
run: |
|
||||||
. run_info.sh
|
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: Output the name file name and extension
|
- name: Download MacOS (ARM-64) dmg installer jobs artifacts
|
||||||
id: filename
|
uses: actions/download-artifact@v2
|
||||||
shell: python
|
with:
|
||||||
run: |
|
name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg
|
||||||
import os
|
path: installers
|
||||||
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:
|
|
||||||
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]
|
|
||||||
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):
|
|
||||||
with open(output_env, "r") as f:
|
|
||||||
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"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
|
- name: Download acOS (ARM-64) pkg installer jobs artifacts
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'linux-modern') }}
|
uses: actions/download-artifact@v2
|
||||||
uses: actions/download-artifact@v2
|
with:
|
||||||
with:
|
name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg
|
||||||
name: ${{ steps.filename.outputs.LINUX_MODERN }}-AppImage
|
path: installers
|
||||||
path: installers
|
|
||||||
|
|
||||||
- name: Download mac x64 dmg installer jobs artifacts
|
- name: Rename MacOS (ARM-64) installers to nightlies
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }}
|
run: |
|
||||||
uses: actions/download-artifact@v2
|
mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg
|
||||||
with:
|
mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg
|
||||||
name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg
|
|
||||||
path: installers
|
|
||||||
|
|
||||||
- name: Download mac x64 pkg installer jobs artifacts
|
- name: Update nightly release for MacOS (ARM-64)
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'macos-x64') }}
|
run: |
|
||||||
uses: actions/download-artifact@v2
|
gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber
|
||||||
with:
|
gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber
|
||||||
name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg
|
env:
|
||||||
path: installers
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Download mac arm dmg installer jobs artifacts
|
- name: Update nightly release description (with date)
|
||||||
if: ${{ contains(github.event.inputs.os_list, 'macos-arm64') }}
|
if: always()
|
||||||
uses: actions/download-artifact@v2
|
run: |
|
||||||
with:
|
gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}"
|
||||||
name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg
|
env:
|
||||||
path: installers
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- 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: 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: Update nightly release description (with date)
|
|
||||||
run: |
|
|
||||||
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 }}
|
|
||||||
|
|
29
.github/workflows/linux.yml
vendored
29
.github/workflows/linux.yml
vendored
|
@ -38,7 +38,7 @@ on:
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
- ubuntu-20.04
|
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
|
@ -82,6 +82,7 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cura-installer-create:
|
cura-installer-create:
|
||||||
|
timeout-minutes: 30
|
||||||
runs-on: ${{ inputs.operating_system }}
|
runs-on: ${{ inputs.operating_system }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -257,19 +258,19 @@ jobs:
|
||||||
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage
|
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Write the run info
|
- name: Write the run info
|
||||||
shell: python
|
shell: python
|
||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
with open("run_info.sh", "w") as f:
|
with open("run_info.sh", "w") as f:
|
||||||
f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n')
|
f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n')
|
||||||
- name: Upload the run info
|
- name: Upload the run info
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: linux-run-info
|
name: linux-run-info
|
||||||
path: |
|
path: |
|
||||||
run_info.sh
|
run_info.sh
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
notify-export:
|
notify-export:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|
565
.github/workflows/macos.yml
vendored
565
.github/workflows/macos.yml
vendored
|
@ -2,293 +2,294 @@ name: Macos Installer
|
||||||
run-name: ${{ inputs.cura_conan_version }} for Macos-${{ inputs.architecture }} by @${{ github.actor }}
|
run-name: ${{ inputs.cura_conan_version }} for Macos-${{ inputs.architecture }} by @${{ github.actor }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Architecture'
|
description: 'Architecture'
|
||||||
required: true
|
required: true
|
||||||
default: 'X64'
|
default: 'X64'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- X64
|
- X64
|
||||||
- ARM64
|
- ARM64
|
||||||
operating_system:
|
operating_system:
|
||||||
description: 'OS'
|
description: 'OS'
|
||||||
required: true
|
required: true
|
||||||
default: 'macos-11'
|
default: 'macos-11'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- self-hosted
|
- self-hosted
|
||||||
- macos-11
|
- macos-11
|
||||||
- macos-12
|
- macos-12
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Architecture'
|
description: 'Architecture'
|
||||||
required: true
|
required: true
|
||||||
default: 'X64'
|
default: 'X64'
|
||||||
type: string
|
type: string
|
||||||
operating_system:
|
operating_system:
|
||||||
description: 'OS'
|
description: 'OS'
|
||||||
required: true
|
required: true
|
||||||
default: 'macos-11'
|
default: 'macos-11'
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
||||||
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }}
|
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }}
|
||||||
MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }}
|
MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }}
|
||||||
MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }}
|
MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }}
|
||||||
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
|
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
|
||||||
MACOS_CERT_INSTALLER_P12: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
|
MACOS_CERT_INSTALLER_P12: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
|
||||||
MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }}
|
MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }}
|
||||||
MACOS_CERT_PASSPHRASE: ${{ secrets.MACOS_CERT_PASSPHRASE }}
|
MACOS_CERT_PASSPHRASE: ${{ secrets.MACOS_CERT_PASSPHRASE }}
|
||||||
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
||||||
ENTERPRISE: ${{ inputs.enterprise }}
|
ENTERPRISE: ${{ inputs.enterprise }}
|
||||||
STAGING: ${{ inputs.staging }}
|
STAGING: ${{ inputs.staging }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cura-installer-create:
|
cura-installer-create:
|
||||||
runs-on: ${{ inputs.operating_system }}
|
timeout-minutes: 30
|
||||||
|
runs-on: ${{ inputs.operating_system }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
|
INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Setup Python and pip
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
|
||||||
python-version: '3.10.x'
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Install Python requirements for runner
|
|
||||||
run: pip install -r .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Cache Conan local repository packages (Bash)
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
$HOME/.conan/data
|
|
||||||
$HOME/.conan/conan_download_cache
|
|
||||||
key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
|
|
||||||
|
|
||||||
- name: Install MacOS system requirements
|
|
||||||
run: brew install cmake autoconf automake ninja create-dmg
|
|
||||||
|
|
||||||
- name: Create the default Conan profile
|
|
||||||
run: conan profile new default --detect --force
|
|
||||||
|
|
||||||
- name: Remove Macos keychain (Bash)
|
|
||||||
run: security delete-keychain signing_temp.keychain || true
|
|
||||||
|
|
||||||
- name: Configure Macos keychain Developer Cert(Bash)
|
|
||||||
id: macos-keychain-developer-cert
|
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
|
||||||
with:
|
|
||||||
keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
|
||||||
p12-file-base64: ${{ secrets.MACOS_CERT_P12 }}
|
|
||||||
p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
|
|
||||||
|
|
||||||
- name: Configure Macos keychain Installer Cert (Bash)
|
|
||||||
id: macos-keychain-installer-cert
|
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
|
||||||
with:
|
|
||||||
keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
|
||||||
create-keychain: false # keychain is created in previous use of action.
|
|
||||||
p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
|
|
||||||
p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
|
|
||||||
|
|
||||||
- name: Get Conan configuration
|
|
||||||
run: |
|
|
||||||
conan config install https://github.com/Ultimaker/conan-config.git
|
|
||||||
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
|
||||||
|
|
||||||
- name: Use Conan download cache (Bash)
|
|
||||||
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
|
||||||
|
|
||||||
- name: Create the Packages (Bash)
|
|
||||||
run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"
|
|
||||||
|
|
||||||
- name: Upload the Package(s)
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
conan upload "*" -r cura --all -c
|
|
||||||
|
|
||||||
- name: Set Environment variables for Cura (bash)
|
|
||||||
run: |
|
|
||||||
. ./cura_inst/bin/activate_github_actions_env.sh
|
|
||||||
. ./cura_inst/bin/activate_github_actions_version_env.sh
|
|
||||||
|
|
||||||
- name: Unlock Macos keychain (Bash)
|
|
||||||
run: security unlock -p $TEMP_KEYCHAIN_PASSWORD signing_temp.keychain
|
|
||||||
env:
|
|
||||||
TEMP_KEYCHAIN_PASSWORD: ${{ steps.macos-keychain-developer-cert.outputs.keychain-password }}
|
|
||||||
|
|
||||||
# FIXME: This is a workaround to ensure that we use and pack a shared library for OpenSSL 1.1.1l. We currently compile
|
|
||||||
# OpenSSL statically for CPython, but our Python Dependenies (such as PyQt6) require a shared library.
|
|
||||||
# Because Conan won't allow for building the same library with two different options (easily) we need to install it explicitly
|
|
||||||
# and do a manual copy to the VirtualEnv, such that Pyinstaller can find it.
|
|
||||||
- name: Install OpenSSL shared
|
|
||||||
run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
|
|
||||||
|
|
||||||
- name: Copy OpenSSL shared (Bash)
|
|
||||||
run: |
|
|
||||||
cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
|
|
||||||
cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true
|
|
||||||
|
|
||||||
- name: Create the Cura dist
|
|
||||||
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
|
||||||
|
|
||||||
- name: Output the name file name and extension
|
|
||||||
id: filename
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
|
|
||||||
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-${{ inputs.architecture }}"
|
|
||||||
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"INSTALLER_FILENAME={installer_filename}\n")
|
|
||||||
|
|
||||||
- name: Summarize the used Conan dependencies
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
|
||||||
conan_info = {"installed": []}
|
|
||||||
if os.path.exists(conan_install_info_path):
|
|
||||||
with open(conan_install_info_path, "r") as f:
|
|
||||||
conan_info = json.load(f)
|
|
||||||
sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
|
|
||||||
|
|
||||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(summary_env):
|
|
||||||
with open(summary_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
|
|
||||||
with open(summary_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
|
|
||||||
f.writelines("## Conan packages:\n")
|
|
||||||
for dep in sorted_deps:
|
|
||||||
f.writelines(f"`{dep}`\n")
|
|
||||||
|
|
||||||
- name: Summarize the used Python modules
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import pkg_resources
|
|
||||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(summary_env):
|
|
||||||
with open(summary_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
|
|
||||||
with open(summary_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines("## Python modules:\n")
|
|
||||||
for package in pkg_resources.working_set:
|
|
||||||
f.writelines(f"`{package.key}/{package.version}`\n")
|
|
||||||
|
|
||||||
- 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 "${{ steps.filename.outputs.INSTALLER_FILENAME }}" --build_dmg --build_pkg --app_name "$CURA_APP_NAME"
|
|
||||||
working-directory: dist
|
|
||||||
|
|
||||||
- name: Upload the dmg
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-dmg
|
|
||||||
path: |
|
|
||||||
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.dmg
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Upload the pkg
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg
|
|
||||||
path: |
|
|
||||||
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() }}
|
|
||||||
needs: [ cura-installer-create ]
|
|
||||||
|
|
||||||
uses: ultimaker/cura/.github/workflows/notify.yml@main
|
|
||||||
with:
|
with:
|
||||||
success: ${{ contains(join(needs.*.result, ','), 'success') }}
|
python-version: '3.10.x'
|
||||||
success_title: "Create the Cura distributions"
|
cache: 'pip'
|
||||||
success_body: "Installers for ${{ inputs.cura_conan_version }}"
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
failure_title: "Failed to create the Cura distributions"
|
|
||||||
failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
|
- name: Install Python requirements for runner
|
||||||
secrets: inherit
|
run: pip install -r .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
|
- name: Cache Conan local repository packages (Bash)
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
$HOME/.conan/data
|
||||||
|
$HOME/.conan/conan_download_cache
|
||||||
|
key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
|
||||||
|
|
||||||
|
- name: Install MacOS system requirements
|
||||||
|
run: brew install cmake autoconf automake ninja create-dmg
|
||||||
|
|
||||||
|
- name: Create the default Conan profile
|
||||||
|
run: conan profile new default --detect --force
|
||||||
|
|
||||||
|
- name: Remove Macos keychain (Bash)
|
||||||
|
run: security delete-keychain signing_temp.keychain || true
|
||||||
|
|
||||||
|
- name: Configure Macos keychain Developer Cert(Bash)
|
||||||
|
id: macos-keychain-developer-cert
|
||||||
|
uses: apple-actions/import-codesign-certs@v1
|
||||||
|
with:
|
||||||
|
keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
||||||
|
p12-file-base64: ${{ secrets.MACOS_CERT_P12 }}
|
||||||
|
p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Configure Macos keychain Installer Cert (Bash)
|
||||||
|
id: macos-keychain-installer-cert
|
||||||
|
uses: apple-actions/import-codesign-certs@v1
|
||||||
|
with:
|
||||||
|
keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
||||||
|
create-keychain: false # keychain is created in previous use of action.
|
||||||
|
p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
|
||||||
|
p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Get Conan configuration
|
||||||
|
run: |
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
|
- name: Use Conan download cache (Bash)
|
||||||
|
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
||||||
|
|
||||||
|
- name: Create the Packages (Bash)
|
||||||
|
run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"
|
||||||
|
|
||||||
|
- name: Upload the Package(s)
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
conan upload "*" -r cura --all -c
|
||||||
|
|
||||||
|
- name: Set Environment variables for Cura (bash)
|
||||||
|
run: |
|
||||||
|
. ./cura_inst/bin/activate_github_actions_env.sh
|
||||||
|
. ./cura_inst/bin/activate_github_actions_version_env.sh
|
||||||
|
|
||||||
|
- name: Unlock Macos keychain (Bash)
|
||||||
|
run: security unlock -p $TEMP_KEYCHAIN_PASSWORD signing_temp.keychain
|
||||||
|
env:
|
||||||
|
TEMP_KEYCHAIN_PASSWORD: ${{ steps.macos-keychain-developer-cert.outputs.keychain-password }}
|
||||||
|
|
||||||
|
# FIXME: This is a workaround to ensure that we use and pack a shared library for OpenSSL 1.1.1l. We currently compile
|
||||||
|
# OpenSSL statically for CPython, but our Python Dependenies (such as PyQt6) require a shared library.
|
||||||
|
# Because Conan won't allow for building the same library with two different options (easily) we need to install it explicitly
|
||||||
|
# and do a manual copy to the VirtualEnv, such that Pyinstaller can find it.
|
||||||
|
- name: Install OpenSSL shared
|
||||||
|
run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
|
||||||
|
|
||||||
|
- name: Copy OpenSSL shared (Bash)
|
||||||
|
run: |
|
||||||
|
cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
|
||||||
|
cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true
|
||||||
|
|
||||||
|
- name: Create the Cura dist
|
||||||
|
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
||||||
|
|
||||||
|
- name: Output the name file name and extension
|
||||||
|
id: filename
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
|
||||||
|
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-${{ inputs.architecture }}"
|
||||||
|
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"INSTALLER_FILENAME={installer_filename}\n")
|
||||||
|
|
||||||
|
- name: Summarize the used Conan dependencies
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
||||||
|
conan_info = {"installed": []}
|
||||||
|
if os.path.exists(conan_install_info_path):
|
||||||
|
with open(conan_install_info_path, "r") as f:
|
||||||
|
conan_info = json.load(f)
|
||||||
|
sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
|
||||||
|
|
||||||
|
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(summary_env):
|
||||||
|
with open(summary_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
with open(summary_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
|
||||||
|
f.writelines("## Conan packages:\n")
|
||||||
|
for dep in sorted_deps:
|
||||||
|
f.writelines(f"`{dep}`\n")
|
||||||
|
|
||||||
|
- name: Summarize the used Python modules
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import pkg_resources
|
||||||
|
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(summary_env):
|
||||||
|
with open(summary_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
with open(summary_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines("## Python modules:\n")
|
||||||
|
for package in pkg_resources.working_set:
|
||||||
|
f.writelines(f"`{package.key}/{package.version}`\n")
|
||||||
|
|
||||||
|
- 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 "${{ steps.filename.outputs.INSTALLER_FILENAME }}" --build_dmg --build_pkg --app_name "$CURA_APP_NAME"
|
||||||
|
working-directory: dist
|
||||||
|
|
||||||
|
- name: Upload the dmg
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-dmg
|
||||||
|
path: |
|
||||||
|
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.dmg
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Upload the pkg
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg
|
||||||
|
path: |
|
||||||
|
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() }}
|
||||||
|
needs: [ cura-installer-create ]
|
||||||
|
|
||||||
|
uses: ultimaker/cura/.github/workflows/notify.yml@main
|
||||||
|
with:
|
||||||
|
success: ${{ contains(join(needs.*.result, ','), 'success') }}
|
||||||
|
success_title: "Create the Cura distributions"
|
||||||
|
success_body: "Installers for ${{ inputs.cura_conan_version }}"
|
||||||
|
failure_title: "Failed to create the Cura distributions"
|
||||||
|
failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
|
||||||
|
secrets: inherit
|
||||||
|
|
551
.github/workflows/windows.yml
vendored
551
.github/workflows/windows.yml
vendored
|
@ -2,286 +2,287 @@ name: Windows Installer
|
||||||
run-name: ${{ inputs.cura_conan_version }} for Windows-${{ inputs.architecture }} by @${{ github.actor }}
|
run-name: ${{ inputs.cura_conan_version }} for Windows-${{ inputs.architecture }} by @${{ github.actor }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Architecture'
|
description: 'Architecture'
|
||||||
required: true
|
required: true
|
||||||
default: 'X64'
|
default: 'X64'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- X64
|
- X64
|
||||||
operating_system:
|
operating_system:
|
||||||
description: 'OS'
|
description: 'OS'
|
||||||
required: true
|
required: true
|
||||||
default: 'windows-2022'
|
default: 'windows-2022'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- windows-2022
|
- windows-2022
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Architecture'
|
description: 'Architecture'
|
||||||
required: true
|
required: true
|
||||||
default: 'X64'
|
default: 'X64'
|
||||||
type: string
|
type: string
|
||||||
operating_system:
|
operating_system:
|
||||||
description: 'OS'
|
description: 'OS'
|
||||||
required: true
|
required: true
|
||||||
default: 'windows-2022'
|
default: 'windows-2022'
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
||||||
WIN_CERT_INSTALLER_CER: ${{ secrets.WIN_CERT_INSTALLER_CER }}
|
WIN_CERT_INSTALLER_CER: ${{ secrets.WIN_CERT_INSTALLER_CER }}
|
||||||
WIN_CERT_INSTALLER_CER_PASS: ${{ secrets.WIN_CERT_INSTALLER_CER_PASS }}
|
WIN_CERT_INSTALLER_CER_PASS: ${{ secrets.WIN_CERT_INSTALLER_CER_PASS }}
|
||||||
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
||||||
ENTERPRISE: ${{ inputs.enterprise }}
|
ENTERPRISE: ${{ inputs.enterprise }}
|
||||||
STAGING: ${{ inputs.staging }}
|
STAGING: ${{ inputs.staging }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cura-installer-create:
|
cura-installer-create:
|
||||||
runs-on: ${{ inputs.operating_system }}
|
timeout-minutes: 30
|
||||||
|
runs-on: ${{ inputs.operating_system }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
|
INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Setup Python and pip
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
|
||||||
python-version: '3.10.x'
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Install Python requirements for runner
|
|
||||||
run: pip install -r .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Cache Conan local repository packages (Powershell)
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
C:\Users\runneradmin\.conan\data
|
|
||||||
C:\.conan
|
|
||||||
C:\Users\runneradmin\.conan\conan_download_cache
|
|
||||||
key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
|
|
||||||
|
|
||||||
- name: Create the default Conan profile
|
|
||||||
run: conan profile new default --detect --force
|
|
||||||
|
|
||||||
- name: Get Conan configuration
|
|
||||||
run: |
|
|
||||||
conan config install https://github.com/Ultimaker/conan-config.git
|
|
||||||
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
|
||||||
|
|
||||||
- name: Use Conan download cache (Powershell)
|
|
||||||
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
|
|
||||||
|
|
||||||
- name: Create the Packages (Powershell)
|
|
||||||
run: conan install $Env:CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$Env:ENTERPRISE -o cura:staging=$Env:STAGING --json "cura_inst/conan_install_info.json"
|
|
||||||
|
|
||||||
- name: Upload the Package(s)
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
conan upload "*" -r cura --all -c
|
|
||||||
|
|
||||||
- name: Set Environment variables for Cura (Powershell)
|
|
||||||
run: |
|
|
||||||
echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
.\cura_inst\Scripts\activate_github_actions_env.ps1
|
|
||||||
.\cura_inst\Scripts\activate_github_actions_version_env.ps1
|
|
||||||
|
|
||||||
- name: Install OpenSSL shared
|
|
||||||
run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
|
|
||||||
|
|
||||||
- name: Copy OpenSSL shared (Powershell)
|
|
||||||
run: |
|
|
||||||
cp openssl/bin/*.dll ./cura_inst/Scripts/
|
|
||||||
cp openssl/lib/*.lib ./cura_inst/Lib/
|
|
||||||
|
|
||||||
- name: Create the Cura dist
|
|
||||||
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
|
||||||
|
|
||||||
- name: Output the name file name and extension
|
|
||||||
id: filename
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
|
|
||||||
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-${{ inputs.architecture }}"
|
|
||||||
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"INSTALLER_FILENAME={installer_filename}\n")
|
|
||||||
|
|
||||||
- name: Summarize the used Conan dependencies
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
|
||||||
conan_info = {"installed": []}
|
|
||||||
if os.path.exists(conan_install_info_path):
|
|
||||||
with open(conan_install_info_path, "r") as f:
|
|
||||||
conan_info = json.load(f)
|
|
||||||
sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
|
|
||||||
|
|
||||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(summary_env):
|
|
||||||
with open(summary_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
|
|
||||||
with open(summary_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
|
|
||||||
f.writelines("## Conan packages:\n")
|
|
||||||
for dep in sorted_deps:
|
|
||||||
f.writelines(f"`{dep}`\n")
|
|
||||||
|
|
||||||
- name: Summarize the used Python modules
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import pkg_resources
|
|
||||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(summary_env):
|
|
||||||
with open(summary_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
|
|
||||||
with open(summary_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines("## Python modules:\n")
|
|
||||||
for package in pkg_resources.working_set:
|
|
||||||
f.writelines(f"`{package.key}/{package.version}`\n")
|
|
||||||
|
|
||||||
- name: Create PFX certificate from BASE64_PFX_CONTENT secret
|
|
||||||
id: create-pfx
|
|
||||||
env:
|
|
||||||
PFX_CONTENT: ${{ secrets.WIN_CERT_INSTALLER_CER }}
|
|
||||||
run: |
|
|
||||||
$pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx";
|
|
||||||
$encodedBytes = [System.Convert]::FromBase64String($env:PFX_CONTENT);
|
|
||||||
Set-Content $pfxPath -Value $encodedBytes -AsByteStream;
|
|
||||||
echo "PFX_PATH=$pfxPath" >> $env:GITHUB_OUTPUT;
|
|
||||||
|
|
||||||
- name: Create the Windows msi installer (Powershell)
|
|
||||||
run: |
|
|
||||||
python ..\cura_inst\packaging\msi\create_windows_msi.py ..\cura_inst .\UltiMaker-Cura "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi" "$Env:CURA_APP_NAME"
|
|
||||||
working-directory: dist
|
|
||||||
|
|
||||||
- name: Sign the Windows msi installer (Powershell)
|
|
||||||
env:
|
|
||||||
PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
|
|
||||||
run: |
|
|
||||||
& "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi"
|
|
||||||
working-directory: dist
|
|
||||||
|
|
||||||
- name: Create the Windows exe installer (Powershell)
|
|
||||||
run: |
|
|
||||||
python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
|
|
||||||
working-directory: dist
|
|
||||||
|
|
||||||
- name: Sign the Windows exe installer (Powershell)
|
|
||||||
env:
|
|
||||||
PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
|
|
||||||
run: |
|
|
||||||
& "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
|
|
||||||
working-directory: dist
|
|
||||||
|
|
||||||
- name: Upload the msi
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-msi
|
|
||||||
path: |
|
|
||||||
dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.msi
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Upload the exe
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-exe
|
|
||||||
path: |
|
|
||||||
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: |
|
|
||||||
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')
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
name: windows-run-info
|
|
||||||
path: |
|
|
||||||
run_info.sh
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
notify-export:
|
|
||||||
if: ${{ always() }}
|
|
||||||
needs: [ cura-installer-create ]
|
|
||||||
|
|
||||||
uses: ultimaker/cura/.github/workflows/notify.yml@main
|
|
||||||
with:
|
with:
|
||||||
success: ${{ contains(join(needs.*.result, ','), 'success') }}
|
python-version: '3.10.x'
|
||||||
success_title: "Create the Cura distributions"
|
cache: 'pip'
|
||||||
success_body: "Installers for ${{ inputs.cura_conan_version }}"
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
failure_title: "Failed to create the Cura distributions"
|
|
||||||
failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
|
- name: Install Python requirements for runner
|
||||||
secrets: inherit
|
run: pip install -r .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
|
- name: Cache Conan local repository packages (Powershell)
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
C:\Users\runneradmin\.conan\data
|
||||||
|
C:\.conan
|
||||||
|
C:\Users\runneradmin\.conan\conan_download_cache
|
||||||
|
key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
|
||||||
|
|
||||||
|
- name: Create the default Conan profile
|
||||||
|
run: conan profile new default --detect --force
|
||||||
|
|
||||||
|
- name: Get Conan configuration
|
||||||
|
run: |
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
|
- name: Use Conan download cache (Powershell)
|
||||||
|
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
|
||||||
|
|
||||||
|
- name: Create the Packages (Powershell)
|
||||||
|
run: conan install $Env:CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$Env:ENTERPRISE -o cura:staging=$Env:STAGING --json "cura_inst/conan_install_info.json"
|
||||||
|
|
||||||
|
- name: Upload the Package(s)
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
conan upload "*" -r cura --all -c
|
||||||
|
|
||||||
|
- name: Set Environment variables for Cura (Powershell)
|
||||||
|
run: |
|
||||||
|
echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
.\cura_inst\Scripts\activate_github_actions_env.ps1
|
||||||
|
.\cura_inst\Scripts\activate_github_actions_version_env.ps1
|
||||||
|
|
||||||
|
- name: Install OpenSSL shared
|
||||||
|
run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
|
||||||
|
|
||||||
|
- name: Copy OpenSSL shared (Powershell)
|
||||||
|
run: |
|
||||||
|
cp openssl/bin/*.dll ./cura_inst/Scripts/
|
||||||
|
cp openssl/lib/*.lib ./cura_inst/Lib/
|
||||||
|
|
||||||
|
- name: Create the Cura dist
|
||||||
|
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
||||||
|
|
||||||
|
- name: Output the name file name and extension
|
||||||
|
id: filename
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
|
||||||
|
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-${{ inputs.architecture }}"
|
||||||
|
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"INSTALLER_FILENAME={installer_filename}\n")
|
||||||
|
|
||||||
|
- name: Summarize the used Conan dependencies
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
||||||
|
conan_info = {"installed": []}
|
||||||
|
if os.path.exists(conan_install_info_path):
|
||||||
|
with open(conan_install_info_path, "r") as f:
|
||||||
|
conan_info = json.load(f)
|
||||||
|
sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
|
||||||
|
|
||||||
|
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(summary_env):
|
||||||
|
with open(summary_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
with open(summary_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
|
||||||
|
f.writelines("## Conan packages:\n")
|
||||||
|
for dep in sorted_deps:
|
||||||
|
f.writelines(f"`{dep}`\n")
|
||||||
|
|
||||||
|
- name: Summarize the used Python modules
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import pkg_resources
|
||||||
|
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(summary_env):
|
||||||
|
with open(summary_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
with open(summary_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines("## Python modules:\n")
|
||||||
|
for package in pkg_resources.working_set:
|
||||||
|
f.writelines(f"`{package.key}/{package.version}`\n")
|
||||||
|
|
||||||
|
- name: Create PFX certificate from BASE64_PFX_CONTENT secret
|
||||||
|
id: create-pfx
|
||||||
|
env:
|
||||||
|
PFX_CONTENT: ${{ secrets.WIN_CERT_INSTALLER_CER }}
|
||||||
|
run: |
|
||||||
|
$pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx";
|
||||||
|
$encodedBytes = [System.Convert]::FromBase64String($env:PFX_CONTENT);
|
||||||
|
Set-Content $pfxPath -Value $encodedBytes -AsByteStream;
|
||||||
|
echo "PFX_PATH=$pfxPath" >> $env:GITHUB_OUTPUT;
|
||||||
|
|
||||||
|
- name: Create the Windows msi installer (Powershell)
|
||||||
|
run: |
|
||||||
|
python ..\cura_inst\packaging\msi\create_windows_msi.py ..\cura_inst .\UltiMaker-Cura "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi" "$Env:CURA_APP_NAME"
|
||||||
|
working-directory: dist
|
||||||
|
|
||||||
|
- name: Sign the Windows msi installer (Powershell)
|
||||||
|
env:
|
||||||
|
PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
|
||||||
|
run: |
|
||||||
|
& "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi"
|
||||||
|
working-directory: dist
|
||||||
|
|
||||||
|
- name: Create the Windows exe installer (Powershell)
|
||||||
|
run: |
|
||||||
|
python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
|
||||||
|
working-directory: dist
|
||||||
|
|
||||||
|
- name: Sign the Windows exe installer (Powershell)
|
||||||
|
env:
|
||||||
|
PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
|
||||||
|
run: |
|
||||||
|
& "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
|
||||||
|
working-directory: dist
|
||||||
|
|
||||||
|
- name: Upload the msi
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-msi
|
||||||
|
path: |
|
||||||
|
dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.msi
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Upload the exe
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-exe
|
||||||
|
path: |
|
||||||
|
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: |
|
||||||
|
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')
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
name: windows-run-info
|
||||||
|
path: |
|
||||||
|
run_info.sh
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
notify-export:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: [ cura-installer-create ]
|
||||||
|
|
||||||
|
uses: ultimaker/cura/.github/workflows/notify.yml@main
|
||||||
|
with:
|
||||||
|
success: ${{ contains(join(needs.*.result, ','), 'success') }}
|
||||||
|
success_title: "Create the Cura distributions"
|
||||||
|
success_body: "Installers for ${{ inputs.cura_conan_version }}"
|
||||||
|
failure_title: "Failed to create the Cura distributions"
|
||||||
|
failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
|
||||||
|
secrets: inherit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue