mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-30 15:54:32 +08:00
Merge branch 'main' into CURA-10835_make_setting_hidden_icon
This commit is contained in:
commit
012c77459c
243
.github/workflows/conan-package-create.yml
vendored
243
.github/workflows/conan-package-create.yml
vendored
@ -1,158 +1,153 @@
|
|||||||
name: Create and Upload Conan package
|
name: Create and Upload Conan package
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
project_name:
|
project_name:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
recipe_id_full:
|
recipe_id_full:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
build_id:
|
build_id:
|
||||||
required: true
|
required: true
|
||||||
type: number
|
type: number
|
||||||
|
|
||||||
build_info:
|
build_info:
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
recipe_id_latest:
|
recipe_id_latest:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
runs_on:
|
runs_on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
python_version:
|
python_version:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
conan_config_branch:
|
conan_config_branch:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
conan_logging_level:
|
conan_logging_level:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
conan_clean_local_cache:
|
conan_clean_local_cache:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
conan_upload_community:
|
conan_upload_community:
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
|
||||||
CONAN_LOG_RUN_TO_OUTPUT: 1
|
CONAN_LOG_RUN_TO_OUTPUT: 1
|
||||||
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
|
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
|
||||||
CONAN_NON_INTERACTIVE: 1
|
CONAN_NON_INTERACTIVE: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
conan-package-create:
|
conan-package-create:
|
||||||
runs-on: ${{ inputs.runs_on }}
|
runs-on: ${{ inputs.runs_on }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Setup Python and pip
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
- name: Install Python requirements for runner
|
- name: Install Python requirements for runner
|
||||||
run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
|
run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
|
||||||
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
|
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
|
||||||
|
|
||||||
- name: Use Conan download cache (Bash)
|
- name: Use Conan download cache (Bash)
|
||||||
if: ${{ runner.os != 'Windows' }}
|
if: ${{ runner.os != 'Windows' }}
|
||||||
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
||||||
|
|
||||||
- name: Use Conan download cache (Powershell)
|
- name: Use Conan download cache (Powershell)
|
||||||
if: ${{ runner.os == 'Windows' }}
|
if: ${{ runner.os == 'Windows' }}
|
||||||
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
|
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
|
||||||
|
|
||||||
- name: Cache Conan local repository packages (Bash)
|
- name: Cache Conan local repository packages (Bash)
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
if: ${{ runner.os != 'Windows' }}
|
if: ${{ runner.os != 'Windows' }}
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
$HOME/.conan/data
|
$HOME/.conan/data
|
||||||
$HOME/.conan/conan_download_cache
|
$HOME/.conan/conan_download_cache
|
||||||
key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
|
key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
|
||||||
|
|
||||||
- name: Cache Conan local repository packages (Powershell)
|
- name: Cache Conan local repository packages (Powershell)
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
if: ${{ runner.os == 'Windows' }}
|
if: ${{ runner.os == 'Windows' }}
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
C:\Users\runneradmin\.conan\data
|
C:\Users\runneradmin\.conan\data
|
||||||
C:\.conan
|
C:\.conan
|
||||||
C:\Users\runneradmin\.conan\conan_download_cache
|
C:\Users\runneradmin\.conan\conan_download_cache
|
||||||
key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
|
key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
|
||||||
|
|
||||||
- name: Install MacOS system requirements
|
- name: Install MacOS system requirements
|
||||||
if: ${{ runner.os == 'Macos' }}
|
if: ${{ runner.os == 'Macos' }}
|
||||||
run: brew install autoconf automake ninja
|
run: brew install autoconf automake ninja
|
||||||
|
|
||||||
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
||||||
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
||||||
- name: Install Linux system requirements
|
- name: Install Linux system requirements
|
||||||
if: ${{ runner.os == 'Linux' }}
|
if: ${{ runner.os == 'Linux' }}
|
||||||
run: |
|
run: |
|
||||||
sudo rm /var/cache/debconf/config.dat
|
sudo rm /var/cache/debconf/config.dat
|
||||||
sudo dpkg --configure -a
|
sudo dpkg --configure -a
|
||||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade
|
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
|
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
|
||||||
|
|
||||||
- name: Install GCC-12 on ubuntu-22.04
|
- name: Install GCC-132 on ubuntu
|
||||||
if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }}
|
if: ${{ startsWith(inputs.runs_on, 'ubuntu') }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt install g++-12 gcc-12 -y
|
sudo apt install g++-13 gcc-13 -y
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
||||||
|
|
||||||
- name: Use GCC-10 on ubuntu-20.04
|
- name: Create the default Conan profile
|
||||||
if: ${{ startsWith(inputs.runs_on, 'ubuntu-20.04') }}
|
run: conan profile new default --detect
|
||||||
run: |
|
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
|
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
|
|
||||||
|
|
||||||
- name: Create the default Conan profile
|
- name: Get Conan configuration from branch
|
||||||
run: conan profile new default --detect
|
if: ${{ inputs.conan_config_branch != '' }}
|
||||||
|
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
|
||||||
|
|
||||||
- name: Get Conan configuration from branch
|
- name: Get Conan configuration
|
||||||
if: ${{ inputs.conan_config_branch != '' }}
|
run: |
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
- name: Get Conan configuration
|
- name: Add Cura private Artifactory remote
|
||||||
if: ${{ inputs.conan_config_branch == '' }}
|
run: conan remote add cura-private https://ultimaker.jfrog.io/artifactory/api/conan/cura-private True
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git
|
|
||||||
|
|
||||||
- name: Add Cura private Artifactory remote
|
- name: Create the Packages
|
||||||
run: conan remote add cura-private https://ultimaker.jfrog.io/artifactory/api/conan/cura-private True
|
run: conan install ${{ inputs.recipe_id_full }} --build=missing --update -c tools.build:skip_test=True
|
||||||
|
|
||||||
- name: Create the Packages
|
- name: Upload the Package(s)
|
||||||
run: conan install ${{ inputs.recipe_id_full }} --build=missing --update
|
if: ${{ always() && inputs.conan_upload_community }}
|
||||||
|
run: conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
|
||||||
|
|
||||||
- name: Upload the Package(s)
|
- name: Upload the Package(s) to the private Artifactory
|
||||||
if: ${{ always() && inputs.conan_upload_community }}
|
if: ${{ always() && ! inputs.conan_upload_community }}
|
||||||
run: conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
|
run: conan upload ${{ inputs.recipe_id_full }} -r cura-private --all -c
|
||||||
|
|
||||||
- name: Upload the Package(s) to the private Artifactory
|
|
||||||
if: ${{ always() && ! inputs.conan_upload_community }}
|
|
||||||
run: conan upload ${{ inputs.recipe_id_full }} -r cura-private --all -c
|
|
||||||
|
31
.github/workflows/conan-package.yml
vendored
31
.github/workflows/conan-package.yml
vendored
@ -49,15 +49,15 @@ on:
|
|||||||
- '[1-9].[0-9][0-9].[0-9]*'
|
- '[1-9].[0-9][0-9].[0-9]*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
||||||
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
|
||||||
CONAN_LOG_RUN_TO_OUTPUT: 1
|
CONAN_LOG_RUN_TO_OUTPUT: 1
|
||||||
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
|
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
|
||||||
CONAN_NON_INTERACTIVE: 1
|
CONAN_NON_INTERACTIVE: 1
|
||||||
|
|
||||||
permissions: {}
|
permissions: { }
|
||||||
jobs:
|
jobs:
|
||||||
conan-recipe-version:
|
conan-recipe-version:
|
||||||
permissions:
|
permissions:
|
||||||
@ -103,18 +103,23 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade
|
sudo apt upgrade
|
||||||
sudo apt install efibootmgr 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 g++-12 gcc-12 -y
|
sudo apt install efibootmgr 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 g++-12 gcc-12 -y
|
||||||
sudo apt install g++-12 gcc-12 -y
|
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
|
- name: Install GCC-13
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
|
run: |
|
||||||
|
sudo apt install g++-13 gcc-13 -y
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
||||||
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
||||||
|
|
||||||
- name: Create the default Conan profile
|
- name: Create the default Conan profile
|
||||||
run: conan profile new default --detect --force
|
run: conan profile new default --detect --force
|
||||||
|
|
||||||
- name: Get Conan configuration
|
- name: Get Conan configuration
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git
|
run: |
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
- name: Create the Packages
|
- name: Create the Packages
|
||||||
run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True
|
run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True -c tools.build:skip_test=True
|
||||||
|
|
||||||
- name: Create the latest alias
|
- name: Create the latest alias
|
||||||
if: always()
|
if: always()
|
||||||
|
161
.github/workflows/conan-recipe-export.yml
vendored
161
.github/workflows/conan-recipe-export.yml
vendored
@ -1,106 +1,107 @@
|
|||||||
name: Export Conan Recipe to server
|
name: Export Conan Recipe to server
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
recipe_id_full:
|
recipe_id_full:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
recipe_id_latest:
|
recipe_id_latest:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
runs_on:
|
runs_on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
python_version:
|
python_version:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
conan_config_branch:
|
conan_config_branch:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
conan_logging_level:
|
conan_logging_level:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
conan_export_binaries:
|
conan_export_binaries:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
conan_upload_community:
|
conan_upload_community:
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
|
||||||
CONAN_LOG_RUN_TO_OUTPUT: 1
|
CONAN_LOG_RUN_TO_OUTPUT: 1
|
||||||
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
|
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
|
||||||
CONAN_NON_INTERACTIVE: 1
|
CONAN_NON_INTERACTIVE: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package-export:
|
package-export:
|
||||||
runs-on: ${{ inputs.runs_on }}
|
runs-on: ${{ inputs.runs_on }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Setup Python and pip
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
- name: Install Python requirements and Create default Conan profile
|
- name: Install Python requirements and Create default Conan profile
|
||||||
run: |
|
run: |
|
||||||
pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
|
pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
|
||||||
conan profile new default --detect
|
conan profile new default --detect
|
||||||
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
|
# Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
|
||||||
|
|
||||||
- name: Cache Conan local repository packages
|
- name: Cache Conan local repository packages
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: $HOME/.conan/data
|
path: $HOME/.conan/data
|
||||||
key: ${{ runner.os }}-conan-export-cache
|
key: ${{ runner.os }}-conan-export-cache
|
||||||
|
|
||||||
- name: Get Conan configuration from branch
|
- name: Get Conan configuration from branch
|
||||||
if: ${{ inputs.conan_config_branch != '' }}
|
if: ${{ inputs.conan_config_branch != '' }}
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
|
run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
|
||||||
|
|
||||||
- name: Get Conan configuration
|
- name: Get Conan configuration
|
||||||
if: ${{ inputs.conan_config_branch == '' }}
|
run: |
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
- name: Add Cura private Artifactory remote
|
- name: Add Cura private Artifactory remote
|
||||||
run: conan remote add cura-private https://ultimaker.jfrog.io/artifactory/api/conan/cura-private True
|
run: conan remote add cura-private https://ultimaker.jfrog.io/artifactory/api/conan/cura-private True
|
||||||
|
|
||||||
- name: Export the Package (binaries)
|
- name: Export the Package (binaries)
|
||||||
if: ${{ inputs.conan_export_binaries }}
|
if: ${{ inputs.conan_export_binaries }}
|
||||||
run: conan create . ${{ inputs.recipe_id_full }} --build=missing --update
|
run: conan create . ${{ inputs.recipe_id_full }} --build=missing --update -c tools.build:skip_test=True
|
||||||
|
|
||||||
- name: Export the Package
|
- name: Export the Package
|
||||||
if: ${{ !inputs.conan_export_binaries }}
|
if: ${{ !inputs.conan_export_binaries }}
|
||||||
run: conan export . ${{ inputs.recipe_id_full }}
|
run: conan export . ${{ inputs.recipe_id_full }}
|
||||||
|
|
||||||
- name: Create the latest alias
|
- name: Create the latest alias
|
||||||
if: always()
|
if: always()
|
||||||
run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}
|
run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}
|
||||||
|
|
||||||
- name: Upload the Package(s)
|
- name: Upload the Package(s)
|
||||||
if: ${{ always() && inputs.conan_upload_community }}
|
if: ${{ always() && inputs.conan_upload_community }}
|
||||||
run: |
|
run: |
|
||||||
conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
|
conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
|
||||||
conan upload ${{ inputs.recipe_id_latest }} -r cura -c
|
conan upload ${{ inputs.recipe_id_latest }} -r cura -c
|
||||||
|
|
||||||
- name: Upload the Package(s) to the private Artifactory
|
- name: Upload the Package(s) to the private Artifactory
|
||||||
if: ${{ always() && ! inputs.conan_upload_community }}
|
if: ${{ always() && ! inputs.conan_upload_community }}
|
||||||
run: |
|
run: |
|
||||||
conan upload ${{ inputs.recipe_id_full }} -r cura-private --all -c
|
conan upload ${{ inputs.recipe_id_full }} -r cura-private --all -c
|
||||||
conan upload ${{ inputs.recipe_id_latest }} -r cura-private -c
|
conan upload ${{ inputs.recipe_id_latest }} -r cura-private -c
|
||||||
|
513
.github/workflows/linux.yml
vendored
513
.github/workflows/linux.yml
vendored
@ -2,270 +2,263 @@ name: Linux Installer
|
|||||||
run-name: ${{ inputs.cura_conan_version }} for Linux-${{ inputs.architecture }} by @${{ github.actor }}
|
run-name: ${{ inputs.cura_conan_version }} for Linux-${{ inputs.architecture }} by @${{ github.actor }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Architecture'
|
description: 'Architecture'
|
||||||
required: true
|
required: true
|
||||||
default: 'X64'
|
default: 'X64'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- X64
|
- X64
|
||||||
operating_system:
|
operating_system:
|
||||||
description: 'OS'
|
description: 'OS'
|
||||||
required: true
|
required: true
|
||||||
default: 'ubuntu-22.04'
|
default: 'ubuntu-22.04'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
cura_conan_version:
|
cura_conan_version:
|
||||||
description: 'Cura Conan Version'
|
description: 'Cura Conan Version'
|
||||||
default: 'cura/latest@ultimaker/testing'
|
default: 'cura/latest@ultimaker/testing'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
conan_args:
|
conan_args:
|
||||||
description: 'Conan args: eq.: --require-override'
|
description: 'Conan args: eq.: --require-override'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
enterprise:
|
enterprise:
|
||||||
description: 'Build Cura as an Enterprise edition'
|
description: 'Build Cura as an Enterprise edition'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
staging:
|
staging:
|
||||||
description: 'Use staging API'
|
description: 'Use staging API'
|
||||||
default: false
|
default: false
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Architecture'
|
description: 'Architecture'
|
||||||
required: true
|
required: true
|
||||||
default: 'X64'
|
default: 'X64'
|
||||||
type: string
|
type: string
|
||||||
operating_system:
|
operating_system:
|
||||||
description: 'OS'
|
description: 'OS'
|
||||||
required: true
|
required: true
|
||||||
default: 'ubuntu-22.04'
|
default: 'ubuntu-22.04'
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
||||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
|
||||||
ENTERPRISE: ${{ inputs.enterprise }}
|
ENTERPRISE: ${{ inputs.enterprise }}
|
||||||
STAGING: ${{ inputs.staging }}
|
STAGING: ${{ inputs.staging }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cura-installer-create:
|
cura-installer-create:
|
||||||
runs-on: ${{ inputs.operating_system }}
|
runs-on: ${{ inputs.operating_system }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Setup Python and pip
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
|
||||||
python-version: '3.10.x'
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Install Python requirements for runner
|
|
||||||
run: pip install -r .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Cache Conan local repository packages (Bash)
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
$HOME/.conan/data
|
|
||||||
$HOME/.conan/conan_download_cache
|
|
||||||
key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
|
|
||||||
|
|
||||||
- name: Hack needed specifically for ubuntu-22.04 from mid-Feb 2023 onwards
|
|
||||||
if: ${{ startsWith(inputs.operating_system, 'ubuntu-22.04') }}
|
|
||||||
run: sudo apt remove libodbc2 libodbcinst2 unixodbc-common -y
|
|
||||||
|
|
||||||
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
|
||||||
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
|
||||||
- name: Install Linux system requirements
|
|
||||||
run: |
|
|
||||||
sudo rm /var/cache/debconf/config.dat
|
|
||||||
sudo dpkg --configure -a
|
|
||||||
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 -y
|
|
||||||
wget --no-check-certificate --quiet https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O $GITHUB_WORKSPACE/appimagetool
|
|
||||||
chmod +x $GITHUB_WORKSPACE/appimagetool
|
|
||||||
echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install GCC-12 on ubuntu-22.04
|
|
||||||
if: ${{ startsWith(inputs.operating_system, 'ubuntu-22.04') }}
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Use GCC-10 on ubuntu-20.04
|
|
||||||
if: ${{ startsWith(inputs.operating_system, 'ubuntu-20.04') }}
|
|
||||||
run: |
|
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
|
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
|
|
||||||
|
|
||||||
- name: Create the default Conan profile
|
|
||||||
run: conan profile new default --detect --force
|
|
||||||
|
|
||||||
- name: Configure GPG Key Linux (Bash)
|
|
||||||
run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import
|
|
||||||
|
|
||||||
- name: Get Conan configuration
|
|
||||||
run: |
|
|
||||||
conan config install https://github.com/Ultimaker/conan-config.git
|
|
||||||
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
|
||||||
|
|
||||||
- name: Use Conan download cache (Bash)
|
|
||||||
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
|
||||||
|
|
||||||
- name: Create the Packages (Bash)
|
|
||||||
run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"
|
|
||||||
|
|
||||||
- name: Upload the Package(s)
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
conan upload "*" -r cura --all -c
|
|
||||||
|
|
||||||
- name: Set Environment variables for Cura (bash)
|
|
||||||
run: |
|
|
||||||
. ./cura_inst/bin/activate_github_actions_env.sh
|
|
||||||
. ./cura_inst/bin/activate_github_actions_version_env.sh
|
|
||||||
|
|
||||||
# FIXME: This is a workaround to ensure that we use and pack a shared library for OpenSSL 1.1.1l. We currently compile
|
|
||||||
# OpenSSL statically for CPython, but our Python Dependenies (such as PyQt6) require a shared library.
|
|
||||||
# Because Conan won't allow for building the same library with two different options (easily) we need to install it explicitly
|
|
||||||
# and do a manual copy to the VirtualEnv, such that Pyinstaller can find it.
|
|
||||||
|
|
||||||
- name: Install OpenSSL shared
|
|
||||||
run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
|
|
||||||
|
|
||||||
- name: Copy OpenSSL shared (Bash)
|
|
||||||
run: |
|
|
||||||
cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
|
|
||||||
cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true
|
|
||||||
|
|
||||||
- name: Create the Cura dist
|
|
||||||
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
|
||||||
|
|
||||||
- name: Output the name file name and extension
|
|
||||||
id: filename
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
|
|
||||||
if "${{ inputs.operating_system }}" == "ubuntu-22.04":
|
|
||||||
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-${{ inputs.architecture }}"
|
|
||||||
else:
|
|
||||||
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-${{ inputs.architecture }}"
|
|
||||||
output_env = os.environ["GITHUB_OUTPUT"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(output_env):
|
|
||||||
with open(output_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
with open(output_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines(f"INSTALLER_FILENAME={installer_filename}\n")
|
|
||||||
|
|
||||||
- name: Summarize the used Conan dependencies
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
|
||||||
conan_info = {"installed": []}
|
|
||||||
if os.path.exists(conan_install_info_path):
|
|
||||||
with open(conan_install_info_path, "r") as f:
|
|
||||||
conan_info = json.load(f)
|
|
||||||
sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
|
|
||||||
|
|
||||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(summary_env):
|
|
||||||
with open(summary_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
|
|
||||||
with open(summary_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
|
|
||||||
f.writelines("## Conan packages:\n")
|
|
||||||
for dep in sorted_deps:
|
|
||||||
f.writelines(f"`{dep}`\n")
|
|
||||||
|
|
||||||
- name: Summarize the used Python modules
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import pkg_resources
|
|
||||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
|
||||||
content = ""
|
|
||||||
if os.path.exists(summary_env):
|
|
||||||
with open(summary_env, "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
|
|
||||||
with open(summary_env, "w") as f:
|
|
||||||
f.write(content)
|
|
||||||
f.writelines("## Python modules:\n")
|
|
||||||
for package in pkg_resources.working_set:
|
|
||||||
f.writelines(f"`{package.key}/{package.version}`\n")
|
|
||||||
|
|
||||||
- name: Create the Linux AppImage (Bash)
|
|
||||||
run: |
|
|
||||||
python ../cura_inst/packaging/AppImage/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 AppImage
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-AppImage
|
|
||||||
path: |
|
|
||||||
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
notify-export:
|
|
||||||
if: ${{ always() }}
|
|
||||||
needs: [ cura-installer-create ]
|
|
||||||
|
|
||||||
uses: ultimaker/cura/.github/workflows/notify.yml@main
|
|
||||||
with:
|
with:
|
||||||
success: ${{ contains(join(needs.*.result, ','), 'success') }}
|
python-version: '3.10.x'
|
||||||
success_title: "Create the Cura distributions"
|
cache: 'pip'
|
||||||
success_body: "Installers for ${{ inputs.cura_conan_version }}"
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
failure_title: "Failed to create the Cura distributions"
|
|
||||||
failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
|
- name: Install Python requirements for runner
|
||||||
secrets: inherit
|
run: pip install -r .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
|
- name: Cache Conan local repository packages (Bash)
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
$HOME/.conan/data
|
||||||
|
$HOME/.conan/conan_download_cache
|
||||||
|
key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
|
||||||
|
|
||||||
|
- name: Hack needed specifically for ubuntu-22.04 from mid-Feb 2023 onwards
|
||||||
|
if: ${{ startsWith(inputs.operating_system, 'ubuntu-22.04') }}
|
||||||
|
run: sudo apt remove libodbc2 libodbcinst2 unixodbc-common -y
|
||||||
|
|
||||||
|
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
||||||
|
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
||||||
|
- name: Install Linux system requirements
|
||||||
|
run: |
|
||||||
|
sudo rm /var/cache/debconf/config.dat
|
||||||
|
sudo dpkg --configure -a
|
||||||
|
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 -y
|
||||||
|
wget --no-check-certificate --quiet https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O $GITHUB_WORKSPACE/appimagetool
|
||||||
|
chmod +x $GITHUB_WORKSPACE/appimagetool
|
||||||
|
echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Install GCC-13
|
||||||
|
run: |
|
||||||
|
sudo apt install g++-13 gcc-13 -y
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
||||||
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
||||||
|
|
||||||
|
- name: Create the default Conan profile
|
||||||
|
run: conan profile new default --detect --force
|
||||||
|
|
||||||
|
- name: Configure GPG Key Linux (Bash)
|
||||||
|
run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import
|
||||||
|
|
||||||
|
- name: Get Conan configuration
|
||||||
|
run: |
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
|
- name: Use Conan download cache (Bash)
|
||||||
|
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
||||||
|
|
||||||
|
- name: Create the Packages (Bash)
|
||||||
|
run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"
|
||||||
|
|
||||||
|
- name: Upload the Package(s)
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
conan upload "*" -r cura --all -c
|
||||||
|
|
||||||
|
- name: Set Environment variables for Cura (bash)
|
||||||
|
run: |
|
||||||
|
. ./cura_inst/bin/activate_github_actions_env.sh
|
||||||
|
. ./cura_inst/bin/activate_github_actions_version_env.sh
|
||||||
|
|
||||||
|
# FIXME: This is a workaround to ensure that we use and pack a shared library for OpenSSL 1.1.1l. We currently compile
|
||||||
|
# OpenSSL statically for CPython, but our Python Dependenies (such as PyQt6) require a shared library.
|
||||||
|
# Because Conan won't allow for building the same library with two different options (easily) we need to install it explicitly
|
||||||
|
# and do a manual copy to the VirtualEnv, such that Pyinstaller can find it.
|
||||||
|
|
||||||
|
- name: Install OpenSSL shared
|
||||||
|
run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
|
||||||
|
|
||||||
|
- name: Copy OpenSSL shared (Bash)
|
||||||
|
run: |
|
||||||
|
cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
|
||||||
|
cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true
|
||||||
|
|
||||||
|
- name: Create the Cura dist
|
||||||
|
run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
|
||||||
|
|
||||||
|
- name: Output the name file name and extension
|
||||||
|
id: filename
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
|
||||||
|
if "${{ inputs.operating_system }}" == "ubuntu-22.04":
|
||||||
|
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-${{ inputs.architecture }}"
|
||||||
|
else:
|
||||||
|
installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-${{ inputs.architecture }}"
|
||||||
|
output_env = os.environ["GITHUB_OUTPUT"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(output_env):
|
||||||
|
with open(output_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
with open(output_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines(f"INSTALLER_FILENAME={installer_filename}\n")
|
||||||
|
|
||||||
|
- name: Summarize the used Conan dependencies
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
||||||
|
conan_info = {"installed": []}
|
||||||
|
if os.path.exists(conan_install_info_path):
|
||||||
|
with open(conan_install_info_path, "r") as f:
|
||||||
|
conan_info = json.load(f)
|
||||||
|
sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
|
||||||
|
|
||||||
|
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(summary_env):
|
||||||
|
with open(summary_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
with open(summary_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
|
||||||
|
f.writelines("## Conan packages:\n")
|
||||||
|
for dep in sorted_deps:
|
||||||
|
f.writelines(f"`{dep}`\n")
|
||||||
|
|
||||||
|
- name: Summarize the used Python modules
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import pkg_resources
|
||||||
|
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||||
|
content = ""
|
||||||
|
if os.path.exists(summary_env):
|
||||||
|
with open(summary_env, "r") as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
with open(summary_env, "w") as f:
|
||||||
|
f.write(content)
|
||||||
|
f.writelines("## Python modules:\n")
|
||||||
|
for package in pkg_resources.working_set:
|
||||||
|
f.writelines(f"`{package.key}/{package.version}`\n")
|
||||||
|
|
||||||
|
- name: Create the Linux AppImage (Bash)
|
||||||
|
run: |
|
||||||
|
python ../cura_inst/packaging/AppImage/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 AppImage
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-AppImage
|
||||||
|
path: |
|
||||||
|
dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
notify-export:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: [ cura-installer-create ]
|
||||||
|
|
||||||
|
uses: ultimaker/cura/.github/workflows/notify.yml@main
|
||||||
|
with:
|
||||||
|
success: ${{ contains(join(needs.*.result, ','), 'success') }}
|
||||||
|
success_title: "Create the Cura distributions"
|
||||||
|
success_body: "Installers for ${{ inputs.cura_conan_version }}"
|
||||||
|
failure_title: "Failed to create the Cura distributions"
|
||||||
|
failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
|
||||||
|
secrets: inherit
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
conan==1.60.2
|
conan>=1.60.2,<2.0.0
|
||||||
sip
|
sip
|
||||||
|
278
.github/workflows/unit-test.yml
vendored
278
.github/workflows/unit-test.yml
vendored
@ -2,163 +2,165 @@
|
|||||||
name: unit-test
|
name: unit-test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
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/unit-test.yml'
|
- '.github/workflows/unit-test.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]+'
|
||||||
tags:
|
tags:
|
||||||
- '[0-9]+.[0-9]+.[0-9]+'
|
- '[0-9]+.[0-9]+.[0-9]+'
|
||||||
- '[0-9]+.[0-9]+-beta'
|
- '[0-9]+.[0-9]+-beta'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'plugins/**'
|
- 'plugins/**'
|
||||||
- 'resources/**'
|
- 'resources/**'
|
||||||
- 'cura/**'
|
- 'cura/**'
|
||||||
- 'icons/**'
|
- 'icons/**'
|
||||||
- 'tests/**'
|
- 'tests/**'
|
||||||
- 'packaging/**'
|
- 'packaging/**'
|
||||||
- '.github/workflows/conan-*.yml'
|
- '.github/workflows/conan-*.yml'
|
||||||
- '.github/workflows/unit-test.yml'
|
- '.github/workflows/unit-test.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
|
||||||
- '[1-9]+.[0-9]+'
|
- '[1-9]+.[0-9]+'
|
||||||
tags:
|
tags:
|
||||||
- '[0-9]+.[0-9]+.[0-9]+'
|
- '[0-9]+.[0-9]+.[0-9]+'
|
||||||
- '[0-9]+.[0-9]+-beta'
|
- '[0-9]+.[0-9]+-beta'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
|
||||||
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
|
CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
|
||||||
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
|
CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
|
||||||
CONAN_LOG_RUN_TO_OUTPUT: 1
|
CONAN_LOG_RUN_TO_OUTPUT: 1
|
||||||
CONAN_LOGGING_LEVEL: info
|
CONAN_LOGGING_LEVEL: info
|
||||||
CONAN_NON_INTERACTIVE: 1
|
CONAN_NON_INTERACTIVE: 1
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
conan-recipe-version:
|
conan-recipe-version:
|
||||||
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
|
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
|
||||||
|
with:
|
||||||
|
project_name: cura
|
||||||
|
|
||||||
|
testing:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs: [ conan-recipe-version ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
project_name: cura
|
fetch-depth: 2
|
||||||
|
|
||||||
testing:
|
- name: Setup Python and pip
|
||||||
runs-on: ubuntu-22.04
|
uses: actions/setup-python@v4
|
||||||
needs: [ conan-recipe-version ]
|
with:
|
||||||
|
python-version: '3.11.x'
|
||||||
|
architecture: 'x64'
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
steps:
|
- name: Install Python requirements and Create default Conan profile
|
||||||
- name: Checkout
|
run: pip install -r requirements-conan-package.txt
|
||||||
uses: actions/checkout@v3
|
working-directory: .github/workflows/
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Use Conan download cache (Bash)
|
||||||
uses: actions/setup-python@v4
|
if: ${{ runner.os != 'Windows' }}
|
||||||
with:
|
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
||||||
python-version: '3.11.x'
|
|
||||||
architecture: 'x64'
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
|
||||||
|
|
||||||
- name: Install Python requirements and Create default Conan profile
|
- name: Cache Conan local repository packages (Bash)
|
||||||
run: pip install -r requirements-conan-package.txt
|
uses: actions/cache@v3
|
||||||
working-directory: .github/workflows/
|
if: ${{ runner.os != 'Windows' }}
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
$HOME/.conan/data
|
||||||
|
$HOME/.conan/conan_download_cache
|
||||||
|
key: conan-${{ runner.os }}-${{ runner.arch }}-unit-cache
|
||||||
|
|
||||||
- name: Use Conan download cache (Bash)
|
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
||||||
if: ${{ runner.os != 'Windows' }}
|
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
||||||
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
|
- name: Install Linux system requirements
|
||||||
|
if: ${{ runner.os == 'Linux' }}
|
||||||
|
run: |
|
||||||
|
sudo rm /var/cache/debconf/config.dat
|
||||||
|
sudo dpkg --configure -a
|
||||||
|
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 -y
|
||||||
|
|
||||||
- name: Cache Conan local repository packages (Bash)
|
- name: Install GCC-13
|
||||||
uses: actions/cache@v3
|
run: |
|
||||||
if: ${{ runner.os != 'Windows' }}
|
sudo apt install g++-13 gcc-13 -y
|
||||||
with:
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
||||||
path: |
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
||||||
$HOME/.conan/data
|
|
||||||
$HOME/.conan/conan_download_cache
|
|
||||||
key: conan-${{ runner.os }}-${{ runner.arch }}-unit-cache
|
|
||||||
|
|
||||||
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
- name: Get Conan configuration
|
||||||
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
run: |
|
||||||
- name: Install Linux system requirements
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
if: ${{ runner.os == 'Linux' }}
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
run: |
|
|
||||||
sudo rm /var/cache/debconf/config.dat
|
|
||||||
sudo dpkg --configure -a
|
|
||||||
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 -y
|
|
||||||
|
|
||||||
- name: Install GCC-12 on ubuntu-22.04
|
- name: Get Conan profile
|
||||||
run: |
|
run: conan profile new default --detect --force
|
||||||
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
|
|
||||||
|
|
||||||
- name: Get Conan configuration
|
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git
|
|
||||||
|
|
||||||
- name: Get Conan profile
|
- name: Install dependencies
|
||||||
run: conan profile new default --detect --force
|
run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o cura:devtools=True -g VirtualPythonEnv -if venv
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Upload the Dependency package(s)
|
||||||
run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o cura:devtools=True -g VirtualPythonEnv -if venv
|
run: conan upload "*" -r cura --all -c
|
||||||
|
|
||||||
- name: Upload the Dependency package(s)
|
- name: Set Environment variables for Cura (bash)
|
||||||
run: conan upload "*" -r cura --all -c
|
if: ${{ runner.os != 'Windows' }}
|
||||||
|
run: |
|
||||||
|
. ./venv/bin/activate_github_actions_env.sh
|
||||||
|
|
||||||
- name: Set Environment variables for Cura (bash)
|
- name: Run Unit Test
|
||||||
if: ${{ runner.os != 'Windows' }}
|
id: run-test
|
||||||
run: |
|
run: |
|
||||||
. ./venv/bin/activate_github_actions_env.sh
|
pytest --junitxml=junit_cura.xml
|
||||||
|
working-directory: tests
|
||||||
|
|
||||||
- name: Run Unit Test
|
- name: Save PR metadata
|
||||||
id: run-test
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
pytest --junitxml=junit_cura.xml
|
echo ${{ github.event.number }} > pr-id.txt
|
||||||
working-directory: tests
|
echo ${{ github.event.pull_request.head.repo.full_name }} > pr-head-repo.txt
|
||||||
|
echo ${{ github.event.pull_request.head.ref }} > pr-head-ref.txt
|
||||||
|
working-directory: tests
|
||||||
|
|
||||||
- name: Save PR metadata
|
- name: Upload Test Results
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
uses: actions/upload-artifact@v3
|
||||||
echo ${{ github.event.number }} > pr-id.txt
|
with:
|
||||||
echo ${{ github.event.pull_request.head.repo.full_name }} > pr-head-repo.txt
|
name: test-result
|
||||||
echo ${{ github.event.pull_request.head.ref }} > pr-head-ref.txt
|
path: |
|
||||||
working-directory: tests
|
tests/**/*.xml
|
||||||
|
tests/pr-id.txt
|
||||||
- name: Upload Test Results
|
tests/pr-head-repo.txt
|
||||||
if: always()
|
tests/pr-head-ref.txt
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: test-result
|
|
||||||
path: |
|
|
||||||
tests/**/*.xml
|
|
||||||
tests/pr-id.txt
|
|
||||||
tests/pr-head-repo.txt
|
|
||||||
tests/pr-head-ref.txt
|
|
||||||
|
141
.github/workflows/update-translation.yml
vendored
141
.github/workflows/update-translation.yml
vendored
@ -1,82 +1,87 @@
|
|||||||
name: update-translations
|
name: update-translations
|
||||||
|
|
||||||
on:
|
on:
|
||||||
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:
|
||||||
- '[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]*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-translations:
|
update-translations:
|
||||||
name: Update translations
|
name: Update translations
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache Conan data
|
- name: Cache Conan data
|
||||||
id: cache-conan
|
id: cache-conan
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.conan
|
path: ~/.conan
|
||||||
key: ${{ runner.os }}-conan
|
key: ${{ runner.os }}-conan
|
||||||
|
|
||||||
- name: Setup Python and pip
|
- name: Setup Python and pip
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.10.x
|
python-version: 3.11.x
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
cache-dependency-path: .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
- name: Install Python requirements for runner
|
- name: Install Python requirements for runner
|
||||||
run: pip install -r .github/workflows/requirements-conan-package.txt
|
run: pip install -r .github/workflows/requirements-conan-package.txt
|
||||||
|
|
||||||
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
# NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
|
||||||
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
# This is maybe because grub caches the disk it uses last time, which is recreated each time.
|
||||||
- name: Install Linux system requirements
|
- name: Install Linux system requirements
|
||||||
if: ${{ runner.os == 'Linux' }}
|
if: ${{ runner.os == 'Linux' }}
|
||||||
run: |
|
run: |
|
||||||
sudo rm /var/cache/debconf/config.dat
|
sudo rm /var/cache/debconf/config.dat
|
||||||
sudo dpkg --configure -a
|
sudo dpkg --configure -a
|
||||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade
|
sudo apt upgrade
|
||||||
sudo apt install efibootmgr 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 g++-12 gcc-12 -y
|
sudo apt install efibootmgr 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 g++-12 gcc-12 -y
|
||||||
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
|
|
||||||
|
|
||||||
- name: Create the default Conan profile
|
- name: Install GCC-13
|
||||||
run: conan profile new default --detect --force
|
run: |
|
||||||
|
sudo apt install g++-13 gcc-13 -y
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
||||||
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
||||||
|
|
||||||
- name: Get Conan configuration
|
- name: Create the default Conan profile
|
||||||
run: conan config install https://github.com/Ultimaker/conan-config.git
|
run: conan profile new default --detect --force
|
||||||
|
|
||||||
- name: generate the files using Conan install
|
- name: Get Conan configuration
|
||||||
run: conan install . --build=missing --update -o cura:devtools=True
|
run: |
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git
|
||||||
|
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
|
||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
- name: generate the files using Conan install
|
||||||
with:
|
run: conan install . --build=missing --update -o cura:devtools=True
|
||||||
file_pattern: resources/i18n/*.po resources/i18n/*.pot
|
|
||||||
status_options: --untracked-files=no
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
commit_message: update translations
|
with:
|
||||||
|
file_pattern: resources/i18n/*.po resources/i18n/*.pot
|
||||||
|
status_options: --untracked-files=no
|
||||||
|
commit_message: update translations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user