diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-02-19 15:45:13 +0000 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-02-24 20:30:57 +0000 |
commit | 0e0afae6579c1efe9f0d85505b75ffe989554133 (patch) | |
tree | 6ab94f233f8ae8aa93a495cc66e05dea7f9cf451 | |
parent | 5f20278340f1a96c27f38c40962b20a9a095d7f9 (diff) | |
download | qemu-openbios-0e0afae6579c1efe9f0d85505b75ffe989554133.tar.gz |
.github/workflows: add release.yml for generating an OpenBIOS release
This is a GitHub push action that builds OpenBIOS for all of the currently
supported architectures (amd64, sparc32, sparc64, ppc and x86) and a new
GitHub release consisting of an output zip file containing debug and release
binaries, along with the source in .tar.gz and .zip formats.
A release build is triggered by pushing a tag beginning with "v" indicating a
version number in contrast to pushing a branch.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r-- | .github/workflows/release.yml | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..908837f0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,101 @@ +name: Release OpenBIOS + +on: + push: + # Build for release tags only + branches: + - "!*" + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + name: OpenBIOS release for amd64 ppc sparc32 sparc64 x86 + container: + image: ghcr.io/openbios/openbios-builder:master + steps: + - name: Checkout OpenBIOS + uses: actions/checkout@v2 + + - name: Backup Makefile.target + run: cp Makefile.target Makefile.target.orig + + - name: Configure debug + run: | + cat Makefile.target.orig | sed 's#CFLAGS+= -Os#CFLAGS+= -O0#g' > Makefile.target + ./config/scripts/switch-arch amd64 ppc sparc32 sparc64 x86 + + - name: Build debug + run: "make V=1" + + - name: Move debug build + run: "mkdir -p debug && mv obj-* debug" + + - name: Configure release + run: | + cp Makefile.target.orig Makefile.target + ./config/scripts/switch-arch amd64 ppc sparc32 sparc64 x86 + + - name: Build release + run: "make V=1" + + - name: Move release build + run: "mkdir -p release && mv obj-* release" + + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: "openbios-multiarch-${{ github.ref_name }}" + path: | + debug/obj-x86/*.dict + debug/obj-x86/openbios-builtin* + debug/obj-x86/openbios.multiboot* + debug/obj-x86/openbios-multiboot.syms + debug/obj-x86/QEMU,VGA.bin + debug/obj-amd64/openbios-unix + debug/obj-amd64/*.dict + debug/obj-ppc/*.dict + debug/obj-ppc/openbios-qemu* + debug/obj-ppc/QEMU,VGA.bin + debug/obj-sparc32/*.dict + debug/obj-sparc32/openbios-builtin* + debug/obj-sparc32/QEMU,cgthree.bin + debug/obj-sparc32/QEMU,tcx.bin + debug/obj-sparc64/*.dict + debug/obj-sparc64/openbios-builtin* + debug/obj-sparc64/QEMU,VGA.bin + release/obj-x86/*.dict + release/obj-x86/openbios-builtin* + release/obj-x86/openbios.multiboot* + release/obj-x86/openbios-multiboot.syms + release/obj-x86/QEMU,VGA.bin + release/obj-amd64/openbios-unix + release/obj-amd64/*.dict + release/obj-ppc/*.dict + release/obj-ppc/openbios-qemu* + release/obj-ppc/QEMU,VGA.bin + release/obj-sparc32/*.dict + release/obj-sparc32/openbios-builtin* + release/obj-sparc32/QEMU,cgthree.bin + release/obj-sparc32/QEMU,tcx.bin + release/obj-sparc64/*.dict + release/obj-sparc64/openbios-builtin* + release/obj-sparc64/QEMU,VGA.bin + + - name: Prepare release from artifacts + uses: actions/download-artifact@v2 + with: + name: "openbios-multiarch-${{ github.ref_name }}" + path: archive + + - name: Archive release + run: cd archive && zip -r ../openbios-multiarch-${{ github.ref_name }}.zip debug release && cd .. + + - name: Upload release + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + automatic_release_tag: "${{ github.ref_name }}" + files: "openbios-multiarch-${{ github.ref_name }}.zip" |