Skip to content

Commit

Permalink
Merge pull request #101 from docgalaxyblock/main
Browse files Browse the repository at this point in the history
feat: add checksum to firmware.zip
  • Loading branch information
ClemensElflein committed May 29, 2024
2 parents 89aa842 + 8f3a6da commit f47feeb
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 35 deletions.
84 changes: 66 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,78 @@
name: CI

on: [push]
on:
push:
paths-ignore:
- "**.md"

pull_request:
branches:
- 'main'

workflow_dispatch:

# Allow to stop obsolete workflows
concurrency:
group: ci-buildtrain-${{ github.ref }}-1
cancel-in-progress: true



jobs:

erc-drc-checks:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: INTI-CMNB/KiBot@v2_k8
with:
config: Hardware/OpenMowerMainboard/OpenMowerMainboard.kibot.yaml
board: Hardware/OpenMowerMainboard/OpenMowerMainboard.kicad_pcb
verbose: 1

- uses: INTI-CMNB/KiBot@v2_k7
with:
config: Hardware/DockStation/mower_PowerDeviceCarrier.kibot.yaml
board: Hardware/DockStation/mower_PowerDeviceCarrier.kicad_pcb
verbose: 1



firmware:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run -d Firmware/LowLevel

- name: Copy Artifacts
run: |
Expand Down Expand Up @@ -111,24 +139,29 @@ jobs:
cp Firmware/LowLevel/.pio/build/0_9_X_WT901_IGNORE_CHARGING_CURRENT/firmware.uf2 ./artifacts/0_9_X_WT901_IGNORE_CHARGING_CURRENT
- name: Step 3 - Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v3
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: open-mower-pico-firmware
path: artifacts/



tagged-release:
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
needs: firmware

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: INTI-CMNB/KiBot@v2_k7
with:
config: Hardware/OpenMowerMainboard/OpenMowerMainboard.kibot.yaml
board: Hardware/OpenMowerMainboard/OpenMowerMainboard.kicad_pcb

- uses: INTI-CMNB/KiBot@v2_k7
with:
config: Hardware/DockStation/mower_PowerDeviceCarrier.kibot.yaml
Expand All @@ -137,13 +170,19 @@ jobs:
- name: 'Fix permissions on release/'
run: sudo chmod 0777 release

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: open-mower-pico-firmware
path: firmware

- name: Create firmware zip
run: zip -r release/firmware.zip firmware
run: |
zip -r release/firmware.zip firmware
- name: Calculating checksum
shell: bash
run: |
sha256sum release/firmware.zip > release/firmware.sha256
- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand All @@ -152,48 +191,57 @@ jobs:
files: release/*

- name: Deploy release
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: release
destination_dir: release

- name: Deploy release_navigator
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: release_navigator
destination_dir: release_navigator
keep_files: true

- name: Deploy release_navigator index
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: release_navigator
keep_files: true



pre-release-latest-firmware:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
needs: firmware
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: open-mower-pico-firmware
path: firmware

- name: Create firmware zip
run: zip -r firmware.zip firmware
run: |
zip -r firmware.zip firmware
- name: Calculating checksum
shell: bash
run: |
sha256sum firmware.zip > firmware.sha256
- uses: "marvinpinto/action-automatic-releases@latest"
if: github.event_name != 'pull_request'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: "Latest Firmware"
automatic_release_tag: "latest"
prerelease: true
files: firmware.zip
files: firmware.{sha256,zip}
52 changes: 35 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,45 @@
Hello! With a background in software engineering, embedded programming, hardware design, and robotics, I'm on the lookout for new challenges.
If you're in search of someone with my skills, let's team up and create something amazing! https://x-tech.online/

# OpenMower - The DIY Smart Mowing Robot for Everyone

![OpenMower the DIY smart robot mower](./img/open_mower_header.jpg)[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/jE7QNaSxW7)

# Join the Discord server for OpenMower discussion: [HERE](https://discord.gg/jE7QNaSxW7)



*:warning: DISCLAIMER:**

**IF YOU ARE NOT 100% SURE WHAT YOU ARE DOING, PLEASE DON'T TRY THIS AT HOME! ASK IN [DISCORD](https://discord.gg/jE7QNaSxW7), IF YOU HAVE ANY QUESTIONS!**

# This project is active!
This is the hardware repository, so it might seem that the project is inactive, since hardware is pretty stable by now.
Most of the development work is done on the ROS code here: https://github.com/ClemensElflein/open_mower_ros

<br>
<hr>
<br>
<p align="center">
<a>
<h1 align="center">OpenMower - The DIY Smart Mowing Robot for Everyone</h1>
<img align="center" src="./img/open_mower_header.jpg">
</a>
</p>
<br>
<p align="center">
<a href="#license"><img src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg" /></a></p>
<br>
<p align="center"><b>Join the Discord server for OpenMower discussion:</b>
<p align="center"><a href="https://discord.gg/jE7QNaSxW7" target="_blank"><img src="https://badgen.net/badge/icon/discord?icon=discord&label" /></a></p>
</p>
<br>
<br>

> [!WARNING]
> <p align="center"><b>DISCLAIMER:</b></p>
>
> **IF YOU ARE NOT 100% SURE WHAT YOU ARE DOING, PLEASE DON'T TRY THIS AT HOME! ASK IN [DISCORD](https://discord.gg/jE7QNaSxW7), IF YOU HAVE ANY QUESTIONS!**
> [!IMPORTANT]
> <p align="center"><b>This project is active!</b></p>
>
> This is the hardware repository, so it might seem that the project is inactive, since hardware is pretty stable by now.
> Most of the development work is done on the ROS code here: https://github.com/ClemensElflein/open_mower_ros
<br>

# About the Project

If you want to see a quick overview, you can check out this video:

<a href="https://www.youtube.com/watch?v=BSF04i3zNGw" target="_blank"><img src="https://user-images.githubusercontent.com/2864655/161540069-f4263fa7-a47b-49d2-a7bc-d1cdc3a47704.jpg" /></a>
<p align="center">
<a href="https://www.youtube.com/watch?v=BSF04i3zNGw" target="_blank"><img src="https://user-images.githubusercontent.com/2864655/161540069-f4263fa7-a47b-49d2-a7bc-d1cdc3a47704.jpg" /></a>
</p>



Expand Down Expand Up @@ -155,6 +172,7 @@ If you want to have a look at the disassembled mowers, check the Google Docs [he
This page only contains the basic overview of the project. To follow my current development state, check out my [Blog](https://x-tech.online/).

# Patents, Local Laws, Liability

Before building a robot based on the designs published here, please make sure that you are allowed to do so in your specific regions.
There may be patents and / or laws prohibiting you of doing so.

Expand Down

0 comments on commit f47feeb

Please sign in to comment.