Skip to content

Commit

Permalink
parallelize dmg and pkg creation
Browse files Browse the repository at this point in the history
Contributes to CURA-8415
  • Loading branch information
jellespijker committed Aug 18, 2023
1 parent f2c68fe commit 8ea4dab
Showing 1 changed file with 87 additions and 8 deletions.
95 changes: 87 additions & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 pkg
- name: Upload the dmg
uses: actions/upload-artifact@v3
with:
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg
name: ${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-dmg
path: |
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg
dist/${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.dmg
retention-days: 5

- name: Upload the dmg
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 }}-dmg
name: ${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-pkg
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:
Expand Down

0 comments on commit 8ea4dab

Please sign in to comment.