From 561855579a514c7d3bebcc89b38e44c9de065616 Mon Sep 17 00:00:00 2001 From: Tom Mloduchowski Date: Wed, 25 Sep 2024 22:50:50 -0400 Subject: [PATCH 1/5] Create makefile.yml --- .github/workflows/makefile.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/makefile.yml diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 0000000..2b3993e --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,25 @@ +name: Makefile CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: install openscad + run: apt-get install openscad + + - name: install solidpython + run: pip install solidpython2 + + - name: Install dependencies + run: make + From 710d8fc4a1a4c26eee57871c553ee29bf95f3a6d Mon Sep 17 00:00:00 2001 From: Tom Mloduchowski Date: Wed, 25 Sep 2024 22:52:23 -0400 Subject: [PATCH 2/5] Update makefile.yml Run apt-get as root. --- .github/workflows/makefile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 2b3993e..0d5bf87 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - name: install openscad - run: apt-get install openscad + run: sudo apt-get install openscad - name: install solidpython run: pip install solidpython2 From ecbfbc3d2ee75510d094e292b2eea7af2518d284 Mon Sep 17 00:00:00 2001 From: Tom Mloduchowski Date: Wed, 25 Sep 2024 22:57:13 -0400 Subject: [PATCH 3/5] Update Makefile Create output directory before writing to it. --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 46b7226..def8ae4 100644 --- a/Makefile +++ b/Makefile @@ -4,21 +4,26 @@ pys := $(patsubst %.py,out/%.stl,$(wildcard *.py)) ALL: $(pys) $(scads) out/%.scad : %.py + mkdir -p out python3 $< > $@ out/%.scad: %.2dpy + mkdir -p out python3 $< > $@ out/%.stl : %.scad + mkdir -p out openscad -o $@ $< out/%.stl : out/%.scad + mkdir -p out openscad -o $@ $< %.dxf: %.scad openscad -o $@ $< out/%.pdf: %.scad + mkdir -p out openscad -o $@ $< clean: From 9d773fe09c14a40dda0fc1341e0860683cd95478 Mon Sep 17 00:00:00 2001 From: Tom Mloduchowski Date: Wed, 25 Sep 2024 23:06:12 -0400 Subject: [PATCH 4/5] Update makefile.yml Support multi-core execution (unsure if public runners are multicore but if so..) and artifact creation/uploading --- .github/workflows/makefile.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 0d5bf87..9ba3be4 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -20,6 +20,10 @@ jobs: - name: install solidpython run: pip install solidpython2 - - name: Install dependencies - run: make - + - name: Generate STL files + run: make -j $(nproc) + + - uses: actions/upload-artifact@v4 + with: + name: motostandup-STL.tar + path: out/* From 508acb62dd8ef5c6baa39d11d1152418153c9f1f Mon Sep 17 00:00:00 2001 From: Tom Mloduchowski Date: Wed, 25 Sep 2024 23:42:27 -0400 Subject: [PATCH 5/5] Update makefile.yml --- .github/workflows/makefile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 9ba3be4..88b394b 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -25,5 +25,5 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: motostandup-STL.tar + name: motostandup-STL path: out/*