This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
forked from Ultimaker/CuraEngine
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa69bb2
commit 4b2f39d
Showing
24 changed files
with
424 additions
and
672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Always use our version of the below files | ||
.gitattributes merge=ours | ||
.github merge=ours | ||
docker merge=ours | ||
build.sh merge=ours | ||
wapm.toml merge=ours |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Automated builds for Cura Engine | ||
|
||
name: Build | ||
|
||
on: | ||
# Run when pushed | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
# SHA256 of Benchy GCODE for an Ultimaker 2 | ||
BENCHY_HASH: f4654841badfc91a22afd35593ef6024203c0ae3cefa119bd119711eecc3c737 | ||
|
||
jobs: | ||
# Build and test Cura Engine | ||
build: | ||
name: Build Cura Engine | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout source code | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
# Setup Wasmer | ||
- name: Setup Wasmer | ||
uses: cloud-cnc/setup-wasmer@v1 | ||
|
||
# Checkout 3D printer definitions | ||
- name: Checkout 3D printer definitions | ||
uses: actions/checkout@v2 | ||
with: | ||
path: cura | ||
repository: Ultimaker/Cura | ||
|
||
# Download data | ||
- name: Download data | ||
run: | | ||
mkdir data | ||
wget https://github.com/CreativeTools/3DBenchy/raw/master/Single-part/3DBenchy.stl -O data/benchy.stl | ||
# Build the Docker image | ||
- name: Build the Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: docker/build.dockerfile | ||
push: false | ||
tags: cloud-cnc/cura-engine | ||
|
||
# Run the Docker image | ||
- name: Run the Docker image | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: cloud-cnc/cura-engine | ||
options: -v ${{ github.workspace }}/build:/root/cura-engine/build | ||
run: ./build.sh | ||
|
||
# Move the build | ||
- name: Move the build | ||
run: sudo mv ./build/CuraEngine.wasm ./cura-engine.wasm | ||
|
||
# Slice Benchy | ||
- name: Slice Benchy | ||
run: wasmer ./cura-engine.wasm --mapdir /definitions:./cura/resources/definitions --mapdir /data:./data -- slice -j /definitions/ultimaker2.def.json -o /data/benchy.gcode -l /data/benchy.stl | ||
|
||
# Verify output | ||
- name: Verify output | ||
working-directory: data | ||
run: | | ||
if [ "${{ hashFiles('./benchy.gcode') }}" != "${{ env.BENCHY_HASH }}" ]; then | ||
exit 1 | ||
fi | ||
# Cache the build | ||
- name: Cache the build | ||
uses: actions/cache@v2 | ||
with: | ||
key: build-production-${{ hashFiles('./cura-engine.wasm') }} | ||
path: ./cura-engine.wasm |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Automated publishing for Cura Engine | ||
|
||
name: Publish | ||
|
||
on: | ||
# Run when a new release is created | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
# Publish Cura Engine to WAPM | ||
publish: | ||
name: Publish Cura Engine to WAPM | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout source code | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: source | ||
|
||
# Setup Wasmer | ||
- name: Setup Wasmer | ||
uses: cloud-cnc/setup-wasmer@v1 | ||
|
||
# Restore the build from the cache | ||
- name: Restore the build | ||
uses: actions/cache@v2 | ||
with: | ||
key: build-production- | ||
restore-keys: build-production- | ||
path: ./cura-engine.wasm | ||
|
||
# Add package assets to a dedicated directory | ||
- name: Add package assets | ||
run: | | ||
mkdir package | ||
mv ./cura-engine.wasm package | ||
mv ./source/README.md package | ||
mv ./source/wapm.toml package | ||
# Publish to WAPM | ||
- name: Publish to WAPM | ||
uses: cloud-cnc/wapm-publish@v1 | ||
with: | ||
username: ${{ secrets.WAPM_USERNAME }} | ||
password: ${{ secrets.WAPM_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Synchronize this repository with its upstream source (ultimaker/curaengine) | ||
|
||
name: Synchronize | ||
|
||
on: | ||
# Run every Saturday at 00:00 UTC | ||
schedule: | ||
- cron: '0 0 * * 6' | ||
|
||
# Run when manually triggered | ||
workflow_dispatch: | ||
|
||
jobs: | ||
synchronize: | ||
name: Synchronize with upstream | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout downstream (This repository) | ||
- name: Checkout downstream | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Authenticate to Git | ||
- name: Authenticate to Git | ||
uses: OleksiyRudenko/gha-git-credentials@v2 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
# Merge upstream | ||
- name: Merge upstream | ||
run: | | ||
git config merge.ours.driver true | ||
git config pull.rebase false | ||
git remote add upstream https://github.com/ultimaker/curaengine.git | ||
git pull upstream master | ||
git merge upstream/master | ||
# Stage and commit changes | ||
- name: Add and commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Synchronized with upstream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.