Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/CURA-11966_reduce-speed-on-overh…
Browse files Browse the repository at this point in the history
…ang' into CURA-12352_different-minimum-layer-time-for-layers-that-contain-overhangs
  • Loading branch information
wawanbreton committed Jan 9, 2025
2 parents 4379cbf + 5720be8 commit d30de99
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 237 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
benchmark:
uses: ultimaker/cura-workflows/.github/workflows/benchmark.yml@main
with:
conan_extra_args: "-o \"curaengine/*:enable_benchmarks=True\""
benchmark_cmd: "./build/Release/benchmark/benchmarks --benchmark_format=json --benchmark_out=benchmark_result.json"
conan_extra_args: "-c tools.build:skip_test=False -o \"curaengine/*:enable_benchmarks=True\""
benchmark_cmd: "benchmark/benchmarks --benchmark_format=json --benchmark_out=benchmark_result.json"
name: "C++ Benchmark"
output_file_path: "build/Release/benchmark_result.json"
output_file_path: "benchmark_result.json"
data_dir: "dev/bench"
tool: "googlecpp"
alert_threshold: "150%"
Expand Down
27 changes: 11 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,19 @@ 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: Build CuraEngine and tests
- name: Install Python requirements
run: |
source build/Release/generators/conanbuild.sh
cmake --preset release
cmake --build --preset release
pip install pandas
pip install git+https://github.com/ultimaker/libcharon@CURA-9495_analyzer_requisites#egg=charon
- 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
echo $CURA_RESOURCES
ls $CURA_RESOURCES
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 +78,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 +202,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
47 changes: 11 additions & 36 deletions .github/workflows/lint-formatter.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,21 @@
name: lint-formatter

on:
workflow_dispatch:

push:
paths:
- 'include/**/*.h*'
- 'src/**/*.c*'

pull_request:
types: [ opened ]
paths:
- 'include/**/*.h*'
- 'src/**/*.c*'

jobs:
lint-formatter-job:
name: Auto-apply clang-format

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: greguintow/get-diff-action@v7
with:
PATTERNS: |
include/**/*.h*
src/**/*.c*
- name: Setup Python and pip
if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes.
uses: actions/setup-python@v5
with:
python-version: 3.11.x
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-linter.txt

- name: Install Python requirements for runner
if: env.GIT_DIFF && !env.MATCHED_FILES
run: pip install -r .github/workflows/requirements-linter.txt

- name: Format file
if: env.GIT_DIFF && !env.MATCHED_FILES
run: |
clang-format -i ${{ env.GIT_DIFF_FILTERED }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: env.GIT_DIFF && !env.MATCHED_FILES
with:
commit_message: "Applied clang-format."
uses: ultimaker/cura-workflows/.github/workflows/lint-formatter.yml@main
with:
file_patterns: +(include|src)/**/*.+(h|hpp|c|cpp)
command: clang-format --verbose -i
commit_message: "Apply clang-format"
98 changes: 0 additions & 98 deletions .github/workflows/npm-package.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: conan-package
name: package

on:
push:
Expand All @@ -9,7 +9,7 @@ on:
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
- '.github/workflows/package.yml'
branches:
- main
- 'CURA-*'
Expand All @@ -29,7 +29,7 @@ on:
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
- '.github/workflows/package.yml'
branches:
- main
- 'CURA-*'
Expand All @@ -44,3 +44,11 @@ jobs:
with:
platform_wasm: true
secrets: inherit

npm-package:
needs: [ conan-package ]
if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'NP-') || startsWith(github.ref_name, '5.')) }} # FIXME: have a more generic way to determine release branches
uses: ultimaker/cura-workflows/.github/workflows/npm-package.yml@main
with:
package_version_full: ${{ needs.conan-package.outputs.package_version_full }}
secrets: inherit
15 changes: 2 additions & 13 deletions .github/workflows/stress_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,19 @@ permissions:
contents: write
deployments: write

env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}


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

benchmark:
needs: [ conan-recipe-version ]
uses: ultimaker/cura-workflows/.github/workflows/benchmark.yml@main
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
conan_extra_args: "-o curaengine:enable_benchmarks=True"
conan_extra_args: "-c tools.build:skip_test=False -o \"curaengine/*:enable_benchmarks=True\""
benchmark_cmd: "stress_benchmark/stress_benchmark -o benchmark_result.json"
name: "Stress Benchmark"
output_file_path: "build/Release/benchmark_result.json"
output_file_path: "benchmark_result.json"
data_dir: "dev/stress_bench"
tool: "customSmallerIsBetter"
secrets: inherit
3 changes: 0 additions & 3 deletions CuraEngineJS/.npmrc

This file was deleted.

13 changes: 0 additions & 13 deletions CuraEngineJS/package-lock.json

This file was deleted.

38 changes: 0 additions & 38 deletions CuraEngineJS/package.json

This file was deleted.

Loading

0 comments on commit d30de99

Please sign in to comment.