Skip to content

Commit

Permalink
Update gcode analyzer for conan2
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Dec 20, 2024
1 parent 025fabd commit caae3ee
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/gcodeanalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,13 @@ permissions:
contents: write
deployments: write

# TODO: Make cura-workflows/benchmark.yml generic enough to fit the gcodeanalyzer benchmark

jobs:
check_actor:
uses: ultimaker/cura-workflows/.github/workflows/check-actor.yml@main
secrets: inherit

conan-recipe-version:
needs: [ check_actor ]
if: ${{ needs.check_actor.outputs.proceed == 'true' }}
uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main

gcodeanalyzer:
needs: [ conan-recipe-version ]
name: Run GCodeAnalyzer on the engine
runs-on: ubuntu-latest
steps:
Expand All @@ -64,17 +57,15 @@ jobs:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
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
- name: Install Python requirements
run: pip install git+https://github.com/ultimaker/libcharon@CURA-9495_analyzer_requisites#egg=charon

- name: Build CuraEngine and tests
run: |
source build/Release/generators/conanbuild.sh
cmake --preset release
cmake --build --preset release
- name: Install dependencies and build CuraEngine
run: conan build . -s build_type=Release --build=missing --update -g VirtualRunEnv -o "curaengine/*:with_cura_resources=True"

- name: Collect STL-files, run CuraEngine, output GCode-files
run: |
source build/Release/generators/conanrun.sh
for file in `ls NightlyTestModels/*.stl`;
do
( 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
Expand All @@ -83,6 +74,8 @@ jobs:
# TODO: Move this to GCodeAnalyzer
- name: Run GCodeAnalyzer on generated GCode files
id: gcode_out
shell: python
working-directory: GCodeAnalyzer
run: |
import sys
import os
Expand Down Expand Up @@ -205,8 +198,6 @@ jobs:
with open("../output.json", "w") as outfile:
outfile.write(json.dumps(jzon))
shell: python
working-directory: GCodeAnalyzer
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
Expand Down

0 comments on commit caae3ee

Please sign in to comment.