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
68 lines (57 loc) · 1.84 KB
/
build.yml
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
# 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: bcfd7c9e7a199a1ddc23ef1b45130c19cb49997f72d299c8e1a308c155bdabff
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: wasmerio/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
# Slice Benchy
- name: Slice Benchy
run: wasmer ./build/CuraEngine.wasm --mapdir /definitions:./cura/resources/definitions --mapdir /data:./data -- slice -v -j /definitions/ultimaker2.def.json -o /data/benchy.gcode -l /data/benchy.stl
# Verify output
- name: Verify output
run: |
if [ "${{ hashFiles('./data/benchy.gcode') }}" != "${{ env.BENCHY_HASH }}" ]; then
exit 1
fi