Skip to content

Commit

Permalink
Merge pull request #2 from vortigont/citool
Browse files Browse the repository at this point in the history
Add GitHub CI Builder
  • Loading branch information
vortigont authored Mar 25, 2024
2 parents e79c906 + cf3bb44 commit 4bbdaa4
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
81 changes: 81 additions & 0 deletions .github/workflows/pio_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# CI Build runner with Platformio
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# https://docs.platformio.org/en/latest/integration/ci/github-actions.html

name: PlatformIO CI

on:
workflow_dispatch: # Manual start
push:
# branches: [ master, feat ]
paths:
- '**.c'
- '**.cpp'
- '**.h'
- '**.hpp'
- '**.ini'
#- '**.yml'
pull_request:
branches: [ master]
paths:
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
#paths-ignore:
# - '.github/**'

# one task per branch/env at a time
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true

jobs:
esp32:
runs-on: ubuntu-latest
if: github.repository == 'vortigont/ESPIron-PTS200'
continue-on-error: false
strategy:
matrix:
variant:
- pts200
- pts200debug

steps:
- uses: actions/checkout@v4
- name: PIP Cache
id: cache-pip
uses: actions/cache@v4
env:
cache-name: cache-pip-pkgs
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{env.cache-name}}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Platformio Cache
id: cache-pio
uses: actions/cache@v4
env:
cache-name: cache-pio-pkgs
with:
path: |
~/.platformio/.cache
key: ${{ runner.os }}-pio-${{env.cache-name}}
restore-keys: |
${{ runner.os }}-pio-
${{ runner.os }}-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Platformio
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
#platformio pkg update
- name: Run PlatformIO build
run: |
platformio run -e ${{ matrix.variant }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.vscode
.DS_Store
.idea
.lnk
platformio_*.ini
SolderingPen_ESP32S2/build
SolderingPen_ESP32S2/.idea
SolderingPen_ESP32S2/.idea
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![PlatformIO CI](https://github.com/vortigont/ESPIron-PTS200/actions/workflows/pio_build.yml/badge.svg)](https://github.com/vortigont/ESPIron-PTS200/actions/workflows/pio_build.yml)

# ESPIron PTS200

Firmware for [Feizer PTS200](https://www.aliexpress.com/store/1102411999) soldering iron.
Expand Down
27 changes: 27 additions & 0 deletions lnk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

PROJ=pts200

#echo "making link"
#rm -rf .pio
if ! test -d ~/tmpfs/zram/$PROJ ; then
echo "making zram dirs"
mkdir -p ~/tmpfs/zram/$PROJ/build ~/tmpfs/zram/$PROJ/libdeps
fi

if ! test -d .pio ; then
echo "making .pio dir"
mkdir .pio
fi

if ! test -d .pio/build || ! test -L .pio/build ; then
echo "symlinking to temp dir"
rm -rf ./.pio/build
ln -s ~/tmpfs/zram/$PROJ/build .pio/build
fi

#if ! test -d .pio/libdeps || ! test -L .pio/libdeps ; then
# rm -rf ./.pio/libdeps
# ln -s ~/tmpfs/zram/$PROJ/build .pio/libdeps
#fi

25 changes: 13 additions & 12 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
src_dir = SolderingPen_ESP32S2
default_envs = pts200
extra_configs =
platformio_*.ini

[env:solderingpen]
[pts200_base]
framework = arduino
platform = espressif32
board_build.filesystem = littlefs
board = PTS200
framework = arduino

[env:pts200]
extends = pts200_base
lib_deps =
;lennarthennigs/Button2 @ ^2.2.2
vdeconinck/QC3Control @ ^1.4.1
Expand All @@ -27,3 +22,9 @@ lib_deps =
sparkfun/SparkFun LIS2DH12 Arduino Library @ ^1.0.3
arkhipenko/TaskScheduler @ ~3.7

[env:pts200debug]
extends = env:pts200
build_flags =
-Wextra
-DPTS200_DEBUG_LEVEL=4
;-D CORE_DEBUG_LEVEL=3

0 comments on commit 4bbdaa4

Please sign in to comment.