소스 검색

add gh workflows

Thomas Buck 7 달 전
부모
커밋
e4f9524a7d
4개의 변경된 파일160개의 추가작업 그리고 5개의 파일을 삭제
  1. 83
    0
      .github/workflows/docs.yml
  2. 69
    0
      .github/workflows/kicad.yml
  3. 5
    5
      docs/generate_docs.sh
  4. 3
    0
      docs/src/pcb1.md

+ 83
- 0
.github/workflows/docs.yml 파일 보기

@@ -0,0 +1,83 @@
1
+# SPDX-FileCopyrightText: 2024 Thomas Buck <thomas@xythobuz.de>
2
+# SPDX-License-Identifier: CERN-OHL-S-2.0+
3
+#
4
+#  ------------------------------------------------------------------------------
5
+# | Copyright (c) 2024 Thomas Buck <thomas@xythobuz.de>                          |
6
+# |                                                                              |
7
+# | This source describes Open Hardware and is licensed under the CERN-OHL-S v2  |
8
+# | or any later version.                                                        |
9
+# |                                                                              |
10
+# | You may redistribute and modify this source and make products using it under |
11
+# | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt)          |
12
+# | or any later version.                                                        |
13
+# |                                                                              |
14
+# | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,          |
15
+# | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A         |
16
+# | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version)      |
17
+# | for applicable conditions.                                                   |
18
+# |                                                                              |
19
+# | Source location: https://git.xythobuz.de/thomas/drumkit                      |
20
+# |                                                                              |
21
+# | As per CERN-OHL-S v2 section 4, should You produce hardware based on this    |
22
+# | source, You must where practicable maintain the Source Location visible      |
23
+# | on the external case of the Gizmo or other products you make using this      |
24
+# | source.                                                                      |
25
+#  ------------------------------------------------------------------------------
26
+
27
+name: Docs
28
+
29
+# only build single instance of docs for latest main branch
30
+on:
31
+  push:
32
+    branches:
33
+      - master
34
+
35
+jobs:
36
+  deploy:
37
+    runs-on: ubuntu-latest
38
+
39
+    permissions:
40
+      contents: write
41
+      pages: write
42
+      id-token: write
43
+
44
+    steps:
45
+      - name: Checkout repo
46
+        uses: actions/checkout@v4
47
+        with:
48
+          fetch-depth: 0
49
+
50
+      - name: Checkout repo submodules
51
+        run: git submodule update --init
52
+
53
+      - name: Install dependencies
54
+        run: |
55
+          sudo add-apt-repository --yes ppa:kicad/kicad-7.0-releases
56
+          sudo apt update
57
+          sudo apt install -y --install-recommends kicad pipx libfuse2 libegl1 poppler-utils
58
+
59
+      - name: Install latest mdbook
60
+        run: |
61
+          tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
62
+          url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
63
+          mkdir mdbook
64
+          curl -sSL $url | tar -xz --directory=./mdbook
65
+          echo `pwd`/mdbook >> $GITHUB_PATH
66
+
67
+      - name: Generate Plots
68
+        run: pcb/generate_plot.sh
69
+
70
+      - name: Build Book
71
+        run: docs/generate_docs.sh build
72
+
73
+      - name: Setup Pages
74
+        uses: actions/configure-pages@v2
75
+
76
+      - name: Upload artifact
77
+        uses: actions/upload-pages-artifact@v1
78
+        with:
79
+          path: 'docs/book'
80
+
81
+      - name: Deploy to GitHub Pages
82
+        id: deployment
83
+        uses: actions/deploy-pages@v1

+ 69
- 0
.github/workflows/kicad.yml 파일 보기

@@ -0,0 +1,69 @@
1
+# SPDX-FileCopyrightText: 2024 Thomas Buck <thomas@xythobuz.de>
2
+# SPDX-License-Identifier: CERN-OHL-S-2.0+
3
+#
4
+#  ------------------------------------------------------------------------------
5
+# | Copyright (c) 2024 Thomas Buck <thomas@xythobuz.de>                          |
6
+# |                                                                              |
7
+# | This source describes Open Hardware and is licensed under the CERN-OHL-S v2  |
8
+# | or any later version.                                                        |
9
+# |                                                                              |
10
+# | You may redistribute and modify this source and make products using it under |
11
+# | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt)          |
12
+# | or any later version.                                                        |
13
+# |                                                                              |
14
+# | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,          |
15
+# | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A         |
16
+# | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version)      |
17
+# | for applicable conditions.                                                   |
18
+# |                                                                              |
19
+# | Source location: https://git.xythobuz.de/thomas/drumkit                      |
20
+# |                                                                              |
21
+# | As per CERN-OHL-S v2 section 4, should You produce hardware based on this    |
22
+# | source, You must where practicable maintain the Source Location visible      |
23
+# | on the external case of the Gizmo or other products you make using this      |
24
+# | source.                                                                      |
25
+#  ------------------------------------------------------------------------------
26
+
27
+name: PCB
28
+
29
+# build for each push and pull request
30
+on: [push, pull_request]
31
+
32
+jobs:
33
+  fabrication:
34
+    runs-on: ubuntu-latest
35
+
36
+    permissions:
37
+      contents: write
38
+
39
+    steps:
40
+      - name: Checkout repo
41
+        uses: actions/checkout@v4
42
+        with:
43
+          fetch-depth: 0
44
+
45
+      - name: Checkout repo submodules
46
+        run: git submodule update --init
47
+
48
+      - name: Install dependencies
49
+        run: |
50
+          sudo add-apt-repository --yes ppa:kicad/kicad-7.0-releases
51
+          sudo apt update
52
+          sudo apt install -y --install-recommends kicad
53
+          sudo apt-get install -y zip
54
+
55
+      - name: Generate fabrication files
56
+        run: |
57
+          ./pcb/generate_fab.sh
58
+
59
+      - name: Upload board files
60
+        uses: actions/upload-artifact@v4.0.0
61
+        with:
62
+          name: prototype-pcb
63
+          path: pcb/fabrication
64
+
65
+      - name: Upload release files
66
+        if: startsWith(github.ref, 'refs/tags/')
67
+        uses: softprops/action-gh-release@v1
68
+        with:
69
+          files: pcb/fab.zip

+ 5
- 5
docs/generate_docs.sh 파일 보기

@@ -31,11 +31,11 @@ INPCB="drumkit.kicad_pcb"
31 31
 
32 32
 cd "$(dirname "$0")"
33 33
 
34
-echo "Generating plots"
35
-rm -rf src/plot
36
-../pcb/generate_plot.sh
37
-cp -r ../pcb/plot src
38
-echo
34
+#echo "Generating plots"
35
+#rm -rf src/plot
36
+#../pcb/generate_plot.sh
37
+#cp -r ../pcb/plot src
38
+#echo
39 39
 
40 40
 for IN in $INSCH
41 41
 do

+ 3
- 0
docs/src/pcb1.md 파일 보기

@@ -2,3 +2,6 @@
2 2
 
3 3
 This is the hardware design for the initial prototype gifted as a birthday present.
4 4
 It's a single sided PCB layout suitable for hand etching at home.
5
+
6
+[![hand etching prototype pcb](https://www.xythobuz.de/img/lars_13_small.jpg)](https://www.xythobuz.de/img/lars_13.jpg)
7
+[![assembled prototype](https://www.xythobuz.de/img/lars_10_small.jpg)](https://www.xythobuz.de/img/lars_10.jpg)

Loading…
취소
저장