@@ -24,10 +24,6 @@ permissions:
2424 contents : write
2525 deployments : write
2626
27- env :
28- CONAN_LOGIN_USERNAME : ${{ secrets.CONAN_USER }}
29- CONAN_PASSWORD : ${{ secrets.CONAN_PASS }}
30-
3127# TODO: Make cura-workflows/benchmark.yml generic enough to fit the gcodeanalyzer benchmark
3228
3329jobs :
@@ -39,32 +35,19 @@ jobs:
3935 needs : [ check_actor ]
4036 if : ${{ needs.check_actor.outputs.proceed == 'true' }}
4137 uses : ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main
42- with :
43- project_name : curaengine
4438
4539 gcodeanalyzer :
4640 needs : [ conan-recipe-version ]
4741 name : Run GCodeAnalyzer on the engine
4842 runs-on : ubuntu-latest
4943 steps :
50- - name : Checkout repo
51- uses : actions/checkout@v4
52- if : ${{ github.event.pull_request.head.repo.full_name == github.repository }}
44+ - name : Setup the build environment
45+ uses : ultimaker/cura-workflows/.github/actions/setup-build-environment@main
5346 with :
54- path : ' CuraEngine'
55- fetch-depth : 1
56- ref : ${{ github.head_ref }}
57-
58- - name : Checkout repo PR
59- uses : actions/checkout@v4
60- if : ${{ github.event.pull_request.head.repo.full_name != github.repository }}
61- with :
62- path : ' CuraEngine'
63- fetch-depth : 1
64- ref : ${{ github.base_ref }}
47+ install_system_dependencies : true
6548
6649 - name : Checkout GCodeAnalyzer
67- uses : actions/checkout@v3
50+ uses : actions/checkout@v4
6851 with :
6952 repository : ' Ultimaker/GCodeAnalyzer'
7053 ref : ' main'
@@ -73,95 +56,31 @@ jobs:
7356 token : ${{ secrets.CURA_BENCHMARK_PAT }}
7457
7558 - name : Checkout Test Models
76- uses : actions/checkout@v3
59+ uses : actions/checkout@v4
7760 with :
7861 repository : ' Ultimaker/NightlyTestModels'
7962 ref : ' main'
8063 path : ' NightlyTestModels'
8164 fetch-depth : 1
8265 token : ${{ secrets.GITHUB_TOKEN }}
8366
84- - name : Sync pip requirements
85- run : curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/.github/workflows/requirements-runner.txt
86- working-directory : CuraEngine/.github/workflows
87-
88- - name : Setup Python and pip
89- uses : actions/setup-python@v4
90- with :
91- python-version : 3.11.x
92- cache : pip
93- cache-dependency-path : CuraEngine/.github/workflows/requirements-runner.txt
94-
95- - name : Install Python requirements and Create default Conan profile
96- run : |
97- pip install -r CuraEngine/.github/workflows/requirements-runner.txt
98- pip install wheel numpy pandas python-dateutil pytz six
99- pip install git+https://github.com/ultimaker/libcharon@CURA-9495_analyzer_requisites#egg=charon
100- pip install pytest pytest-benchmark
101-
102- - name : Install Linux system requirements for building
103- run : |
104- mkdir runner_scripts
105- cd runner_scripts
106- curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/runner_scripts/ubuntu_setup.sh
107- chmod +x ubuntu_setup.sh
108- sudo ./ubuntu_setup.sh
109-
110- - name : Setup pipeline caches
111- run : |
112- mkdir -p /home/runner/.conan/downloads
113- mkdir -p /home/runner/.conan/data
114-
115- - name : Create default Conan profile
116- run : conan profile new default --detect
117-
118- - name : Get Conan configuration
119- run : |
120- conan config install https://github.com/Ultimaker/conan-config.git
121- conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
122-
123- - name : Cache Conan packages
124- uses : actions/cache@v3
125- with :
126- path : /home/runner/.conan/data
127- key : ${{ runner.os }}-conan-data-${{ github.run_id }}
128- restore-keys : |
129- ${{ runner.os }}-conan-data-
130-
131- - name : Cache Conan downloads
132- uses : actions/cache@v3
133- with :
134- path : /home/runner/.conan/downloads
135- key : ${{ runner.os }}-conan-downloads-${{ github.run_id }}
136- restore-keys : |
137- ${{ runner.os }}-conan-downloads-
138-
13967 - name : Install dependencies
140- run : conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=True -o with_cura_resources=True
141- working-directory : CuraEngine
142-
143- - name : Set Environment variables from Conan install (bash)
144- if : ${{ runner.os != 'Windows' }}
145- run : |
146- . ./activate_github_actions_runenv.sh
147- . ./activate_github_actions_buildenv.sh
148- working-directory : CuraEngine/build/Release/generators
68+ run : conan install . ${{ needs.conan-recipe-version.outputs.version_full }} -s "*:build_type=Release" --build=missing --update -g VirtualRunEnv -c tools.build:skip_test=True -o with_cura_resources=True
14969
15070 - name : Build CuraEngine and tests
15171 run : |
72+ source build/Release/generators/conanbuild.sh
15273 cmake --preset release
15374 cmake --build --preset release
154- working-directory : CuraEngine
15575
15676 - name : Collect STL-files, run CuraEngine, output GCode-files
15777 run : |
158- for file in `ls ../ NightlyTestModels/*.stl`;
78+ for file in `ls NightlyTestModels/*.stl`;
15979 do
160- ( time ./build/Release/CuraEngine slice --force-read-parent --force-read-nondefault -v -p -j $CURA_RESOURCES/definitions/ultimaker_s3.def.json -l $file -o ../ `basename $file .stl`.gcode ) 2> ../ `basename $file .stl`.time
80+ ( time ./build/Release/CuraEngine slice --force-read-parent --force-read-nondefault -v -p -j $CURA_RESOURCES/definitions/ultimaker_s3.def.json -l $file -o `basename $file .stl`.gcode ) 2> `basename $file .stl`.time
16181 done
162- working-directory : CuraEngine
16382
164- # TODO: Move this to GCodeAnalyzer
83+ # TODO: Move this to GCodeAnalyzer
16584 - name : Run GCodeAnalyzer on generated GCode files
16685 id : gcode_out
16786 run : |
0 commit comments