Skip to content

Clean conan local cache #2

Clean conan local cache

Clean conan local cache #2

name: Linux Installer
run-name: ${{ inputs.cura_conan_version }} for Linux-X64 by @${{ github.actor }}
on:
workflow_call:
inputs:
cura_conan_version:
description: 'Cura Conan Version'
default: 'cura/latest@ultimaker/testing'
required: true
type: string
conan_args:
description: 'Conan args, e.g. --requires'
default: ''
required: false
type: string
enterprise:
description: 'Build Cura as an Enterprise edition'
default: false
required: true
type: boolean
staging:
description: 'Use staging API'
default: false
required: true
type: boolean
operating_system:
description: 'OS'
required: true
default: 'ubuntu-22.04'
type: string
private_data:
required: false
default: false
type: boolean
permissions:
contents: read
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
SENTRY_TOKEN: ${{ secrets.CURAENGINE_SENTRY_TOKEN }}
jobs:
cura-installer-create:
runs-on: ${{ inputs.operating_system }}
steps:
# FIXME: use main once merged
- name: Setup the build environment
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@CURA-11622_conan_v2
with:
conan_user: ${{ secrets.CONAN_USER }}
conan_password: ${{ secrets.CONAN_PASS }}
private_data: ${{ inputs.private_data }}
install_system_dependencies: true
- name: Install AppImage builder
run: |
chmod +x ./Cura-workflows/runner_scripts/appimage_setup.sh
./Cura-workflows/runner_scripts/appimage_setup.sh
- name: Configure GPG Key
run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import
- name: Gather/build the packages
run: conan install --requires ${{ inputs.cura_conan_version }} ${{ inputs.conan_args }} --build=missing --update -of cura_inst --deployer=virtual_python_env -c user.deployer.virtual_python_env:dev_tools=True -g GitHubActionsBuildEnv -g GitHubActionsRunEnv ${{ inputs.enterprise && '-o "&:enterprise=True"' || '' }} ${{ inputs.staging && '-o "&:staging=True"' || '' }} ${{ inputs.private_data && '-o "&:internal=True"' || '' }} -c tools.build:skip_test=True -s curaengine:build_type=RelWithDebInfo -s arcus:build_type=RelWithDebInfo -s clipper:build_type=RelWithDebInfo
- name: Set Environment variables for Cura (bash)
run: source ./cura_inst/activate_github_actions_buildenv.sh
- name: Create the Cura dist
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
- name: Output the name file name and extension
id: filename
run: python Cura-workflows/runner_scripts/cura_installer_filename.py --os ${{ runner.os }} --arch X64 ${{ inputs.enterprise && '--enterprise' || '' }} ${{ inputs.private_data && '--internal' || '' }}
- name: Summarize the used dependencies
run: python Cura-workflows/runner_scripts/summarize_used_dependencies.py --installer_filename ${{ steps.filename.outputs.INSTALLER_FILENAME }}
- name: Create the Linux AppImage (Bash)
run: |
python ../cura_inst/packaging/AppImage-builder/create_appimage.py ./UltiMaker-Cura $CURA_VERSION_FULL "${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage"
chmod +x "${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage"
working-directory: dist
- name: Upload the lib(std)c(++) debug symbols
run: |
find AppDir/ -name 'libc.*' -exec sentry-cli --auth-token $SENTRY_TOKEN debug-files upload {} \;
find AppDir/ -name 'libstdc++.*' -exec sentry-cli --auth-token $SENTRY_TOKEN debug-files upload {} \;
working-directory: dist
# FIXME: Use main once merged
- name: Upload the built Package(s)
if: ${{ always() && ! inputs.private_data }}
uses: ultimaker/cura-workflows/.github/actions/upload-conan-package@CURA-11622_conan_v2
with:
package_name: *

Check failure on line 104 in .github/workflows/cura-installer-linux.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cura-installer-linux.yml

Invalid workflow file

You have an error in your yaml syntax on line 104
- name: Clean local cache
if: ${{ startsWith(inputs.operating_system, 'self-hosted') }}
run: conan remove '*' --lru=1w -c
- name: Upload the AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-AppImage
path: dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage
retention-days: 5
- name: Upload the asc
uses: actions/upload-artifact@v4
with:
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-asc
path: dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage.asc
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@v4
with:
name: linux-run-info
path: run_info.sh
retention-days: 5