-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.43 KB
/
build-3DMount.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
name: 3D Models
env:
wdir: TorizonOSBuildStatus3DMount
on:
push:
paths:
- 'TorizonOSBuildStatus3DMount/**'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.wdir }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends openscad
mkdir -p $HOME/.local/share/OpenSCAD/libraries
cd $HOME/.local/share/OpenSCAD/libraries
wget https://github.com/BelfrySCAD/BOSL2/archive/refs/heads/master.tar.gz -O BOSL.tar.gz
tar -C $HOME/.local/share/OpenSCAD/libraries -xf BOSL.tar.gz
mv $HOME/.local/share/OpenSCAD/libraries/BOSL2-master $HOME/.local/share/OpenSCAD/libraries/BOSL2
wget https://github.com/nophead/NopSCADlib/archive/refs/heads/master.tar.gz -O NopSCADlib.tar.gz
tar -C $HOME/.local/share/OpenSCAD/libraries -xf NopSCADlib.tar.gz
mv $HOME/.local/share/OpenSCAD/libraries/NopSCADlib-master $HOME/.local/share/OpenSCAD/libraries/NopSCADlib
- name: Build STL files
run: |
for file in $(find . -name '*.scad'); do
echo "building STL for ${file}"
openscad -o "${file%.scad}.stl" "$file"
done
- name: Upload STL files
uses: actions/upload-artifact@v4
with:
name: stl-files
path: ./${{ env.wdir }}/*.stl