can.cpp: ups, inverted logic #4
Workflow file for this run
This file contains hidden or 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: Build F0 Firmware | |
| on: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| build-f0-firmware: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path | |
| - name: Download & Install GCC | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
| run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time | |
| wget 'https://github.com/rusefi/build_support/raw/master/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz' -O compiler.tar.xz | |
| tar -xvf compiler.tar.xz | |
| echo "::add-path::`pwd`/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin" | |
| # Make sure the compiler we just downloaded works - just print out the version | |
| - name: Test Compiler | |
| run: arm-none-eabi-gcc -v | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get install srecord libarchive-zip-perl | |
| - name: Build Firmware | |
| working-directory: ./firmware/boards/f0_module | |
| run: ./build_wideband.sh | |
| - name: Commit fresh generated header | |
| if: ${{ github.ref == 'refs/heads/prod-2025-05'}} | |
| run: | | |
| git status | |
| git remote -v | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub F0 header Action" | |
| git add "for_rusefi/*.h" | |
| OUT=$(git commit -m "Auto-generated header" 2>&1) || echo "commit failed, finding out why" | |
| if echo "$OUT" | grep 'nothing to commit\|no changes added'; then | |
| echo "header: looks like nothing to commit" | |
| exit 0 | |
| elif echo "$OUT" | grep 'changed'; then | |
| echo "COMMIT=true" >> $GITHUB_ENV | |
| echo "header: looks like something has changed" | |
| exit 0 | |
| else | |
| echo "header: looks like something unexpected: [$OUT]" | |
| exit 1 | |
| fi | |
| - name: Git Status | |
| run: | | |
| git status | |
| - name: Git Stash | |
| if: ${{env.COMMIT == 'true'}} | |
| run: | | |
| git stash | |
| - name: Git Rebase | |
| if: ${{env.COMMIT == 'true'}} | |
| run: | | |
| echo Fetching only current branch to make things quicker | |
| git fetch $(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} | sed 's!/! !') | |
| git rebase | |
| - name: Git Status again | |
| run: | | |
| git status | |
| - name: Push fresh header | |
| if: ${{ env.COMMIT == 'true'}} | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ github.token }} | |
| branch: ${{ github.ref }} |