See if CI/CD will work
Some checks failed
Docs / Build Docs (pull_request) Failing after 48s
Docs / Publish Docs (pull_request) Has been skipped
Firmware / Firmware Builder (pull_request) Failing after 56s
Firmware / Delinter (pull_request) Failing after 31s
Hardware / KiCad Hardware (pull_request) Failing after 8m25s
Hardware / Publish (pull_request) Has been skipped
Hardware / Dev-Publish (pull_request) Has been skipped

This commit is contained in:
2024-01-02 14:40:29 -05:00
parent c13a39c500
commit 4015a6ee80
3 changed files with 3 additions and 11 deletions

View File

@@ -0,0 +1,69 @@
name: Docs
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "Docs/**"
- ".gitea/workflows/**"
#
jobs:
make_docs:
runs-on: ubuntu-latest
name: Build Docs
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: sudo apt update && sudo apt install texlive-latex-recommended texlive-latex-extra texlive-pictures pandoc rename latexmk
- name: Install docs requirements
run: pip install -r Docs/requirements.txt
- name: Build pdf
run: cd Docs && make
#
- run: mv Docs/_build/latex/*.pdf Docs/_build/latex/InstrumentVisor.pdf
- uses: actions/upload-artifact@v2
with:
name: Uniform_and_Style_Guide
path: Docs/_build/latex/InstrumentVisor.pdf
#
publish_docs:
# Only run on tags
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
name: Publish Docs
needs: [make_docs]
steps:
- uses: actions/download-artifact@v2
with:
name: Uniform_and_Style_Guide
- name: Upload Docs to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.pdf"
tag: ${{ github.ref }}
overwrite: true
prerelease: true
#
body: "Kitsune Scientific, Automated with github ci/cd."
file_glob: true

View File

@@ -0,0 +1,76 @@
name: Firmware
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "Firmware/**"
- ".gitea/workflows/**"
#
jobs:
make_firmware:
runs-on: ubuntu-latest
name: Firmware Builder
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: cd Firmware && make build
- uses: actions/upload-artifact@v2
with:
name: Display_Binaries
path: Firmware/.pio/build/ATmega328P/firmware.*
delint:
runs-on: ubuntu-latest
name: Delinter
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run Delinter
run: cd Firmware && pio check
#

View File

@@ -0,0 +1,99 @@
name: Hardware
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "Hardware/**"
- ".gitea/workflows/**"
#
jobs:
KiCad_Hardware:
runs-on: ubuntu-latest
name: KiCad Hardware
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- uses: INTI-CMNB/KiBot@v2_k7
with:
# Config file
config: Hardware/config.kibot.yaml
# Prefix for output in config file.
dir: _hardwareOutput
# Hardware Files
#
schema: "Hardware/InstrumentVisor/InstrumentVisor.kicad_sch"
board: "Hardware/InstrumentVisor/InstrumentVisor.kicad_pcb"
#
- name: upload results
uses: actions/upload-artifact@v2
with:
name: Board-Hardware
path: _hardwareOutput
dev-publish:
# publish only to devs
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Dev-Publish
needs: [KiCad_Hardware]
steps:
- uses: actions/download-artifact@v2
with:
name: Board-Hardware
- name: Upload KiCAD Artifacts
uses: edunad/actions-image@v2.0.3
with:
path: "*-3D_top.png"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
title: "PCB"
publish:
# Only run on tags
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
name: Publish
needs: [KiCad_Hardware]
steps:
# Be in our repo
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: Board-Hardware
- run: mkdir -p _staging/
- run: cp *.step _staging/
# Copy gerbers
- run: cp PCBWay/*.zip _staging/Board-$(git rev-parse --short HEAD)-PCBWay.zip
- run: cp JLCPCB/*.zip _staging/Board-$(git rev-parse --short HEAD)-JLCPCB.zip
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "_staging/*"
tag: ${{ github.ref }}
overwrite: true
prerelease: true
#
body: "Kitsune Scientific, Automated with github ci/cd."
file_glob: true