estampo 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- estampo-0.2.0/.dockerignore +16 -0
- estampo-0.2.0/.github/workflows/ci.yml +57 -0
- estampo-0.2.0/.github/workflows/publish-cloud-bridge.yml +171 -0
- estampo-0.2.0/.github/workflows/publish-docker.yml +131 -0
- estampo-0.2.0/.github/workflows/slice.yml +48 -0
- estampo-0.2.0/.github/workflows/test-pypi.yml +35 -0
- estampo-0.2.0/.gitignore +20 -0
- estampo-0.2.0/CHANGELOG.md +379 -0
- estampo-0.2.0/CLAUDE.md +28 -0
- estampo-0.2.0/CONTRIBUTING.md +43 -0
- estampo-0.2.0/Dockerfile +38 -0
- estampo-0.2.0/Dockerfile.cloud-bridge +85 -0
- estampo-0.2.0/Dockerfile.orca-base +58 -0
- estampo-0.2.0/LICENSE +201 -0
- estampo-0.2.0/PKG-INFO +494 -0
- estampo-0.2.0/README.md +255 -0
- estampo-0.2.0/SECURITY.md +14 -0
- estampo-0.2.0/TODO.md +16 -0
- estampo-0.2.0/action/README.md +62 -0
- estampo-0.2.0/action/action.yml +240 -0
- estampo-0.2.0/docker-compose.yml +12 -0
- estampo-0.2.0/docs/cli.md +241 -0
- estampo-0.2.0/docs/cloud-experiments/README.md +54 -0
- estampo-0.2.0/docs/cloud-experiments/cloud-print-research.md +1828 -0
- estampo-0.2.0/docs/cloud-experiments/http-cloud-print.py +382 -0
- estampo-0.2.0/docs/code-cad.md +159 -0
- estampo-0.2.0/docs/config.md +243 -0
- estampo-0.2.0/docs/developing.md +104 -0
- estampo-0.2.0/docs/docker-optimization-plan.md +316 -0
- estampo-0.2.0/docs/estampo-logo-color.svg +46 -0
- estampo-0.2.0/docs/estampo-logo.svg +66 -0
- estampo-0.2.0/docs/gcode-3mf-format.md +325 -0
- estampo-0.2.0/docs/images/pipeline.png +0 -0
- estampo-0.2.0/docs/images/plate_preview.png +0 -0
- estampo-0.2.0/docs/images/watch.png +0 -0
- estampo-0.2.0/docs/init-command-plan.md +122 -0
- estampo-0.2.0/docs/migration-plan-estampo.md +437 -0
- estampo-0.2.0/docs/printers.md +115 -0
- estampo-0.2.0/docs/recordings/demo.cast +444 -0
- estampo-0.2.0/docs/recordings/demo.gif +0 -0
- estampo-0.2.0/docs/recordings/init-template.cast +28 -0
- estampo-0.2.0/docs/recordings/init.cast +290 -0
- estampo-0.2.0/docs/recordings/profiles-pin.cast +135 -0
- estampo-0.2.0/docs/recordings/run-plate.cast +62 -0
- estampo-0.2.0/docs/recordings/run.cast +596 -0
- estampo-0.2.0/docs/recordings/setup.fixed.cast +116 -0
- estampo-0.2.0/docs/recordings/status-w.cast +71 -0
- estampo-0.2.0/docs/recordings/status.cast +50 -0
- estampo-0.2.0/docs/recordings/validate.cast +52 -0
- estampo-0.2.0/examples/estampo.toml +22 -0
- estampo-0.2.0/examples/gib-tuners-c13-10/estampo.toml +45 -0
- estampo-0.2.0/examples/peg-multicolour/estampo.toml +25 -0
- estampo-0.2.0/fabprint-plan.md +122 -0
- estampo-0.2.0/orca-bug-repro/cli-bug-repro.zip +0 -0
- estampo-0.2.0/orca-bug-repro/filament1.json +198 -0
- estampo-0.2.0/orca-bug-repro/filament2.json +198 -0
- estampo-0.2.0/orca-bug-repro/machine.json +189 -0
- estampo-0.2.0/orca-bug-repro/process.json +125 -0
- estampo-0.2.0/orca-bug-repro/repro.sh +36 -0
- estampo-0.2.0/pyproject.toml +70 -0
- estampo-0.2.0/scripts/bambu_cloud_bridge.cpp +1212 -0
- estampo-0.2.0/scripts/bambu_cloud_login.py +208 -0
- estampo-0.2.0/scripts/build-docker.sh +112 -0
- estampo-0.2.0/scripts/cache-bnl.sh +37 -0
- estampo-0.2.0/scripts/extract_profiles.py +94 -0
- estampo-0.2.0/scripts/install-test.sh +26 -0
- estampo-0.2.0/scripts/record_demo.py +617 -0
- estampo-0.2.0/scripts/record_setup.py +161 -0
- estampo-0.2.0/scripts/test_cloud_print.py +2027 -0
- estampo-0.2.0/scripts/update_docker_versions.py +24 -0
- estampo-0.2.0/src/estampo/__init__.py +24 -0
- estampo-0.2.0/src/estampo/adapters.py +248 -0
- estampo-0.2.0/src/estampo/arrange.py +100 -0
- estampo-0.2.0/src/estampo/auth.py +139 -0
- estampo-0.2.0/src/estampo/cli.py +903 -0
- estampo-0.2.0/src/estampo/cloud/__init__.py +41 -0
- estampo-0.2.0/src/estampo/cloud/ams.py +344 -0
- estampo-0.2.0/src/estampo/cloud/bridge.py +574 -0
- estampo-0.2.0/src/estampo/config.py +343 -0
- estampo-0.2.0/src/estampo/constants.py +3 -0
- estampo-0.2.0/src/estampo/credentials.py +420 -0
- estampo-0.2.0/src/estampo/docker_versions.json +1 -0
- estampo-0.2.0/src/estampo/gcode.py +192 -0
- estampo-0.2.0/src/estampo/init.py +1161 -0
- estampo-0.2.0/src/estampo/loader.py +189 -0
- estampo-0.2.0/src/estampo/orient.py +77 -0
- estampo-0.2.0/src/estampo/pipeline.py +457 -0
- estampo-0.2.0/src/estampo/plate.py +212 -0
- estampo-0.2.0/src/estampo/printer.py +448 -0
- estampo-0.2.0/src/estampo/profiles.py +595 -0
- estampo-0.2.0/src/estampo/py.typed +0 -0
- estampo-0.2.0/src/estampo/slicer.py +643 -0
- estampo-0.2.0/src/estampo/thumbnails.py +229 -0
- estampo-0.2.0/src/estampo/ui.py +149 -0
- estampo-0.2.0/src/estampo/viewer.py +84 -0
- estampo-0.2.0/tests/__init__.py +0 -0
- estampo-0.2.0/tests/conftest.py +22 -0
- estampo-0.2.0/tests/fixtures/cube_10mm.stl +0 -0
- estampo-0.2.0/tests/fixtures/cylinder_5x20mm.stl +0 -0
- estampo-0.2.0/tests/test_adapters.py +470 -0
- estampo-0.2.0/tests/test_arrange.py +68 -0
- estampo-0.2.0/tests/test_auth.py +340 -0
- estampo-0.2.0/tests/test_cli.py +965 -0
- estampo-0.2.0/tests/test_cloud.py +1045 -0
- estampo-0.2.0/tests/test_config.py +957 -0
- estampo-0.2.0/tests/test_credentials.py +498 -0
- estampo-0.2.0/tests/test_gcode.py +150 -0
- estampo-0.2.0/tests/test_init.py +644 -0
- estampo-0.2.0/tests/test_loader.py +421 -0
- estampo-0.2.0/tests/test_orient.py +104 -0
- estampo-0.2.0/tests/test_pipeline.py +763 -0
- estampo-0.2.0/tests/test_plate.py +252 -0
- estampo-0.2.0/tests/test_printer.py +406 -0
- estampo-0.2.0/tests/test_profiles.py +481 -0
- estampo-0.2.0/tests/test_slicer.py +356 -0
- estampo-0.2.0/tests/test_ui.py +260 -0
- estampo-0.2.0/tests/test_viewer.py +60 -0
- estampo-0.2.0/uv.lock +2909 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v6
|
|
14
|
+
- uses: astral-sh/setup-uv@v5
|
|
15
|
+
- run: uv sync --extra dev
|
|
16
|
+
- run: uv run ruff check src tests
|
|
17
|
+
- run: uv run ruff format --check src tests
|
|
18
|
+
- run: uv run mypy src/estampo
|
|
19
|
+
|
|
20
|
+
test:
|
|
21
|
+
runs-on: ${{ matrix.os }}
|
|
22
|
+
strategy:
|
|
23
|
+
matrix:
|
|
24
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
25
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
26
|
+
# 3.14 excluded: cadquery-ocp (build123d dep) lacks cp314 wheels
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
- uses: astral-sh/setup-uv@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python-version }}
|
|
32
|
+
- run: uv sync --extra dev
|
|
33
|
+
- run: uv run pytest -v
|
|
34
|
+
|
|
35
|
+
coverage:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v6
|
|
39
|
+
- uses: astral-sh/setup-uv@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.13"
|
|
42
|
+
- run: uv sync --extra dev
|
|
43
|
+
- run: uv run pytest --cov=estampo --cov-report=xml -v
|
|
44
|
+
- uses: codecov/codecov-action@v5
|
|
45
|
+
with:
|
|
46
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
47
|
+
files: coverage.xml
|
|
48
|
+
fail_ci_if_error: false
|
|
49
|
+
|
|
50
|
+
build-bridge:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v6
|
|
54
|
+
- name: Compile cloud bridge
|
|
55
|
+
run: g++ -std=c++17 -o bambu_cloud_bridge scripts/bambu_cloud_bridge.cpp -ldl -lpthread
|
|
56
|
+
- name: Verify binary
|
|
57
|
+
run: ./bambu_cloud_bridge --help
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
id-token: write
|
|
13
|
+
packages: write
|
|
14
|
+
outputs:
|
|
15
|
+
version: ${{ steps.version.outputs.version }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
|
|
19
|
+
- name: Extract version from tag
|
|
20
|
+
id: version
|
|
21
|
+
run: |
|
|
22
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
23
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
24
|
+
|
|
25
|
+
- name: Verify tag matches pyproject.toml version
|
|
26
|
+
run: |
|
|
27
|
+
TOML_VERSION=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
28
|
+
TAG_VERSION="${GITHUB_REF_NAME#v}"
|
|
29
|
+
if [[ "$TOML_VERSION" != "$TAG_VERSION" ]]; then
|
|
30
|
+
echo "::error::Tag $TAG_VERSION does not match pyproject.toml version $TOML_VERSION"
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
- name: Set up Python
|
|
35
|
+
uses: actions/setup-python@v6
|
|
36
|
+
with:
|
|
37
|
+
python-version: "3.11"
|
|
38
|
+
|
|
39
|
+
- name: Build and publish to PyPI
|
|
40
|
+
run: |
|
|
41
|
+
pip install build
|
|
42
|
+
python -m build
|
|
43
|
+
|
|
44
|
+
- name: Publish to PyPI
|
|
45
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
46
|
+
|
|
47
|
+
- name: Build and push cloud-bridge
|
|
48
|
+
run: echo "Cloud bridge built in docker-images job"
|
|
49
|
+
|
|
50
|
+
- uses: docker/login-action@v3
|
|
51
|
+
with:
|
|
52
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
53
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
54
|
+
- uses: docker/login-action@v3
|
|
55
|
+
with:
|
|
56
|
+
registry: ghcr.io
|
|
57
|
+
username: ${{ github.actor }}
|
|
58
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
59
|
+
- uses: docker/setup-buildx-action@v3
|
|
60
|
+
|
|
61
|
+
- name: Build and push cloud-bridge
|
|
62
|
+
uses: docker/build-push-action@v6
|
|
63
|
+
with:
|
|
64
|
+
context: .
|
|
65
|
+
file: Dockerfile.cloud-bridge
|
|
66
|
+
platforms: linux/amd64
|
|
67
|
+
push: true
|
|
68
|
+
tags: |
|
|
69
|
+
estampo/cloud-bridge:${{ steps.version.outputs.version }}
|
|
70
|
+
estampo/cloud-bridge:latest
|
|
71
|
+
ghcr.io/${{ github.repository }}/cloud-bridge:${{ steps.version.outputs.version }}
|
|
72
|
+
cache-from: type=gha
|
|
73
|
+
cache-to: type=gha,mode=max
|
|
74
|
+
|
|
75
|
+
docker-images:
|
|
76
|
+
needs: release
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
permissions:
|
|
79
|
+
packages: write
|
|
80
|
+
strategy:
|
|
81
|
+
matrix:
|
|
82
|
+
orca-version: ["2.3.1"]
|
|
83
|
+
steps:
|
|
84
|
+
- uses: actions/checkout@v6
|
|
85
|
+
- uses: docker/login-action@v3
|
|
86
|
+
with:
|
|
87
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
88
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
89
|
+
- uses: docker/login-action@v3
|
|
90
|
+
with:
|
|
91
|
+
registry: ghcr.io
|
|
92
|
+
username: ${{ github.actor }}
|
|
93
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
94
|
+
- uses: docker/setup-buildx-action@v3
|
|
95
|
+
|
|
96
|
+
- name: Check if orca-base already exists
|
|
97
|
+
id: base_exists
|
|
98
|
+
run: |
|
|
99
|
+
if docker pull "estampo/orca-base:${{ matrix.orca-version }}" 2>/dev/null; then
|
|
100
|
+
echo "exists=true" >> "$GITHUB_OUTPUT"
|
|
101
|
+
else
|
|
102
|
+
echo "exists=false" >> "$GITHUB_OUTPUT"
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
- name: Build and push orca-base
|
|
106
|
+
if: steps.base_exists.outputs.exists == 'false'
|
|
107
|
+
uses: docker/build-push-action@v6
|
|
108
|
+
with:
|
|
109
|
+
context: .
|
|
110
|
+
file: Dockerfile.orca-base
|
|
111
|
+
platforms: linux/amd64
|
|
112
|
+
push: true
|
|
113
|
+
tags: |
|
|
114
|
+
estampo/orca-base:${{ matrix.orca-version }}
|
|
115
|
+
ghcr.io/${{ github.repository }}/orca-base:${{ matrix.orca-version }}
|
|
116
|
+
build-args: ORCA_VERSION=${{ matrix.orca-version }}
|
|
117
|
+
cache-from: type=gha
|
|
118
|
+
cache-to: type=gha,mode=max
|
|
119
|
+
|
|
120
|
+
- name: Build and push estampo image
|
|
121
|
+
uses: docker/build-push-action@v6
|
|
122
|
+
with:
|
|
123
|
+
context: .
|
|
124
|
+
file: Dockerfile
|
|
125
|
+
platforms: linux/amd64
|
|
126
|
+
push: true
|
|
127
|
+
tags: |
|
|
128
|
+
estampo/estampo:orca-${{ matrix.orca-version }}-${{ needs.release.outputs.version }}
|
|
129
|
+
estampo/estampo:orca-${{ matrix.orca-version }}
|
|
130
|
+
ghcr.io/${{ github.repository }}:orca-${{ matrix.orca-version }}-${{ needs.release.outputs.version }}
|
|
131
|
+
ghcr.io/${{ github.repository }}:orca-${{ matrix.orca-version }}
|
|
132
|
+
build-args: ORCA_VERSION=${{ matrix.orca-version }}
|
|
133
|
+
cache-from: type=gha
|
|
134
|
+
cache-to: type=gha,mode=max
|
|
135
|
+
|
|
136
|
+
profiles:
|
|
137
|
+
needs: [release, docker-images]
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
permissions:
|
|
140
|
+
contents: write
|
|
141
|
+
pull-requests: write
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/checkout@v6
|
|
144
|
+
|
|
145
|
+
- name: Set up Python
|
|
146
|
+
uses: actions/setup-python@v6
|
|
147
|
+
with:
|
|
148
|
+
python-version: "3.11"
|
|
149
|
+
|
|
150
|
+
- name: Extract profiles for all OrcaSlicer versions
|
|
151
|
+
run: |
|
|
152
|
+
python scripts/extract_profiles.py 2.3.1
|
|
153
|
+
|
|
154
|
+
- name: Open PR for bundled profile updates
|
|
155
|
+
run: |
|
|
156
|
+
git diff --quiet src/estampo/data/ && echo "No profile changes" && exit 0
|
|
157
|
+
VERSION="${{ needs.release.outputs.version }}"
|
|
158
|
+
BRANCH="update-orca-profiles-${VERSION}"
|
|
159
|
+
git config user.name "github-actions[bot]"
|
|
160
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
161
|
+
git checkout -b "$BRANCH"
|
|
162
|
+
git add src/estampo/data/
|
|
163
|
+
git commit -m "Update bundled OrcaSlicer profiles (2.3.1, 2.3.2)"
|
|
164
|
+
git push origin "$BRANCH"
|
|
165
|
+
gh pr create \
|
|
166
|
+
--title "Update bundled OrcaSlicer profiles" \
|
|
167
|
+
--body "Auto-generated profile update from release ${VERSION}." \
|
|
168
|
+
--base main \
|
|
169
|
+
--head "$BRANCH"
|
|
170
|
+
env:
|
|
171
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: Publish Docker images
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
rebuild-base:
|
|
9
|
+
description: "Rebuild orca-base images (normally only on release tags)"
|
|
10
|
+
type: boolean
|
|
11
|
+
default: false
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
detect-changes:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
bridge: ${{ steps.check.outputs.bridge }}
|
|
18
|
+
estampo: ${{ steps.check.outputs.estampo }}
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 2
|
|
23
|
+
|
|
24
|
+
- name: Detect changed files
|
|
25
|
+
id: check
|
|
26
|
+
run: |
|
|
27
|
+
CHANGED=$(git diff HEAD~1 HEAD --name-only)
|
|
28
|
+
echo "$CHANGED" | grep -qE 'Dockerfile\.cloud-bridge|scripts/bambu_cloud_bridge\.cpp' \
|
|
29
|
+
&& echo "bridge=true" >> "$GITHUB_OUTPUT" || echo "bridge=false" >> "$GITHUB_OUTPUT"
|
|
30
|
+
echo "$CHANGED" | grep -qE '^Dockerfile$|^src/estampo/|^pyproject\.toml$|^uv\.lock$' \
|
|
31
|
+
&& echo "estampo=true" >> "$GITHUB_OUTPUT" || echo "estampo=false" >> "$GITHUB_OUTPUT"
|
|
32
|
+
|
|
33
|
+
cloud-bridge:
|
|
34
|
+
needs: detect-changes
|
|
35
|
+
if: needs.detect-changes.outputs.bridge == 'true'
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
permissions:
|
|
38
|
+
packages: write
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v6
|
|
41
|
+
- uses: docker/login-action@v3
|
|
42
|
+
with:
|
|
43
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
44
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
45
|
+
- uses: docker/login-action@v3
|
|
46
|
+
with:
|
|
47
|
+
registry: ghcr.io
|
|
48
|
+
username: ${{ github.actor }}
|
|
49
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
+
- uses: docker/setup-buildx-action@v3
|
|
51
|
+
- uses: docker/build-push-action@v6
|
|
52
|
+
with:
|
|
53
|
+
context: .
|
|
54
|
+
file: Dockerfile.cloud-bridge
|
|
55
|
+
platforms: linux/amd64
|
|
56
|
+
push: true
|
|
57
|
+
tags: estampo/cloud-bridge:latest
|
|
58
|
+
cache-from: type=gha
|
|
59
|
+
cache-to: type=gha,mode=max
|
|
60
|
+
|
|
61
|
+
# Rebuild orca-base only when explicitly requested via workflow_dispatch.
|
|
62
|
+
# These images are immutable per OrcaSlicer version to ensure reproducible builds.
|
|
63
|
+
# Uses no-cache to avoid GHA layer cache returning stale system packages.
|
|
64
|
+
orca-base:
|
|
65
|
+
if: github.event_name == 'workflow_dispatch' && inputs.rebuild-base
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
permissions:
|
|
68
|
+
packages: write
|
|
69
|
+
strategy:
|
|
70
|
+
matrix:
|
|
71
|
+
orca-version: ["2.3.1"]
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v6
|
|
74
|
+
- uses: docker/login-action@v3
|
|
75
|
+
with:
|
|
76
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
77
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
78
|
+
- uses: docker/login-action@v3
|
|
79
|
+
with:
|
|
80
|
+
registry: ghcr.io
|
|
81
|
+
username: ${{ github.actor }}
|
|
82
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
83
|
+
- uses: docker/setup-buildx-action@v3
|
|
84
|
+
- uses: docker/build-push-action@v6
|
|
85
|
+
with:
|
|
86
|
+
context: .
|
|
87
|
+
file: Dockerfile.orca-base
|
|
88
|
+
platforms: linux/amd64
|
|
89
|
+
push: true
|
|
90
|
+
no-cache: true
|
|
91
|
+
tags: |
|
|
92
|
+
estampo/orca-base:${{ matrix.orca-version }}
|
|
93
|
+
ghcr.io/${{ github.repository }}/orca-base:${{ matrix.orca-version }}
|
|
94
|
+
build-args: ORCA_VERSION=${{ matrix.orca-version }}
|
|
95
|
+
|
|
96
|
+
# Rebuild the estampo Python layer on push to main or manual dispatch.
|
|
97
|
+
estampo-images:
|
|
98
|
+
needs: [detect-changes, orca-base]
|
|
99
|
+
if: always() && !failure() && (needs.detect-changes.outputs.estampo == 'true' || github.event_name == 'workflow_dispatch')
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
permissions:
|
|
102
|
+
packages: write
|
|
103
|
+
strategy:
|
|
104
|
+
matrix:
|
|
105
|
+
orca-version: ["2.3.1"]
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v6
|
|
108
|
+
- uses: docker/login-action@v3
|
|
109
|
+
with:
|
|
110
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
111
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
112
|
+
- uses: docker/login-action@v3
|
|
113
|
+
with:
|
|
114
|
+
registry: ghcr.io
|
|
115
|
+
username: ${{ github.actor }}
|
|
116
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
117
|
+
- uses: docker/setup-buildx-action@v3
|
|
118
|
+
|
|
119
|
+
- name: Build and push estampo image
|
|
120
|
+
uses: docker/build-push-action@v6
|
|
121
|
+
with:
|
|
122
|
+
context: .
|
|
123
|
+
file: Dockerfile
|
|
124
|
+
platforms: linux/amd64
|
|
125
|
+
push: true
|
|
126
|
+
tags: |
|
|
127
|
+
estampo/estampo:orca-${{ matrix.orca-version }}
|
|
128
|
+
ghcr.io/${{ github.repository }}:orca-${{ matrix.orca-version }}
|
|
129
|
+
build-args: ORCA_VERSION=${{ matrix.orca-version }}
|
|
130
|
+
cache-from: type=gha
|
|
131
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Slice
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
config:
|
|
7
|
+
description: "Path to estampo.toml"
|
|
8
|
+
required: true
|
|
9
|
+
default: "estampo.toml"
|
|
10
|
+
orca_version:
|
|
11
|
+
description: "OrcaSlicer version"
|
|
12
|
+
required: true
|
|
13
|
+
default: "2.3.1"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
slice:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Pull or build orca-base image
|
|
22
|
+
run: |
|
|
23
|
+
docker pull estampo/orca-base:${{ inputs.orca_version }} 2>/dev/null \
|
|
24
|
+
|| docker build --platform linux/amd64 \
|
|
25
|
+
-f Dockerfile.orca-base \
|
|
26
|
+
--build-arg ORCA_VERSION=${{ inputs.orca_version }} \
|
|
27
|
+
-t estampo/orca-base:${{ inputs.orca_version }} .
|
|
28
|
+
|
|
29
|
+
- name: Build estampo image
|
|
30
|
+
run: |
|
|
31
|
+
docker build \
|
|
32
|
+
--build-arg ORCA_VERSION=${{ inputs.orca_version }} \
|
|
33
|
+
-t estampo:orca-${{ inputs.orca_version }} .
|
|
34
|
+
|
|
35
|
+
- name: Generate plate and slice
|
|
36
|
+
run: |
|
|
37
|
+
docker run --rm \
|
|
38
|
+
-v "${{ github.workspace }}:/project" \
|
|
39
|
+
estampo:orca-${{ inputs.orca_version }} \
|
|
40
|
+
slice "${{ inputs.config }}" -v
|
|
41
|
+
|
|
42
|
+
- name: Upload gcode
|
|
43
|
+
uses: actions/upload-artifact@v7
|
|
44
|
+
with:
|
|
45
|
+
name: gcode
|
|
46
|
+
path: |
|
|
47
|
+
output/*.gcode
|
|
48
|
+
plate.3mf
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Publish to TestPyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test-publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: testpypi
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write # required for PyPI trusted publishing
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.11"
|
|
23
|
+
|
|
24
|
+
- name: Build dev package for TestPyPI
|
|
25
|
+
run: |
|
|
26
|
+
pip install build
|
|
27
|
+
VERSION=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
28
|
+
DEV_VERSION="${VERSION}.dev${GITHUB_RUN_NUMBER}"
|
|
29
|
+
sed -i "s/version = \"$VERSION\"/version = \"$DEV_VERSION\"/" pyproject.toml
|
|
30
|
+
python -m build
|
|
31
|
+
|
|
32
|
+
- name: Publish to TestPyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
+
with:
|
|
35
|
+
repository-url: https://test.pypi.org/legacy/
|
estampo-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.pyc
|
|
3
|
+
.venv/
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.pytest_cache/
|
|
8
|
+
*.3mf
|
|
9
|
+
*.gcode
|
|
10
|
+
output/
|
|
11
|
+
.DS_Store
|
|
12
|
+
.coverage
|
|
13
|
+
*.png
|
|
14
|
+
!docs/images/*.png
|
|
15
|
+
scripts/bambu_cloud_bridge
|
|
16
|
+
squashfs-root/
|
|
17
|
+
fabprint_output/
|
|
18
|
+
estampo_output/
|
|
19
|
+
bc_tls*.log
|
|
20
|
+
docs/bc_https_hook.py
|