Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Conan, JFrog and GitHub Actions to build and manage Cura (and her dependencies #12708

Merged
merged 384 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
384 commits
Select commit Hold shift + click to select a range
705231d
Copy resources to to correct paths
Jun 27, 2022
da00707
Add requirements.txt as user_info
Jun 27, 2022
0cea013
Move venv creation to UMBaseConanfile
Jun 28, 2022
cdc8fd7
Don't use CuraVersion.py options to calc package_id
Jun 28, 2022
8761a47
Fix height binding loops
Joeydelarago Jun 28, 2022
7700d01
Fix implicitWidth binding loop.
Joeydelarago Jun 28, 2022
5a61c4e
Fix uranium deploy
Jun 28, 2022
aa43287
Only do package-export
Jun 29, 2022
32ed061
Set the runenv for deploy
Jun 29, 2022
91cd709
Properly set background for postprocessing plugin
nallath Jun 29, 2022
2335322
Properly set background for AboutDialog
nallath Jun 29, 2022
8724c8c
Merge branch '5.1' into CURA-9365_fix_building_cura_main
Ghostkeeper Jun 29, 2022
f4ee4ad
Merge pull request #12573 from Ultimaker/CURA-8849_more_intent_fixes
casperlamboo Jun 29, 2022
a5d70dc
Merge pull request #12590 from Ultimaker/CURA-7667_intents_in_packages
casperlamboo Jun 29, 2022
a8a2fd8
Add the "clear" hack to the tableModel for discardOrkeepchanges
nallath Jun 29, 2022
257056a
default ultimaker values result in warnings
rijkvanmanen Jun 28, 2022
67d08fd
increase retract distance of PVA to default
rijkvanmanen Jun 28, 2022
a42a151
increase support horizontal expansion
rijkvanmanen Jun 28, 2022
b147742
reduce minimum support xy distance
rijkvanmanen Jun 28, 2022
5062d70
Add deploy functionality
Jun 29, 2022
ff3a422
Fixed mapping for pyinstaller from source install
Jun 29, 2022
1bb1efd
Store generators in build folder
Jun 29, 2022
2cee093
Map new conan local cache resources
Jun 29, 2022
ed3f342
Search unsecure when not frozen
Jun 29, 2022
a2413f4
Use correct UM qml path
Jun 29, 2022
f745ab7
Add PyQt6 sip to hidden_imports
Jun 29, 2022
a837827
Added extra Uranium cases
Jun 29, 2022
eae1394
Add PyQt6 to hidden imports
Jun 29, 2022
ddb8765
Add two recently introduced material settings
nallath Jun 29, 2022
e0c319e
Grammar and style
Ghostkeeper Jun 30, 2022
d47635c
Removed requirement install from deploy steps.
Jun 30, 2022
6b51753
Renamed folder structure to venv structure
Jun 30, 2022
795814d
Store unmapped settings in a separate set
Ghostkeeper Jun 30, 2022
d20976d
Moved pyinstaller, cura_version generate function
Jun 30, 2022
970e0d8
Add script to package and sign AppImages
Ghostkeeper Jun 22, 2022
254edfd
Fix deleting old files if they exist
Ghostkeeper Jun 30, 2022
f3fd2d6
Fix calling subprocesses
Ghostkeeper Jun 30, 2022
648c1e9
Add main function to make it easier to call this
Ghostkeeper Jun 30, 2022
d07c9d6
Fixed empty source
Jun 30, 2022
a62e5ec
Use package for cura as well
Jun 30, 2022
f4b3256
Add resolve value for Raft Base Wall Count
Ghostkeeper Jun 30, 2022
f2717d1
Add resources for mac dmg creation
casperlamboo Jun 30, 2022
fab86be
Keep settings throughout reserilization process.
rburema Jun 30, 2022
5c1b665
Move resources for mac dmg creation
casperlamboo Jun 30, 2022
394942e
Move resources for mac dmg creation
casperlamboo Jun 30, 2022
c2f3161
Allow providing dist_path and version via command line arguments
Ghostkeeper Jun 30, 2022
047d7b1
Provision desktop file with Jinja to put in version number
Ghostkeeper Jun 30, 2022
72b1097
Add auxiliary files needed for AppImage
Ghostkeeper Jun 30, 2022
a2da68d
Updated mapping of pyinstaller metadata
Jun 30, 2022
afa899c
Add dmg building script 😎
Joeydelarago Jun 30, 2022
724f2ab
Create tcl and tk paths
Jun 30, 2022
5c0f416
Merge pull request #12638 from Ultimaker/CURA-9432_add_extra_material…
nallath Jun 30, 2022
2739057
Copy all shared libs
Jun 30, 2022
12379b1
Use correct key for serialized setting to keep
nallath Jun 30, 2022
b4f3d5c
Use correct paths
Jun 30, 2022
77a72fc
Use correct paths
Jun 30, 2022
c08aa5b
Move icons to icons folder
Joeydelarago Jun 30, 2022
5858349
Update branches of Conan config files to 5.1
Ghostkeeper Jun 30, 2022
e069946
Merge branch 'CURA-9365_fix_building_cura_main' of github.com:Ultimak…
Ghostkeeper Jun 30, 2022
83bad98
Merge branch 'CURA-9365_fix_building_cura_main' into 5.1
Ghostkeeper Jun 30, 2022
cf1e2bd
Add conan_binaries to pyinstaller
Jun 30, 2022
21e69a8
Use bindirs instead of paths
Jun 30, 2022
c4aee2a
Fixed Ultimaker-Cura spec
Jun 30, 2022
6047c10
map binaries to root
Jun 30, 2022
36bcb97
place qoutes around path
jellespijker Jun 30, 2022
7dc4266
single qoutes
jellespijker Jun 30, 2022
f6ca16a
parse tuple not string
jellespijker Jun 30, 2022
e570e3b
Run when jinja changes
jellespijker Jun 30, 2022
cc8f0d3
Add conan binaries to binaries
Jul 1, 2022
055eda2
Added the pyinstaller-hook-contrib
Jul 1, 2022
e9cbad1
Allow for pyinstaller to sign the files on MacOS
Jul 1, 2022
9801402
Moved AppImage files to dedicated folder
Jul 1, 2022
dc8c9bb
Moved MacOS dmg to dedicated folder
Jul 1, 2022
721aff4
Ported nsis scripts and resource from cura-build-environment
Jul 1, 2022
2ea78a3
use package resource folder
Jul 1, 2022
3fe0f26
explicit cast from Path to str
Jul 1, 2022
f3ebf98
Only use upx on Windows
Jul 1, 2022
87a5211
Add osx_bundle_identifier
Jul 1, 2022
f578943
Add target architecture for Macos
Jul 1, 2022
dec5609
Set strip to True for Mac and Linux
Jul 1, 2022
7bc7107
Remove quotes around None value
Jul 1, 2022
e90f751
Added missing comma
Jul 1, 2022
1f629b9
Fixes escaped path's on Windows
Jul 1, 2022
627bd92
Clean the install folder first
Jul 1, 2022
5d057db
Use BUNDLE app for Macos
Jul 1, 2022
5b771e3
Install start menu shortcuts globally
Jul 1, 2022
b6676e7
Run workflow when files in packaging changes
Jul 1, 2022
ff32140
Revert "Clean the install folder first"
jellespijker Jul 1, 2022
9839393
Update SDK version to 8.1.0
Ghostkeeper Jul 1, 2022
b5e0ae8
fixes for Macos
Jul 1, 2022
ac2fbbf
Collect all PyQt6-Qt6 dll's for Win and place them in the root
Jul 1, 2022
ffd6644
Collect all of numpy-stl
Jul 1, 2022
61d276f
Use ultimaker/testing on main/master branches
jellespijker Jul 1, 2022
0580814
Fix passing macos flag to jinja
casperlamboo Jul 1, 2022
cf90334
Fix icon nad bundle identifier in spec file
casperlamboo Jul 1, 2022
4ed1688
Update environment variables
Joeydelarago Jul 1, 2022
085868d
Copy the packaging scripts/resources and set GH env
Jul 1, 2022
f2fa309
Copy the Cura Installer workflow
Jul 1, 2022
2fd1309
Add missing file name
Jul 1, 2022
cbedbbb
Remove brackets around env var name
Jul 1, 2022
f4cad7f
Update change log for 5.1 beta
Ghostkeeper Jul 1, 2022
a9f4d70
Point to correct paths
Jul 1, 2022
578e996
Change source so packaging script can be run from root
Joeydelarago Jul 1, 2022
6693354
Merge remote-tracking branch 'origin/5.1' into 5.1
Joeydelarago Jul 1, 2022
8b8220c
Fix path to icon file
Ghostkeeper Jul 1, 2022
65460a7
Add script to fix code signing for qt packages on mac
casperlamboo Jul 1, 2022
7c1d280
Merge remote-tracking branch 'origin/5.1' into 5.1
casperlamboo Jul 1, 2022
b35a8bf
Create a Linux AppImage
Jul 1, 2022
0aa65cc
Set Mac secrets to environment
Jul 1, 2022
66a38be
Use script this time
Jul 1, 2022
8a3d94d
Install and use the appimagetool
Jul 1, 2022
4b54762
Added build and sign step for the dmg
Jul 1, 2022
42b5aa4
Install GPG key Linux
Jul 1, 2022
0f5e0a8
Speed tweaks
Jul 1, 2022
da14603
Use the gpg private key
Jul 1, 2022
5e8b137
Moved AppImage result parallel to Ultimaker-Cura
Jul 1, 2022
ca36b4f
Set proper background color for open project dialogs.
rburema Jul 1, 2022
3dc6468
Merge pull request #12634 from Ultimaker/CURA-9402_fix_background_dar…
rburema Jul 1, 2022
bbcba0c
Import and unlock Macos keychain
Jul 1, 2022
e843849
Rename unlock Macos keychain
Jul 1, 2022
7ae1b2a
Merge pull request #12635 from Ultimaker/CURA-9270_discard_or_keep_ch…
rburema Jul 1, 2022
79e5950
Use simple import of keychain
Jul 1, 2022
e6855ad
use different pass
jellespijker Jul 1, 2022
4316ad0
Add notarize and sign steps
jellespijker Jul 1, 2022
6a712c5
Do cmds on single line
Jul 1, 2022
e3517a8
fixed $ sign
Jul 1, 2022
6792490
capitalize P arg
Jul 1, 2022
d13c037
changed password arg
Jul 1, 2022
1b96480
try not to unlock
Jul 1, 2022
d449f56
try to unlock
Jul 1, 2022
1aa67b7
Use certificate path
Jul 1, 2022
a56c782
Revert "Use certificate path"
jellespijker Jul 1, 2022
b0286cb
Revert "try to unlock"
jellespijker Jul 1, 2022
253e61c
Don't use collect all on PyQt6
Jul 1, 2022
dee54c4
Use forked pyinstaller with fix
Jul 1, 2022
2cc6cc7
Use macos-keychain GH action
Jul 1, 2022
1c19230
Add keychain ext
Jul 1, 2022
1ddc6c6
Revert "Don't use collect all on PyQt6"
jellespijker Jul 1, 2022
fd55ec7
Add missing create-dmg tool
Jul 1, 2022
6df5072
Added reminder to fix the nightly builds
Jul 4, 2022
2a4c8aa
Set default for 3rd-party printers to Inside-Out
Ghostkeeper Jul 4, 2022
87e304a
Output security response on MacOS
Jul 4, 2022
5bc6132
Also use dylib of cpython
Jul 4, 2022
3d422e1
Copy libs to lib_dir
jellespijker Jul 4, 2022
cd288f3
Use correct bundle id
jellespijker Jul 4, 2022
08c11f0
Use correct bundle id
jellespijker Jul 4, 2022
e226dc5
Also copy build libs
jellespijker Jul 4, 2022
b1af3b6
Broaden scope of tags that get built
Ghostkeeper Jul 5, 2022
54f9384
Use regular Python for the release
jellespijker Jul 5, 2022
d91b93b
Deal with missing build version number
Ghostkeeper Jul 5, 2022
d7f103c
dirty fix build number
jellespijker Jul 5, 2022
f01f978
dirty version hack
jellespijker Jul 5, 2022
f4c2163
removed pound sign from name
jellespijker Jul 5, 2022
bafffa9
Fix toolbar being drawn over monitor page
nallath Jul 5, 2022
9051041
Fix incorrect z_hop speed for alfawise
nallath Jul 5, 2022
16d9dd5
Fix release tag and channel
jellespijker Jul 5, 2022
baec0e7
Merge remote-tracking branch 'origin/5.1' into 5.1
jellespijker Jul 5, 2022
68a7968
Remove hacked version
jellespijker Jul 5, 2022
fd7c5ab
Set build version to 0 if build version is ''
jellespijker Jul 5, 2022
67d840f
Revert "Deal with missing build version number"
jellespijker Jul 5, 2022
03af1db
Use forked pyinstaller
jellespijker Jul 5, 2022
8a14406
Add dynamic libs from lib path to binaries
jellespijker Jul 5, 2022
2ee58e2
Don't strip binaries
Jul 6, 2022
4fb7d0e
Falling back to original Notarizing script
Jul 6, 2022
17d2fb8
Unlock the keychain as late as possible
Jul 6, 2022
bee2b22
uniform name on linux
Jul 6, 2022
feebf6d
uniform name on macos
Jul 6, 2022
44bb953
Fix wrong env variable for bash
jellespijker Jul 6, 2022
13d5d33
Fixed typo
jellespijker Jul 6, 2022
4344ef0
Fixed paths for the dmg_sign_notarize script
jellespijker Jul 6, 2022
bfd1c6e
Use correct env variable MAC_NOTARIZE_PASS
jellespijker Jul 6, 2022
db8ec39
Add conan_install_info.json to the builds
Jul 6, 2022
d3b32b5
Add libxkbcommon-x11-dev to system deps for Ubuntu
Jul 6, 2022
7405b55
Fix missing dash
Jul 6, 2022
c9587c3
convert to posixpath string
Jul 6, 2022
48539bb
Only convert path to string
Jul 6, 2022
b84ee29
ducktype the PyInstaller BUNDLE
Jul 7, 2022
c100f68
Add missing info.plist
Jul 7, 2022
5191d4f
Add missing comma
Jul 7, 2022
4d98ba3
Fixed missing qoutes
Jul 7, 2022
15c1b96
Fix crash if a Digital Library project is made by deleted user
Ghostkeeper Jul 7, 2022
5d5c83e
Add missing background color to WorkspaceSummaryDialog.qml
Joeydelarago Jul 7, 2022
93bcd54
Merge pull request #12695 from Ultimaker/fix_crash_project_deleted_user
nallath Jul 7, 2022
55375a2
increase printing temperature BAM 0.1 layerheight
rijkvanmanen Jul 6, 2022
df5446b
Add unit-tests
Jul 7, 2022
7ed81f0
Also test when unit-test workflow changes
Jul 7, 2022
d84133c
Remove redundant options for conan install
Jul 7, 2022
c16e1fc
Use venv folder
jellespijker Jul 7, 2022
dea2247
Use the exported package
Jul 7, 2022
ab4c62e
Also create package when unit-test workflow is changed
Jul 7, 2022
c22999c
handle local packages correctly
Jul 7, 2022
cbe8a90
Use local folder
Jul 7, 2022
593ba0e
Revert "Also create package when unit-test workflow is changed"
jellespijker Jul 7, 2022
82904cc
Fix version if version is None
Jul 7, 2022
1c77eb0
Use VirtualPythonEnv
Jul 7, 2022
8500e34
Use the app_root to obtain the resources
Jul 8, 2022
1066e6a
Add libEGL to system deps for Linux
Jul 8, 2022
9c0671f
Remove unnedeeded default_value overide
nallath Jul 8, 2022
afed961
Change default_value to value
nallath Jul 8, 2022
ce136fa
Bump version number of jgaurora profile
nallath Jul 8, 2022
4656ba0
Remove deleted setting from profiles
nallath Jul 8, 2022
c75268d
Change default_value to value for elegoo_neptune for infill_pattern
nallath Jul 8, 2022
117e997
Fix Convex hull decorator tests
nallath Jun 17, 2022
0c37fe3
Fix position of extruder elegoo
nallath Jul 8, 2022
e73a18a
Fix elegoo definitions
nallath Jul 8, 2022
1f1ee7f
Fix buildvolume tests
nallath Jul 8, 2022
6a36840
Use optional assert message instead of print
nallath Jul 8, 2022
3cb58c6
Updated conandata to run from main
Jul 8, 2022
ed02364
Add requests to requirements
Jul 8, 2022
9b8f4b5
Add twisted to requirements
Jul 8, 2022
8b5ed4b
Downgrade urllib3 to 1.25.9
Jul 8, 2022
8750c21
Added missing indirect pip requirements
Jul 8, 2022
f9d4628
Merge branch 'main' into CURA-9365
jellespijker Jul 8, 2022
cda4cdf
Make release branch detection generic
Jul 8, 2022
70c4125
sanitize versioning naming of pr events
Jul 8, 2022
0d04f3e
Remove pull request alias
Jul 8, 2022
f9b7d74
Use full pr number
Jul 8, 2022
349eac5
Use conan-recipe-version from CURA-9365 branch
Jul 8, 2022
eb943f7
Added missing quote character
Jul 8, 2022
6e46d35
Added missing closing braces
Jul 8, 2022
23234ea
Fix for short branch names
Jul 8, 2022
5f12f1f
Fix brackets
Jul 8, 2022
1d3693c
Prepend pr_ for pull_request
Jul 8, 2022
0a1452d
Simplified set-output for channel
Jul 8, 2022
4d501e8
Don't use _ for pr
Jul 8, 2022
ce68620
specify output name
Jul 8, 2022
85d3bb1
Add pull_request against main branches
Jul 8, 2022
7e35a0e
Remove buildmeta when PR
Jul 8, 2022
e82cc1c
Add 5.1.0-alpha
Jul 8, 2022
b482b4d
sync requirements with Uranium
Jul 8, 2022
613d397
Don't run with the conan config for powershell
Jul 8, 2022
43d9174
Use custom versioning system
Jul 12, 2022
4fd744c
use the first index
Jul 12, 2022
a1c39c7
Count from the latest stable release
Jul 12, 2022
0a000a7
Use the input for the project name
Jul 12, 2022
90336ce
Use the latest prerelease but count from the latest stable
Jul 12, 2022
52636dc
fix typo
Jul 12, 2022
15c6771
Count from latest tag
Jul 12, 2022
6c4e85b
Get correct issue number from PR
Jul 12, 2022
b56b65a
use the job outputs
Jul 12, 2022
80c3a1d
remove single quotes
Jul 12, 2022
bedcb8b
Delete fix_app_qt_folder_names_for_codesign.py
casperlamboo Jul 12, 2022
6991305
Update .github/workflows/conan-package.yml
jellespijker Jul 12, 2022
7aebfac
Update .github/workflows/unit-test.yml
jellespijker Jul 12, 2022
4fdd78e
Update .github/workflows/unit-test.yml
jellespijker Jul 12, 2022
550d4b8
Update .github/workflows/unit-test.yml
jellespijker Jul 12, 2022
56659ce
Update .gitignore
jellespijker Jul 12, 2022
596bfe8
Fix version number matching
casperlamboo Jul 13, 2022
91a830a
Fix version number matching
casperlamboo Jul 13, 2022
c66ea0a
Merge branch 'main' into CURA-9365
Joeydelarago Jul 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/ci.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/conan-package-create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Create and Upload Conan package

on:
workflow_call:
inputs:
recipe_id_full:
required: true
type: string

runs_on:
required: true
type: string

python_version:
required: true
type: string

conan_config_branch:
required: false
type: string

conan_logging_level:
required: false
type: string

conan_clean_local_cache:
required: false
type: boolean
default: false

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

jobs:
conan-package-create:
runs-on: ${{ inputs.runs_on }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python and pip
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-conan-package.txt

- name: Install Python requirements and Create default Conan profile
run: |
pip install -r .github/workflows/requirements-conan-package.txt
conan profile new default --detect

- name: Use Conan download cache (Bash)
if: ${{ runner.os != 'Windows' }}
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"

- name: Use Conan download cache (Powershell)
if: ${{ runner.os == 'Windows' }}
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
run: conan config set storage.download_cache="%HOMEPATH%\.conan\conan_download_cache"

why not use %HOMEPATH% here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I ran to issues with it early on.

Try changing it, but
If anything we should use the PowerShell env naming scheme: $Env:<name>, since Windows uses the PowerShell by default

casperlamboo marked this conversation as resolved.
Show resolved Hide resolved

- name: Cache Conan local repository packages (Bash)
uses: actions/cache@v3
if: ${{ runner.os != 'Windows' }}
with:
path: |
$HOME/.conan/data
$HOME/.conan/conan_download_cache
key: conan-${{ runner.os }}-${{ runner.arch }}

- name: Cache Conan local repository packages (Powershell)
uses: actions/cache@v3
if: ${{ runner.os == 'Windows' }}
with:
path: |
C:\Users\runneradmin\.conan\data
casperlamboo marked this conversation as resolved.
Show resolved Hide resolved
C:\.conan
C:\Users\runneradmin\.conan\conan_download_cache
key: conan-${{ runner.os }}-${{ runner.arch }}

- name: Install MacOS system requirements
if: ${{ runner.os == 'Macos' }}
run: brew install autoconf automake ninja

- name: Install Linux system requirements
if: ${{ runner.os == 'Linux' }}
run: 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 -y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe these dependencies can be stored similar to the requirements.txt we have for our python dependencies. In my opinion such a file is much more maintainable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an Ubuntu-man myself if we can store these in a system deps file, then I'm all for it. But I myself don't have a ready made solution for this in mind.

Maybe you guys can look into that


- name: Clean Conan local cache
if: ${{ inputs.conan_clean_local_cache }}
run: conan remove "*" -f

- name: Get Conan configuration from branch
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
if: ${{ inputs.conan_config_branch == '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git

- name: Create the Packages
run: conan install ${{ inputs.recipe_id_full }} --build=missing --update

- name: Upload the Package(s)
if: always()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if: always() means it will run any way even if the previous steps fails? I have two questions here.

  • There is no need property associated with "Upload the Package(s)" so there are no previous steps, I would imagine there is only some thing to upload after the packages have been created so i would have expected a `needs property here.
  • Why do we want an always here? I would expect that we don't want to upload packages that failed to generate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If creating a package from the current project fails, then we still could have build binaries from depending Conan packages. By ensuring that these are uploaded you will have a quicker subsequent run, were it doesn't need to rebuild those but they can be downloaded.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The need is only associated with jobs, while the steps are performed in sequence anyhow. Atleast after a success from the previous step (or when set with always()

run: |
conan upload "*" -r cura --all -c
conan upload "*" -r cura-ce -c
108 changes: 108 additions & 0 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
name: conan-package

# Exports the recipe, sources and binaries for Mac, Windows and Linux and upload these to the server such that these can
# be used downstream.
#
# It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches

on:
workflow_dispatch:
inputs:
create_binaries_windows:
required: true
default: false
description: 'create binaries Windows'
create_binaries_linux:
required: true
default: false
description: 'create binaries Linux'
create_binaries_macos:
required: true
default: false
description: 'create binaries Macos'

push:
paths:
- 'plugins/**'
- 'resources/**'
- 'cura/**'
- 'icons/**'
- 'tests/**'
- 'packaging/**'
- '.github/workflows/conan-*.yml'
- '.github/workflows/notify.yml'
- '.github/workflows/requirements-conan-package.txt'
- 'requirements*.txt'
- 'conanfile.py'
- 'conandata.yml'
- 'GitVersion.yml'
- '*.jinja'
branches:
- main
- 'CURA-*'
- '[1-9]+.[0-9]+'
casperlamboo marked this conversation as resolved.
Show resolved Hide resolved
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+-beta'

jobs:
conan-recipe-version:
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@CURA-9365
with:
project_name: cura

conan-package-export-macos:
needs: [ conan-recipe-version ]
uses: ultimaker/cura/.github/workflows/[email protected]
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
runs_on: 'macos-10.15'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
conan_export_binaries: true
secrets: inherit

conan-package-export-linux:
needs: [ conan-recipe-version ]
uses: ultimaker/cura/.github/workflows/[email protected]
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
runs_on: 'ubuntu-20.04'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
conan_export_binaries: true
secrets: inherit

conan-package-export-windows:
needs: [ conan-recipe-version ]
uses: ultimaker/cura/.github/workflows/[email protected]
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
runs_on: 'windows-2022'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
conan_export_binaries: true
secrets: inherit
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved

notify-export:
if: ${{ always() }}
jellespijker marked this conversation as resolved.
Show resolved Hide resolved
needs: [ conan-package-export-linux, conan-package-export-macos, conan-package-export-windows ]

uses: ultimaker/cura/.github/workflows/[email protected]
with:
success: ${{ contains(join(needs.*.result, ','), 'success') }}
success_title: "New Conan recipe exported in ${{ github.repository }}"
success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
failure_title: "Failed to export Conan Export in ${{ github.repository }}"
failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
secrets: inherit
101 changes: 101 additions & 0 deletions .github/workflows/conan-recipe-export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Export Conan Recipe to server

on:
workflow_call:
inputs:
recipe_id_full:
required: true
type: string

recipe_id_latest:
required: false
type: string

recipe_id_pr:
required: false
type: string

runs_on:
required: true
type: string

python_version:
required: true
type: string

conan_config_branch:
required: false
type: string

conan_logging_level:
required: false
type: string

conan_export_binaries:
required: false
type: boolean

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

jobs:
package-export:
runs-on: ${{ inputs.runs_on }}

steps:
- name: Checkout project
uses: actions/checkout@v3

- name: Setup Python and pip
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-conan-package.txt

- name: Install Python requirements and Create default Conan profile
run: |
pip install -r .github/workflows/requirements-conan-package.txt
conan profile new default --detect

- name: Cache Conan local repository packages
uses: actions/cache@v3
with:
path: $HOME/.conan/data
key: ${{ runner.os }}-conan

- name: Get Conan configuration from branch
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
if: ${{ inputs.conan_config_branch == '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git

- name: Export the Package (binaries)
if: ${{ inputs.conan_export_binaries == 'true' }}
run: conan export-pkg . ${{ inputs.recipe_id_full }}

- name: Export the Package
if: ${{ inputs.conan_export_binaries != 'true' && github.event_name != 'pull_request' }}
run: conan export . ${{ inputs.recipe_id_full }}

- name: Create the latest alias
if: ${{ inputs.recipe_id_latest != '' && github.event_name != 'pull_request' }}
run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}

- name: Create the pull request alias
if: ${{ inputs.recipe_id_pr != '' && github.event_name == 'pull_request' }}
run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}

- name: Upload the Package(s)
run: |
# Only use --all (upload binaries) for the cura repository
conan upload "*" -r cura --all -c
conan upload "*" -r cura-ce -c
Loading