Skip to content

Commit

Permalink
github-actions: export firmware hex/version into programmer build
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoboards committed Oct 3, 2024
1 parent 5562ba6 commit 672ddfe
Showing 1 changed file with 53 additions and 24 deletions.
77 changes: 53 additions & 24 deletions .github/workflows/ez80-for-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
path: |
hardware/bin
programmer:
firmware:
runs-on: ubuntu-latest

steps:
Expand All @@ -44,52 +44,81 @@ jobs:

- name: pull docker tool chain
run: |
docker pull dinoboards/pipico:0.0.2
docker pull dinoboards/ez80-rc-builder:0.0.1
- name: programmer build
run: |
docker run -v ./programmer:/programmer/ --privileged=true -t dinoboards/pipico:0.0.2 /bin/bash -c "mkdir -p build && cd build && cmake .. && make"
- name: firmware make-debug
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-debug.bat"

- name: Archive Programmer PI Pico Firmware
- name: firmware make-alt-debug
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-alt-debug.bat"

- name: firmware make-release
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-release.bat"

- name: firmware make-alt-release
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-alt-release.bat"

- name: Archive firmware
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: pi-pico-firmware
name: firmware
path: |
programmer/build/programmer.uf2
firmware/bin
firmware:
- name: Release HEX file
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: z80-rc-firmware-release.hex
path: |
firmware/bin/ez80-rc-firmware-release.hex
- name: Version File
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: version.inc
path: |
firmware/src/version.inc
programmer:
runs-on: ubuntu-latest
needs: firmware

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: pull docker tool chain
run: |
docker pull dinoboards/ez80-rc-builder:0.0.1
- name: firmware make-debug
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-debug.bat"
- name: copy z80-rc-firmware-release.hex
uses: actions/download-artifact@v4
with:
name: z80-rc-firmware-release.hex
path: programmer/build/

- name: firmware make-alt-debug
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-alt-debug.bat"
- name: copy version.inc
uses: actions/download-artifact@v4
with:
name: version.inc
path: programmer/

- name: firmware make-release
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-release.bat"
- name: pull docker tool chain
run: |
docker pull dinoboards/pipico:0.0.2
- name: firmware make-alt-release
run: docker run --rm -e CI=${CI} -v ./firmware:/ez80-for-rc/firmware --privileged=true -t dinoboards/ez80-rc-builder:0.0.1 wine cmd.exe /c "make-alt-release.bat"
- name: programmer build
run: |
docker run -v ./programmer:/programmer/ --privileged=true -t dinoboards/pipico:0.0.2 /bin/bash -c "mkdir -p build && cd build && cmake .. && make"
- name: Archive firmware
- name: Archive Programmer PI Pico Firmware
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: firmware
name: pi-pico-firmware
path: |
firmware/bin
programmer/build/programmer.uf2
apps:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 672ddfe

Please sign in to comment.