Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git commit hash to fw version #18

Merged
merged 3 commits into from
Aug 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/arduino-cli-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ jobs:

- name: Setting up Arduino-cli
run: arduino-cli core install rp2040:rp2040 --additional-urls https://github.com/SeongGino/arduino-pico/releases/download/3.9.2-fix/package_rp2040_fix_index_orig.json

- name: Get short SHA
id: get-short-sha
run: |
id=$(echo ${{github.sha}} | cut -c 1-7)
echo "id=$id" >> $GITHUB_OUTPUT

- name: Compile for ${{ matrix.name }}
run: arduino-cli compile -e --fqbn rp2040:rp2040:${{matrix.fqbn}}:${{matrix.flags}} SamcoEnhanced --libraries libraries --build-property "build.extra_flags=-DPLAYER_NUMBER=1 -DDUAL_CORE -DMAMEHOOKER -DUSES_SOLENOID -DUSES_TEMP -DUSES_RUMBLE -DUSES_SWITCHES -DUSES_ANALOG -DFOURPIN_LED -DCUSTOM_NEOPIXEL -DUSES_DISPLAY"
run: arduino-cli compile -e --fqbn rp2040:rp2040:${{matrix.fqbn}}:${{matrix.flags}} SamcoEnhanced --libraries libraries --build-property 'build.extra_flags=-DPLAYER_NUMBER=1 -DGIT_HASH="${{steps.get-short-sha.outputs.id}}" -DDUAL_CORE -DMAMEHOOKER -DUSES_SOLENOID -DUSES_TEMP -DUSES_RUMBLE -DUSES_SWITCHES -DUSES_ANALOG -DFOURPIN_LED -DCUSTOM_NEOPIXEL -DUSES_DISPLAY'

- name: Rename build file
run: cp ${{github.workspace}}/SamcoEnhanced/build/rp2040.rp2040.${{matrix.fqbn}}/SamcoEnhanced.ino.uf2 OpenFIREfw.${{ matrix.pretty }}.uf2
Expand Down
Loading