name: CI on: [push, pull_request] jobs: build-ubuntu: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Set environment variables id: vars run: | echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - name: Dependency packages (apt) run: | sudo apt update sudo apt -y install git gcc-arm-none-eabi python3-pip srecord stm32flash zip - name: Dependency packages (pip) run: python3 -m pip install --user bitarray crcmod pyserial - name: Build dist run: | export P=greaseweazle-firmware export V=${{ steps.vars.outputs.sha_short }} make dist mkdir -p _cidist rm $P-v*.zip mv $P-v* $P-$V rm $P-$V/RELEASE_NOTES git rev-parse HEAD >$P-$V/COMMIT zip -r $P-$V.zip $P-$V mv $P-$V.zip _cidist/ - name: Build debug dist run: | export P=greaseweazle-firmware export V=${{ steps.vars.outputs.sha_short }}-debug env debug=y make dist rm $P-v*.zip mv $P-v* $P-$V rm $P-$V/RELEASE_NOTES git rev-parse HEAD >$P-$V/COMMIT echo debug >>$P-$V/COMMIT zip -r $P-$V.zip $P-$V mv $P-$V.zip _cidist/ - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: greaseweazle-firmware.ci.${{ steps.vars.outputs.sha_short }} path: _cidist