Improve hysteresis check to disable the stepper controller #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Firmware | |
on: | |
push: | |
branches: [ master, '*-fixes' ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache pip | |
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@v4 | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
- name: Build test atmel | |
run: platformio run -e megaatmega2560 -e megaatmega2560-6-3 -e megaatmega2560-8-1 -e megaatmega2561 | |
- name: Build test teensy | |
run: platformio run -e teensy35 -e teensy36 -e teensy41 | |
- name: Build test STM32 | |
run: platformio run -e black_F407VE -e BlackPill_F401CC -e BlackPill_F411CE_USB | |
- name: Upload to Speeduino server | |
if: github.event_name != 'pull_request' && github.repository_owner == 'speeduino' && github.ref_name == 'master' | |
env: | |
WEB_PWD: ${{ secrets.WEB_PWD }} | |
run: | | |
curl -v https://speeduino.com:2078 || true | |
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/megaatmega2560/firmware.hex" "https://speeduino.com:2078/bin/master.hex" | |
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/teensy35/firmware.hex" "https://speeduino.com:2078/teensy35/master-teensy35.hex" | |
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/teensy36/firmware.hex" "https://speeduino.com:2078/teensy36/master-teensy36.hex" | |
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/teensy41/firmware.hex" "https://speeduino.com:2078/teensy41/master-teensy41.hex" | |
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/black_F407VE/firmware.bin" "https://speeduino.com:2078/stm32f407/master-stm32f407.bin" | |
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./reference/speeduino.ini" "https://speeduino.com:2078/master.ini" | |
- name: Discord Notification (Build Failed) | |
uses: rjstone/discord-webhook-notify@v1 | |
if: failure() && github.event_name != 'pull_request' && github.repository_owner == 'speeduino' | |
with: | |
severity: error | |
avatarUrl: https://avatars.githubusercontent.com/u/9919?v=4&size=48 | |
username: GitHub | |
description: 'Firmware build FAILED :warning:' | |
details: "**Author:** ${{ github.event.pusher.name }} \n | |
**Commit URL:** ${{ github.event.head_commit.url }} \n | |
**Commit Message:** ${{ github.event.head_commit.message }}" | |
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} |