Skip to content

apps: github action workflow downloads clang-tool-chain tar and insta… #99

apps: github action workflow downloads clang-tool-chain tar and insta…

apps: github action workflow downloads clang-tool-chain tar and insta… #99

Workflow file for this run

name: ez80-for-rc
on:
push:
branches:
- '**'
tags:
- '**'
paths-ignore:
- 'clang-tool-chain/**'
- .github/workflows/clang-tool-chain.yml
jobs:
hardware:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: pull docker tool chain
run: |
docker pull dinoboards/wincupl:0.0.1
- name: build hardware jed file
run: |
docker run -v ./hardware/:/ez80-for-rc/hardware/ --privileged=true -t dinoboards/wincupl:0.0.1 ./make-jed.sh
- name: Archive hardware
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: hardware
path: |
hardware/bin
firmware:
runs-on: ubuntu-latest
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: 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: firmware
path: |
firmware/bin
- 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: copy z80-rc-firmware-release.hex
uses: actions/download-artifact@v4
with:
name: z80-rc-firmware-release.hex
path: programmer/build/
- name: copy version.inc
uses: actions/download-artifact@v4
with:
name: version.inc
path: programmer/
- name: pull docker tool chain
run: |
docker pull dinoboards/pipico:0.0.2
- 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 Programmer PI Pico Firmware
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: pi-pico-firmware
path: |
programmer/build/programmer.uf2
apps:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: pull docker tool chain
run: |
docker pull z88dk/z88dk
- name: install ez80-clang
run: |
wget --progress=dot:giga https://github.com/dinoboards/ez80-clang/releases/download/v0.0.5/ez80-clang-0.0.5.tar.gz
tar -xzvf ez80-clang-0.0.5.tar.gz
cd ez80-clang-0.0.5
sudo ./install.sh
source /home/runner/.ez80-clang
- name: build apps
working-directory: apps
run: |
source /home/runner/.ez80-clang
env
which ez80-clang
ls -larts /opt/ez80-clang/bin
ez80-clang --version
/opt/ez80-clang/bin/ez80-clang --version
/opt/ez80-clang/bin/clang-15 --version
make
- name: Archive apps
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: apps
path: |
apps/bin/release/*.COM
release-notes:
runs-on: ubuntu-latest
needs:
- hardware
- firmware
- programmer
- apps
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: create release notes
run: ./release-notes.sh
- name: Archive release notes
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: release-notes
path: |
releases/CHANGELOG.md
test-for-release-tag:
runs-on: ubuntu-latest
needs: release-notes
outputs:
match: ${{ steps.check_tag.outputs.match }}
steps:
- name: Check if release tag applied
id: check_tag
run: |
if [[ ${{ github.ref_name }} =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
else
echo "match=false" >> $GITHUB_OUTPUT
fi
create-draft-release:
runs-on: ubuntu-latest
needs: test-for-release-tag
if: needs.test-for-release-tag.outputs.match == 'true'
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Download hardware artifact
uses: actions/download-artifact@v4
with:
name: hardware
path: ./hardware/bin
- name: Download firmware artifact
uses: actions/download-artifact@v4
with:
name: firmware
path: ./firmware/bin
- name: Download programmer artifact
uses: actions/download-artifact@v4
with:
name: pi-pico-firmware
path: ./programmer/build/
- name: Download apps artifact
uses: actions/download-artifact@v4
with:
name: apps
path: apps/bin/release
- name: Download release notes
uses: actions/download-artifact@v4
with:
name: release-notes
path: releases
- name: Create directory structure and copy files
run: |
mkdir -p releases/firmware
mkdir -p releases/hardware
mkdir -p releases/programmer
mkdir -p releases/apps
cp firmware/bin/* releases/firmware/
cp hardware/bin/* releases/hardware/
cp programmer/build/programmer.uf2 releases/programmer/
cp apps/bin/release/* releases/apps/
- name: Zip all artifacts
run: |
cd releases
zip -r ../release.zip *
- name: Release
uses: softprops/action-gh-release@v2
with:
files: release.zip
body_path: ${{ github.workspace }}/releases/CHANGELOG.md
draft: true
prerelease: true