fix: add printf with vargs support #71
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: CI | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
firmware: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build firmware | |
run: | | |
make build | |
make asm | |
cp build/*.asm firmware/ | |
env: | |
WIFI_SSID: ${{ secrets.WIFI_SSID }} | |
WIFI_PASSWORD: ${{ secrets.WIFI_PASSWORD }} | |
- name: Upload firmware | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firmware | |
path: firmware/ | |
release: | |
runs-on: ubuntu-latest | |
needs: [firmware] | |
if: github.ref == 'refs/heads/v1' | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download firmware | |
uses: actions/download-artifact@v3 | |
with: | |
name: firmware | |
path: firmware/ | |
- name: Prepare for release | |
run: | | |
tar czf firmware.tgz firmware/ | |
ls -al | |
- name: Create release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
vsha=${{ github.sha }} | |
version=$(echo $vsha | cut -b -5) | |
date=$(date -Idate) | |
echo $version | |
gh release create "v1-$version" --latest --title "Release $version" --notes "New firmware version from $date. See flash instructions [on README.md](https://github.com/homebots/vm)" firmware.tgz | |
flash: | |
runs-on: ubuntu-latest | |
needs: [release] | |
steps: | |
- name: Download firmware | |
uses: actions/download-artifact@v3 | |
with: | |
name: firmware | |
path: firmware/ | |
- name: Upload to ESP flash | |
run: | | |
set -e | |
curl -sS -X POST ${{ secrets.ESP_LIVE_URL }}/prepare | |
echo Upload | |
ls firmware/ | |
for i in $(ls firmware/ -1 | grep '0x'); do | |
curl -sS ${{ secrets.ESP_LIVE_URL }}/upload/$i --data-binary @firmware/$i; | |
done | |
echo Flash | |
curl -sS -X POST ${{ secrets.ESP_LIVE_URL }}/flash | |
echo Reset | |
curl -sS -X POST ${{ secrets.ESP_LIVE_URL }}/reset | |
sleep 5 | |
echo Reconnect | |
curl -sS -X POST ${{ secrets.ESP_LIVE_URL }}/connect | |
echo Completed |