Fix building translations

This commit is contained in:
jelle Spijker 2023-02-22 21:03:36 +01:00 committed by jspijker
parent ed49a01fdc
commit 132fbe0e17
2 changed files with 144 additions and 95 deletions

View File

@ -7,110 +7,159 @@ name: conan-package
# It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches # It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
create_binaries_windows: create_binaries_windows:
required: true required: true
default: false default: false
description: 'create binaries Windows' description: 'create binaries Windows'
create_binaries_linux: create_binaries_linux:
required: true required: true
default: false default: false
description: 'create binaries Linux' description: 'create binaries Linux'
create_binaries_macos: create_binaries_macos:
required: true required: true
default: false default: false
description: 'create binaries Macos' description: 'create binaries Macos'
push: push:
paths: paths:
- 'plugins/**' - 'plugins/**'
- 'resources/**' - 'resources/**'
- 'cura/**' - 'cura/**'
- 'icons/**' - 'icons/**'
- 'tests/**' - 'tests/**'
- 'packaging/**' - 'packaging/**'
- '.github/workflows/conan-*.yml' - '.github/workflows/conan-*.yml'
- '.github/workflows/notify.yml' - '.github/workflows/notify.yml'
- '.github/workflows/requirements-conan-package.txt' - '.github/workflows/requirements-conan-package.txt'
- 'requirements*.txt' - 'requirements*.txt'
- 'conanfile.py' - 'conanfile.py'
- 'conandata.yml' - 'conandata.yml'
- 'GitVersion.yml' - 'GitVersion.yml'
- '*.jinja' - '*.jinja'
branches: branches:
- main - main
- 'CURA-*' - 'CURA-*'
- '[1-9].[0-9]' - '[1-9].[0-9]'
- '[1-9].[0-9][0-9]' - '[1-9].[0-9][0-9]'
tags: tags:
- '[1-9].[0-9].[0-9]*' - '[1-9].[0-9].[0-9]*'
- '[1-9].[0-9].[0-9]' - '[1-9].[0-9].[0-9]'
- '[1-9].[0-9][0-9].[0-9]*' - '[1-9].[0-9][0-9].[0-9]*'
env:
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
CONAN_LOG_RUN_TO_OUTPUT: 1
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
CONAN_NON_INTERACTIVE: 1
permissions: {} permissions: {}
jobs: jobs:
conan-recipe-version: conan-recipe-version:
permissions: permissions:
contents: read contents: read
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
with:
project_name: cura
conan-package-create-linux:
needs: [ conan-recipe-version ]
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python and pip
uses: actions/setup-python@v4
with: with:
project_name: cura python-version: '3.10.x'
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-conan-package.txt
conan-package-export: - name: Install Python requirements for runner
permissions: run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
contents: read # Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
needs: [ conan-recipe-version ] - name: Use Conan download cache (Bash)
uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main if: ${{ runner.os != 'Windows' }}
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
- name: Cache Conan local repository packages (Bash)
uses: actions/cache@v3
with: with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} path: |
recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} $HOME/.conan/data
runs_on: 'ubuntu-20.04' $HOME/.conan/conan_download_cache
python_version: '3.10.x' key: conan-ubuntu-${{ runner.arch }}-create-cache
conan_logging_level: 'info'
secrets: inherit
conan-package-create-linux: - name: Install Linux system requirements
permissions: if: ${{ runner.os == 'Linux' }}
contents: read run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt upgrade
sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config flex bison -y
# if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch)) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux) }} - name: Install GCC-12
needs: [ conan-recipe-version, conan-package-export ] run: |
sudo apt install g++-12 gcc-12 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main - name: Create the default Conan profile
run: conan profile new default --detect
- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Create the Packages using lockfile
run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True
- name: Remove the latest alias
if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }}
run: |
conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true
conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f || true
- name: Create the latest alias
if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' && always() }}
run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
- name: Upload the Package(s)
if: always()
run: |
conan upload "*" -r cura --all -c
conan upload "*" -r cura-ce -c
- name: Upload the log and build artifacts
if: always()
uses: actions/upload-artifact@v3
with: with:
project_name: ${{ needs.conan-recipe-version.outputs.project_name }} name: log-ubuntu-${{ runner.arch }}
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} path: |
build_id: 1 buildinfo.json
runs_on: 'ubuntu-20.04' conan.lock
python_version: '3.10.x' conanbuildinfo.txt
conan_logging_level: 'info' conaninfo.txt
secrets: inherit graph_info.json
build/**
retention-days: 1
notify-export: notify-create:
if: ${{ always() }} if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}
needs: [ conan-recipe-version, conan-package-export ] needs: [ conan-recipe-version, conan-package-create-linux ]
uses: ultimaker/cura/.github/workflows/notify.yml@main uses: ultimaker/cura/.github/workflows/notify.yml@main
with: with:
success: ${{ contains(join(needs.*.result, ','), 'success') }} success: ${{ contains(join(needs.*.result, ','), 'success') }}
success_title: "New Conan recipe exported in ${{ github.repository }}" success_title: "New binaries created in ${{ github.repository }}"
success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
failure_title: "Failed to export Conan Export in ${{ github.repository }}" failure_title: "Failed to create binaries in ${{ github.repository }}"
failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
secrets: inherit secrets: inherit
notify-create:
if: ${{ always() && ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux)) }}
needs: [ conan-recipe-version, conan-package-create-linux ]
uses: ultimaker/cura/.github/workflows/notify.yml@main
with:
success: ${{ contains(join(needs.*.result, ','), 'success') }}
success_title: "New binaries created in ${{ github.repository }}"
success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
failure_title: "Failed to create binaries in ${{ github.repository }}"
failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
secrets: inherit

View File

@ -276,11 +276,11 @@ class CuraConan(ConanFile):
def requirements(self): def requirements(self):
self.requires("pyarcus/5.2.2") self.requires("pyarcus/5.2.2")
self.requires("curaengine/(latest)@ultimaker/testing") self.requires("curaengine/5.3.0-beta@ultimaker/testing")
self.requires("pysavitar/5.2.2") self.requires("pysavitar/5.2.2")
self.requires("pynest2d/5.2.2") self.requires("pynest2d/5.2.2")
self.requires("uranium/(latest)@ultimaker/testing") self.requires("uranium/5.3.0-beta.2@ultimaker/testing")
self.requires("fdm_materials/(latest)@{}/testing".format("internal" if self.options.internal else "ultimaker")) self.requires("fdm_materials/5.3.0-beta.1+29@ultimaker/stable")
self.requires("cura_binary_data/(latest)@ultimaker/testing") self.requires("cura_binary_data/(latest)@ultimaker/testing")
self.requires("cpython/3.10.4") self.requires("cpython/3.10.4")
if self.options.internal: if self.options.internal: