mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Specify to build installer per-OS.
Exclusion happens _before_ additional includes unfortunaltely, so the matrix is back to being a plain list if OS's. This also means that, if we don't want to build each OS x OS_id, we have to put that information somewhere else. OS_id didn't really belong in the matrix anyway, since it's a derivative value. It's now replaced with a named environment variable. The way to exclude and select the 'name' used in the filename for each OS seems a little cumbersome, but I didn't find any better way so far. (should) implement the 'easy', 'lite' version of CURA-9880
This commit is contained in:
parent
cc9a698f42
commit
957c25973b
2 changed files with 35 additions and 11 deletions
3
.github/workflows/conan-package.yml
vendored
3
.github/workflows/conan-package.yml
vendored
|
@ -12,14 +12,17 @@ on:
|
|||
create_binaries_windows:
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
description: 'create binaries Windows'
|
||||
create_binaries_linux:
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
description: 'create binaries Linux'
|
||||
create_binaries_macos:
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
description: 'create binaries Macos'
|
||||
|
||||
push:
|
||||
|
|
43
.github/workflows/cura-installer.yml
vendored
43
.github/workflows/cura-installer.yml
vendored
|
@ -31,6 +31,21 @@ on:
|
|||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
create_binaries_windows:
|
||||
description: 'Installer for Windows'
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
create_binaries_linux:
|
||||
description: 'Installer for Linux'
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
create_binaries_macos:
|
||||
description: 'Installer for MacOs'
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
# Run the nightly at 3:25 UTC on working days
|
||||
#FIXME: Provide the same default values as the workflow dispatch
|
||||
|
@ -56,6 +71,7 @@ env:
|
|||
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
||||
ENTERPRISE: ${{ inputs.enterprise }}
|
||||
STAGING: ${{ inputs.staging }}
|
||||
OS_NAME: 'unknown-os'
|
||||
|
||||
jobs:
|
||||
cura-installer-create:
|
||||
|
@ -64,16 +80,21 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { os: macos-11, os_id: 'mac' }
|
||||
- { os: windows-2022, os_id: 'win64' }
|
||||
- { os: ubuntu-20.04, os_id: 'linux' }
|
||||
- { os: ubuntu-22.04, os_id: 'linux-modern' }
|
||||
os: [macos-11, windows-2022, ubuntu-20.04, ubuntu-22.04]
|
||||
exclude:
|
||||
- os: ${{ inputs.create_binaries_macos && '' || 'macos-11' }}
|
||||
- os: ${{ inputs.create_binaries_windows && '' || 'windows-2022' }}
|
||||
- os: ${{ inputs.create_binaries_linux && '' || 'ubuntu-20.04' }}
|
||||
- os: ${{ inputs.create_binaries_linux && '' || 'ubuntu-22.04' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get OS-id String
|
||||
run: |
|
||||
echo "OS_NAME=${{ (matrix.os == 'macos-11' && 'mac') || (matrix.os == 'windows-2022' && 'win64') || (matrix.os == 'ubuntu-20.04' && 'linux') || (matrix.os == 'ubuntu-22.04' && 'linux-modern') || matrix.os }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Python and pip
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
@ -217,34 +238,34 @@ jobs:
|
|||
|
||||
- name: Archive the artifacts (bash)
|
||||
if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }}
|
||||
run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ matrix.os_id }}.tar.gz" "./Ultimaker-Cura/"
|
||||
run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ env.OS_NAME }}.tar.gz" "./Ultimaker-Cura/"
|
||||
working-directory: dist
|
||||
|
||||
- name: Archive the artifacts (Powershell)
|
||||
if: ${{ github.event.inputs.installer == 'false' && runner.os == 'Windows' }}
|
||||
run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ matrix.os_id }}.zip"
|
||||
run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ env.OS_NAME }}.zip"
|
||||
working-directory: dist
|
||||
|
||||
- name: Create the Windows exe installer (Powershell)
|
||||
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }}
|
||||
run: |
|
||||
python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ matrix.os_id }}.exe"
|
||||
python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ env.OS_NAME }}.exe"
|
||||
working-directory: dist
|
||||
|
||||
- name: Create the Linux AppImage (Bash)
|
||||
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Linux' }}
|
||||
run: python ../cura_inst/packaging/AppImage/create_appimage.py ./Ultimaker-Cura $CURA_VERSION_FULL "Ultimaker-Cura-$CURA_VERSION_FULL-${{ matrix.os_id }}.AppImage"
|
||||
run: python ../cura_inst/packaging/AppImage/create_appimage.py ./Ultimaker-Cura $CURA_VERSION_FULL "Ultimaker-Cura-$CURA_VERSION_FULL-${{ env.OS_NAME }}.AppImage"
|
||||
working-directory: dist
|
||||
|
||||
- name: Create the MacOS dmg (Bash)
|
||||
if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
|
||||
run: python ../cura_inst/packaging/dmg/dmg_sign_noterize.py ../cura_inst . "Ultimaker-Cura-$CURA_VERSION_FULL-${{ matrix.os_id }}.dmg"
|
||||
run: python ../cura_inst/packaging/dmg/dmg_sign_noterize.py ../cura_inst . "Ultimaker-Cura-$CURA_VERSION_FULL-${{ env.OS_NAME }}.dmg"
|
||||
working-directory: dist
|
||||
|
||||
- name: Upload the artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ matrix.os_id }}
|
||||
name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ env.OS_NAME }}
|
||||
path: |
|
||||
dist/*.tar.gz
|
||||
dist/*.zip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue