parallelize dmg and pkg creation

Contributes to CURA-8415
This commit is contained in:
Jelle Spijker 2023-08-19 01:12:43 +02:00
parent f2c68fe2ce
commit 8ea4dabcea
No known key found for this signature in database
GPG Key ID: 034D1C0527888B65

View File

@ -92,6 +92,9 @@ jobs:
cura-installer-create:
runs-on: ${{ inputs.operating_system }}
outputs:
INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
steps:
- name: Checkout
uses: actions/checkout@v3
@ -238,29 +241,105 @@ jobs:
for package in pkg_resources.working_set:
f.writelines(f"`{package.key}/{package.version}`\n")
- name: upload the dist folder
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist/
retention-days: 5
cura-installer-create-dmg:
needs: [ cura-installer-create ]
runs-on: macos-11
steps:
- name: Download the dist
uses: actions/download-artifact@v3
with:
name: dist
- 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: Install MacOS system requirements
run: brew install create-dmg
- name: Create the Macos dmg and pkg (Bash)
run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ steps.filename.outputs.INSTALLER_FILENAME }}" --build_pkg --build_dmg --app_name "$CURA_APP_NAME"
run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_dmg --app_name "$CURA_APP_NAME"
working-directory: dist
- name: Upload the dmg
uses: actions/upload-artifact@v3
with:
name: ${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-dmg
path: |
dist/${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.dmg
retention-days: 5
cura-installer-create-pkg:
needs: [ cura-installer-create ]
runs-on: macos-11
steps:
- name: Download the dist
uses: actions/download-artifact@v3
with:
name: dist
- 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: Install MacOS system requirements
run: brew install create-dmg
- name: Create the Macos dmg and pkg (Bash)
run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_pkg --app_name "$CURA_APP_NAME"
working-directory: dist
- name: Upload the pkg
uses: actions/upload-artifact@v3
with:
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg
name: ${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-pkg
path: |
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg
retention-days: 5
- 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
dist/${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.pkg
retention-days: 5
notify-export:
if: ${{ always() }}
needs: [ cura-installer-create ]
needs: [ cura-installer-create-dmg, cura-installer-create-pkg ]
uses: ultimaker/cura/.github/workflows/notify.yml@main
with: