-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (70 loc) · 2.54 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
69
70
71
72
73
74
75
76
77
78
79
name: LL Build Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
export-kicad:
env:
BaseFileName: "LL"
SchematicFileExtension: "kicad_sch"
PCBFileExtension: "kicad_pcb"
OutputFolder: "./output"
ConfigFilePath: ".kibot/build.kibot.yaml"
runs-on: ubuntu-latest
steps:
- name: Fetch repository
uses: actions/checkout@v4
- name: Prepare output directory
run: |
mkdir -p ${{ env.OutputFolder }}
cp -r ./pcb ${{ env.OutputFolder }}/kicad
cp ./LICENSE ${{ env.OutputFolder }}
- name: Run KiBOT
uses: INTI-CMNB/KiBot@v2_dk7
with:
config: ${{ env.ConfigFilePath }}
dir: ${{ env.OutputFolder }}
schema: "./pcb/${{ env.BaseFileName }}.${{ env.SchematicFileExtension }}"
board: "./pcb/${{ env.BaseFileName }}.${{ env.PCBFileExtension }}"
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: kicad-export
path: ${{ env.OutputFolder }}
retention-days: 1
export-freecad:
env:
FREECADVERSION: "0.21.2"
FreeCADFileName: "./mechanical/housing.FCStd"
OutputFolder: "./output"
PartType: "PartDesign::Body"
runs-on: ubuntu-latest
steps:
- name: Fetch repository
uses: actions/checkout@v4
- name: Prepare output directory
run: |
mkdir -p ${{ env.OutputFolder }}
cp ./LICENSE ${{ env.OutputFolder }}
- name: Install FreeCAD
run: |
wget https://github.com/FreeCAD/FreeCAD/releases/download/${{ env.FREECADVERSION }}/FreeCAD-${{ env.FREECADVERSION }}-Linux-x86_64.AppImage
chmod 0777 ./FreeCAD-${{ env.FREECADVERSION }}-Linux-x86_64.AppImage
./FreeCAD-${{ env.FREECADVERSION }}-Linux-x86_64.AppImage --appimage-extract
- name: Get FreeCAD Export
run: |
git clone https://github.com/0x007E/pyfreecadexport.git
- name: Export STEP Files
run: |
./squashfs-root/usr/bin/python ./pyfreecadexport/src/pyfreecadexport.py -f "${{ env.FreeCADFileName }}" -p "${{ env.PartType }}" -d "${{ env.OutputFolder }}" -e "step" -l "squashfs-root/usr/lib/"
./squashfs-root/usr/bin/python ./pyfreecadexport/src/pyfreecadexport.py -f "${{ env.FreeCADFileName }}" -p "${{ env.PartType }}" -d "${{ env.OutputFolder }}" -e "stl" -l "squashfs-root/usr/lib/"
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: freecad-export
path: ${{ env.OutputFolder }}
retention-days: 1