-
-
Notifications
You must be signed in to change notification settings - Fork 922
123 lines (109 loc) · 4.11 KB
/
Copy pathgcodeanalyzer.yml
File metadata and controls
123 lines (109 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: GcodeAnalyzer
on:
push:
paths:
- 'include/**'
- 'src/**'
- '.github/workflows/gcodeanalyzer.yml'
branches:
- main
pull_request:
types: [ opened, reopened, synchronize ]
paths:
- 'include/**'
- 'src/**'
- '.github/workflows/gcodeanalyzer.yml'
- 'conandata.yml'
branches:
- main
- 'CURA-*'
- 'PP-*'
- 'NP-*'
- '[0-9]+.[0-9]+'
permissions:
contents: write
deployments: write
jobs:
check_actor:
uses: ultimaker/cura-workflows/.github/workflows/check-actor.yml@main
secrets: inherit
find-ticket-packages:
name: Extract ticket and find packages
uses: ultimaker/cura-workflows/.github/workflows/extract-ticket-and-find-packages.yml@main
secrets: inherit
gcodeanalyzer:
name: Run GCodeAnalyzer on the engine
needs: [check_actor, find-ticket-packages]
if: >-
needs.check_actor.outputs.proceed == 'true' &&
needs.find-ticket-packages.result == 'success'
runs-on: ubuntu-latest
steps:
- name: Setup the build environment
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@main
with:
install_system_dependencies: true
- name: Resolve GCodeAnalyzer branch
id: resolve_gca_branch
env:
GH_TOKEN: ${{ secrets.CURA_BENCHMARK_PAT }}
run: |
branch="${{ github.head_ref || github.ref_name }}"
if gh api "repos/Ultimaker/GCodeAnalyzer/branches/$branch" --silent 2>/dev/null; then
echo "ref=$branch" >> $GITHUB_OUTPUT
else
echo "ref=main" >> $GITHUB_OUTPUT
fi
- name: Checkout GCodeAnalyzer
uses: actions/checkout@v6
with:
repository: 'Ultimaker/GCodeAnalyzer'
ref: ${{ steps.resolve_gca_branch.outputs.ref }}
path: 'GCodeAnalyzer'
fetch-depth: 1
token: ${{ secrets.CURA_BENCHMARK_PAT }}
- name: Checkout Test Models
uses: actions/checkout@v6
with:
repository: 'Ultimaker/NightlyTestModels'
ref: 'main'
path: 'NightlyTestModels'
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python requirements
run: |
pip install pandas
pip install git+https://github.com/ultimaker/libcharon@CURA-9495_analyzer_requisites#egg=charon
- name: Set package overrides
id: set_overrides
if: needs.find-ticket-packages.outputs.package_overrides != ''
uses: ultimaker/cura-workflows/.github/actions/set-package-overrides@main
with:
package_overrides: ${{ needs.find-ticket-packages.outputs.package_overrides }}
profile: cura.jinja
- name: Install dependencies and build CuraEngine
run: conan build . --profile ${{ steps.set_overrides.outputs.profile || 'cura.jinja' }} -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
done
- name: Run GCodeAnalyzer on generated GCode files
id: gcode_out
run: python3 GCodeAnalyzer/scripts/analyze_gcode.py --input-dir . --output-file output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: GCodeAnalyzer
output-file-path: output.json
gh-repository: github.com/Ultimaker/CuraEngineBenchmarks
gh-pages-branch: main
benchmark-data-dir-path: dev/gcodeanalyzer
tool: customBiggerIsBetter
github-token: ${{ secrets.CURA_BENCHMARK_PAT }}
auto-push: true
max-items-in-chart: 250