Browse Source

Use latest CI, reducing the amount done in the Github CI script

Matthew Wildoer 4 months ago
parent
commit
fe544e5658
1 changed files with 6 additions and 73 deletions
  1. 6 73
      .github/workflows/ci.yml

+ 6 - 73
.github/workflows/ci.yml

@@ -1,86 +1,19 @@
-name: CI Pipeline
 
 on: [push, pull_request]
 
 jobs:
-  build-gerbers-default:
+  build:
     runs-on: ubuntu-latest
-    container:
-      image: kicad/kicad:7.0
-      options: --user root
 
     steps:
       - name: Checkout code
-        uses: actions/checkout@v3
-        with:
-          submodules: 'recursive'
-
-      - name: Build Gerbers
-        run: |
-          mkdir -p build/default/src
-          cd build/default
-          cp ../../elec/layout/default/*.kicad_pcb src/
-          sed -i "s/'{{GITHASH}}'/${GITHUB_SHA:0:7}/g" src/*.kicad_pcb
-          mkdir gerbers
-          kicad-cli pcb export gerbers -o gerbers/ src/*.kicad_pcb
-          kicad-cli pcb export drill -o gerbers/ src/*.kicad_pcb
-          zip "gerbers-${GITHUB_SHA:0:7}.zip" gerbers/*
-
-          # Position files for JLCPCB
-          kicad-cli pcb export pos --format csv --units mm --use-drill-file-origin -o ${GITHUB_SHA:0:7}-pos.csv src/*.kicad_pcb
-          POS_HEADER="$(cat ../../metadata/pos-header)"
-          sed -i "1s/.*/$POS_HEADER/" ${GITHUB_SHA:0:7}-pos.csv
-
-          # Export step file
-          kicad-cli pcb export step --subst-models -o board_3d_shape.step src/*.kicad_pcb
-        shell: bash
+        uses: actions/checkout@v4
 
-      - name: Upload Artifacts
-        uses: actions/upload-artifact@v3
-        with:
-          name: build
-          path: build/
-
-  build-ato-default:
-    runs-on: ubuntu-latest
-    container:
-      image: registry.atopile.io/atopile/atopile/ci:latest
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v3
-        with:
-          submodules: recursive
-
-      - name: Build Ato
-        run: |
-          ato install
-          ato build
-
-      - name: Upload Artifacts
-        uses: actions/upload-artifact@v3
-        with:
-          name: build
-          path: build/
-
-  store-build:
-    name: Store Build
-    needs: [build-ato-default, build-gerbers-default]
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Download Artifacts
-        uses: actions/download-artifact@v3
-        with:
-          path: downloads
-
-      - name: Combine Artifacts
-        run: |
-          mkdir store-build
-          cp -r downloads/* store-build/
+      - name: Build
+        uses: docker://ghcr.io/atopile/atopile-kicad
 
       - name: Upload Combined Artifacts
         uses: actions/upload-artifact@v3
         with:
-          name: store-build
-          path: store-build/
+          name: build
+          path: build