devsync 021f114 - black screen ?! #562
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: PlatformIO CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: codeberg_sync | |
run: | | |
git remote add --mirror=fetch secondary https://${{ secrets.CODEBERG_AUTH }}@codeberg.org/eh2k/squares-and-circles.git | |
git fetch origin | |
git push secondary --all --force | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
- name: build_SC_DSM0 | |
run: | | |
set -x | |
git submodule update --init | |
pio pkg install --environment SC_DSM0 | |
pio run -v --environment SC_DSM0 | |
pio run -v --environment SC_DSM0 -t upload || true | |
hex=$(echo .pio/build/*/*.hex) | |
rm -f $hex; | |
mv .pio/build/*/*.eh2k $hex; | |
- name: build_OC_T40 | |
run: | | |
git submodule update --init | |
pio run --environment OC_T40 | |
- name: pack_artifacts | |
run: | | |
export hash=$(git rev-parse --short HEAD) | |
mv .github/workflows/LICENSE.txt ./LICENSE.txt | |
for f in .pio/build/*/*.hex; do | |
FIRMWARE=$(basename $(dirname ${f%.*})) | |
HEX_FILE=./firmware_${FIRMWARE}_$hash.hex | |
ZIP_FILE=./firmware_${FIRMWARE}_$hash.zip | |
mv -v "$f" $HEX_FILE | |
zip -j $ZIP_FILE $HEX_FILE ./LICENSE.txt | |
sha256sum $ZIP_FILE | |
curl -fs -X PUT -u ${{ secrets.UPLOAD_KEY }} ${{ secrets.LATEST_DROP_FOLDER }}/${FIRMWARE}_latest.zip --upload-file $ZIP_FILE || true | |
curl -fs -X PUT -u ${{ secrets.UPLOAD_KEY }} ${{ secrets.LATEST_DROP_FOLDER }}/${FIRMWARE}_latest.sha -d "$hash" | |
done | |
- name: firmware_artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: firmware-${{ github.sha }} | |
path: | | |
./firmware*.hex | |
./LICENSE.txt |