2021-08-20 00:10:42 -07:00
|
|
|
name: Build Firmware
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
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: platformio run -e teensy35 -e teensy36 -e teensy41 -e black_F407VE -e megaatmega2561 -e megaatmega2560
|
2021-08-20 01:55:49 -07:00
|
|
|
|
|
|
|
- name: Upload to Speeduino server
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
env:
|
|
|
|
WEB_PWD: ${{ secrets.WEB_PWD }}
|
|
|
|
run: |
|
|
|
|
curl -v https://speeduino.com:2078 || true
|
|
|
|
curl -v --tlsv1.2 --ipv4 --user "speeduino_firmware@speeduino.com:$WEB_PWD" --basic -T "./.pio/build/megaatmega2560/firmware.hex" "https://speeduino.com:2078/bin/master.hex"
|
|
|
|
curl -v --tlsv1.2 --ipv4 --user "speeduino_firmware@speeduino.com:$WEB_PWD" --basic -T "./.pio/build/teensy35/firmware.hex" "https://speeduino.com:2078/teensy35/master-teensy35.hex"
|
|
|
|
curl -v --tlsv1.2 --ipv4 --user "speeduino_firmware@speeduino.com:$WEB_PWD" --basic -T "./.pio/build/teensy36/firmware.hex" "https://speeduino.com:2078/teensy36/master-teensy36.hex"
|
|
|
|
curl -v --tlsv1.2 --ipv4 --user "speeduino_firmware@speeduino.com:$WEB_PWD" --basic -T "./.pio/build/teensy41/firmware.hex" "https://speeduino.com:2078/teensy41/master-teensy41.hex"
|
|
|
|
curl --tlsv1.2 --ipv4 --user "speeduino_firmware@speeduino.com:$WEB_PWD" --basic -T "./reference/speeduino.ini" "https://speeduino.com:2078/master.ini"
|
2021-08-20 15:32:15 -07:00
|
|
|
|
2021-08-20 15:52:45 -07:00
|
|
|
- name: Slack Notification (Passed)
|
2021-08-20 15:32:15 -07:00
|
|
|
uses: rtCamp/action-slack-notify@v2
|
2021-08-20 15:52:45 -07:00
|
|
|
if: success()
|
2021-08-20 15:32:15 -07:00
|
|
|
env:
|
|
|
|
SLACK_CHANNEL: git
|
|
|
|
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
|
|
|
|
SLACK_ICON: https://avatars.githubusercontent.com/u/9919?v=4&size=48
|
2021-08-20 15:52:45 -07:00
|
|
|
SLACK_TITLE: Firmware build was successful :white_check_mark:
|
2021-08-20 15:32:15 -07:00
|
|
|
SLACK_USERNAME: Github
|
|
|
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
2021-08-20 15:52:45 -07:00
|
|
|
MSG_MINIMAL: actions url, commit
|
|
|
|
|
|
|
|
- name: Slack Notification (Failed)
|
|
|
|
uses: rtCamp/action-slack-notify@v2
|
|
|
|
if: failure()
|
|
|
|
env:
|
|
|
|
SLACK_CHANNEL: git
|
|
|
|
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
|
|
|
|
SLACK_ICON: https://avatars.githubusercontent.com/u/9919?v=4&size=48
|
|
|
|
SLACK_TITLE: Firmware build FAILED :warning:
|
|
|
|
SLACK_USERNAME: Github
|
|
|
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
|
|
|
MSG_MINIMAL: actions url, commit
|