Skip to content

dev sync fd9f157 - engine load ex #604

dev sync fd9f157 - engine load ex

dev sync fd9f157 - engine load ex #604

Workflow file for this run

name: Build
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: build
run: |
set -x
python -m pip install --upgrade pip
curl -fLO https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.3.1-2.1/xpack-arm-none-eabi-gcc-10.3.1-2.1-linux-x64.tar.gz
cat xpack-arm-none-eabi-gcc-10.3.1-2.1-linux-x64.tar.gz | tar xvz -C . > /dev/null
export GCC_PATH=/$(realpath .)/xpack-arm-none-eabi-gcc-10.3.1-2.1/bin/
export PATH="${PATH}:/$(realpath .)/xpack-arm-none-eabi-gcc-10.3.1-2.1/bin/"
arm-none-eabi-gcc --version
pip install intelhex subprocess32 pyelftools Jinja2
find ./app -type f -name *.bin -exec touch {} +
git submodule update --init
sh ./app/build.sh
git status
pip install --upgrade platformio mido python-rtmidi intelhex
pio run -v --environment squares-and-circles
- name: pack_artifacts
run: |
export hash=$(git rev-parse --short HEAD)
for f in .pio/build/*/*.hex; do
FIRMWARE=$(basename $(dirname ${f%.*}))
HEX_FILE=./${FIRMWARE}_engines_$hash.hex
ZIP_FILE=./${FIRMWARE}_engines_$hash.zip
mv -v "$f" $HEX_FILE
zip -j -9 $ZIP_FILE $HEX_FILE .github/workflows/LICENSE.txt $(dirname ${f%.*})/loader.sha
sha256sum $ZIP_FILE
curl -fs -X PUT -u ${{ secrets.UPLOAD_KEY }} ${{ secrets.LATEST_DROP_FOLDER }}/${FIRMWARE}_engines_latest.zip --upload-file $ZIP_FILE || true
curl -fs -X PUT -u ${{ secrets.UPLOAD_KEY }} ${{ secrets.LATEST_DROP_FOLDER }}/${FIRMWARE}_engines_latest.sha -d "$hash"
done