This is something I've been keen to do for some time which is to generate an OpenBIOS builder image with the required cross-compilers pre-installed, and then implement workflows so that a push to a branch or a versioned release tag will automatically create OpenBIOS binaries.
One of the barriers to OpenBIOS development is getting the correct cross compilers installed: not just for the architecture being developed on, but also for all current supported architectures to ensure there are no regressions.
Up until now I was unable to find a set of compilers that built working binaries across all architectures, but since Glenn pointed out the existence of the crosstool releases on kernel.org I've done some tests and confirmed that the cross compilers produce working binaries for all of SPARC32, SPARC64 and PPC.
This series adds a manual action to create an openbios-builder image that is then integrated into automated workflows for building debug and release OpenBIOS binaries for all supported architectures (amd64, sparc32, sparc64, ppc and x86). The behaviour is currently very simple:
- A push to a branch will build OpenBIOS binaries, and if it is the upstream openbios repository, generate a "latest" release
- A push to a versioned release tag matching "v*" will build the OpenBIOS binaries and generate a versioned release
For an example of how this will look when merged take a look at the release page of my OpenBIOS fork on GitHub at https://github.com/mcayland/openbios/releases.
As a bonus once this has been merged and the openbios-builder image is pushed to ghcr.io it is possible to perform a local development build with simply:
git clone https://github.com/openbios/openbios.git docker run --rm -it -v "$(pwd)/openbios:/root" ghcr.io/openbios/openbios-builder:master cd /root ./config/scripts/switch-arch sparc32 && make V=1 ... ... exit
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (4): docker: introduce Dockerfile.builder for openbios-builder container .github/workflows: add build-openbios-builder.yml action .github/workflows: add main.yml for building OpenBIOS upon push .github/workflows: add release.yml for generating an OpenBIOS release
.github/workflows/build-openbios-builder.yml | 42 ++++++++ .github/workflows/main.yml | 103 +++++++++++++++++++ .github/workflows/release.yml | 101 ++++++++++++++++++ docker/Dockerfile.builder | 19 ++++ 4 files changed, 265 insertions(+) create mode 100644 .github/workflows/build-openbios-builder.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/release.yml create mode 100644 docker/Dockerfile.builder
This introduces a new Dockerfile.builder file that can be used by docker build to generate a container that can build OpenBIOS based upon Debian 11.2 and the crosstool compilers from kernel.org.
The installed cross-compilers allow the building of SPARC32, SPARC64 and PPC binaries.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- docker/Dockerfile.builder | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docker/Dockerfile.builder
diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder new file mode 100644 index 0000000..b4abf7f --- /dev/null +++ b/docker/Dockerfile.builder @@ -0,0 +1,19 @@ +FROM ghcr.io/openbios/fcode-utils:master AS cross + +RUN apt-get update && \ + apt-get install -y wget xz-utils tar && \ + wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/... && \ + tar Jxf x86_64-gcc-10.1.0-nolibc-sparc64-linux.tar.xz && \ + rm -f x86_64-gcc-10.1.0-nolibc-sparc64-linux.tar.xz && \ + wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/... && \ + tar Jxf x86_64-gcc-10.1.0-nolibc-powerpc-linux.tar.xz && \ + rm -f x86_64-gcc-10.1.0-nolibc-powerpc-linux.tar.xz + +FROM ghcr.io/openbios/fcode-utils:master AS builder + +COPY --from=cross /gcc-10.1.0-nolibc /gcc-10.1.0-nolibc + +RUN apt-get update && \ + apt-get install -y make xsltproc gcc gcc-multilib zip + +ENV PATH /gcc-10.1.0-nolibc/sparc64-linux/bin:/gcc-10.1.0-nolibc/powerpc-linux/bin:$PATH
This is a GitHub manual action that generates a container image from docker/Dockerfile.builder and pushes the result to ghcr.io/openbios/openbios-builder:master for public use.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- .github/workflows/build-openbios-builder.yml | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-openbios-builder.yml
diff --git a/.github/workflows/build-openbios-builder.yml b/.github/workflows/build-openbios-builder.yml new file mode 100644 index 0000000..b31af8a --- /dev/null +++ b/.github/workflows/build-openbios-builder.yml @@ -0,0 +1,42 @@ +name: Build openbios-builder container + +on: + # Run manually from Actions tab + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }}-builder + +jobs: + build-x86_64: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + file: docker/Dockerfile.builder + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}
This is a GitHub push action that builds OpenBIOS for all of the currently supported architectures (amd64, sparc32, sparc64, ppc and x86) and generates an output zip file containing debug and release binaries.
The output zip file is stored both as a build artifact (which has a maximum lifetime of 90 days) and for upstream OpenBIOS builds a "latest" release is added to the repository.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- .github/workflows/main.yml | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/main.yml
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1217d9d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,103 @@ +name: Build OpenBIOS + +on: + push: + # Build for non-release tags only + branches: + - "*" + tags: + - "!v*" + +jobs: + build: + runs-on: ubuntu-latest + name: OpenBIOS build 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-latest + 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 pre-release from artifacts + uses: actions/download-artifact@v2 + with: + name: openbios-multiarch-latest + path: archive + + - name: Archive pre-release + run: cd archive && zip -r ../openbios-multiarch-latest.zip debug release && cd .. + + - name: Upload pre-release (upstream repository only) + if: "${{ env.GITHUB_REPOSITORY_OWNER == 'openbios' }}" + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: true + automatic_release_tag: "latest" + title: "Development Build" + files: openbios-multiarch-latest.zip
On Sat, 19 Feb 2022, Mark Cave-Ayland wrote:
This is a GitHub push action that builds OpenBIOS for all of the currently supported architectures (amd64, sparc32, sparc64, ppc and x86) and generates an output zip file containing debug and release binaries.
The output zip file is stored both as a build artifact (which has a maximum lifetime of 90 days) and for upstream OpenBIOS builds a "latest" release is added to the repository.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
.github/workflows/main.yml | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/main.yml
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1217d9d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,103 @@ +name: Build OpenBIOS
+on:
- push:
- # Build for non-release tags only
- branches:
- "*"
- tags:
- "!v*"
Maybe v[0-9]* or similar is a better pattern for catching the right tags in case one happens to use some other tag starting with a v but maybe it won't happen in practice.
Regards, BALATON Zoltan
+jobs:
- build:
- runs-on: ubuntu-latest
- name: OpenBIOS build 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-latest
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 pre-release from artifacts
uses: actions/download-artifact@v2
with:
name: openbios-multiarch-latest
path: archive
- name: Archive pre-release
run: cd archive && zip -r ../openbios-multiarch-latest.zip debug release && cd ..
- name: Upload pre-release (upstream repository only)
if: "${{ env.GITHUB_REPOSITORY_OWNER == 'openbios' }}"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: "Development Build"
files: openbios-multiarch-latest.zip
On 19/02/2022 17:52, BALATON Zoltan wrote:
On Sat, 19 Feb 2022, Mark Cave-Ayland wrote:
This is a GitHub push action that builds OpenBIOS for all of the currently supported architectures (amd64, sparc32, sparc64, ppc and x86) and generates an output zip file containing debug and release binaries.
The output zip file is stored both as a build artifact (which has a maximum lifetime of 90 days) and for upstream OpenBIOS builds a "latest" release is added to the repository.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
.github/workflows/main.yml | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/main.yml
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1217d9d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,103 @@ +name: Build OpenBIOS
+on: + push: + # Build for non-release tags only + branches: + - "*" + tags: + - "!v*"
Maybe v[0-9]* or similar is a better pattern for catching the right tags in case one happens to use some other tag starting with a v but maybe it won't happen in practice.
I think that's really unlikely given that it's a tag - I'd certainly be more worried if it also covered branches that began with "v", but that isn't the case here.
ATB,
Mark.
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 --- .github/workflows/release.yml | 101 ++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/release.yml
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..908837f --- /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"
On 19/02/2022 16:12, Mark Cave-Ayland wrote:
This is something I've been keen to do for some time which is to generate an OpenBIOS builder image with the required cross-compilers pre-installed, and then implement workflows so that a push to a branch or a versioned release tag will automatically create OpenBIOS binaries.
One of the barriers to OpenBIOS development is getting the correct cross compilers installed: not just for the architecture being developed on, but also for all current supported architectures to ensure there are no regressions.
Up until now I was unable to find a set of compilers that built working binaries across all architectures, but since Glenn pointed out the existence of the crosstool releases on kernel.org I've done some tests and confirmed that the cross compilers produce working binaries for all of SPARC32, SPARC64 and PPC.
This series adds a manual action to create an openbios-builder image that is then integrated into automated workflows for building debug and release OpenBIOS binaries for all supported architectures (amd64, sparc32, sparc64, ppc and x86). The behaviour is currently very simple:
A push to a branch will build OpenBIOS binaries, and if it is the upstream openbios repository, generate a "latest" release
A push to a versioned release tag matching "v*" will build the OpenBIOS binaries and generate a versioned release
For an example of how this will look when merged take a look at the release page of my OpenBIOS fork on GitHub at https://github.com/mcayland/openbios/releases.
As a bonus once this has been merged and the openbios-builder image is pushed to ghcr.io it is possible to perform a local development build with simply:
git clone https://github.com/openbios/openbios.git docker run --rm -it -v "$(pwd)/openbios:/root" ghcr.io/openbios/openbios-builder:master cd /root ./config/scripts/switch-arch sparc32 && make V=1 ... ... exit
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (4): docker: introduce Dockerfile.builder for openbios-builder container .github/workflows: add build-openbios-builder.yml action .github/workflows: add main.yml for building OpenBIOS upon push .github/workflows: add release.yml for generating an OpenBIOS release
.github/workflows/build-openbios-builder.yml | 42 ++++++++ .github/workflows/main.yml | 103 +++++++++++++++++++ .github/workflows/release.yml | 101 ++++++++++++++++++ docker/Dockerfile.builder | 19 ++++ 4 files changed, 265 insertions(+) create mode 100644 .github/workflows/build-openbios-builder.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/release.yml create mode 100644 docker/Dockerfile.builder
I'm planning on doing some more testing on this tomorrow, and will push this to master if everything looks good.
Some background for this work: a future aim of QEMU is to be able to build its own binary firmware images using a docker build image rather than the submitter having to include the binaries within the submodule update PR. Adding the builder image into a workflow also has the advantages that developers who have forked OpenBIOS on github now get build coverage when pushing branches, the docker build image means developers don't have to install their own cross-compilers locally, and pre-built binaries from the latest master are always available for download.
ATB,
Mark.
On 23/02/2022 21:56, Mark Cave-Ayland wrote:
On 19/02/2022 16:12, Mark Cave-Ayland wrote:
This is something I've been keen to do for some time which is to generate an OpenBIOS builder image with the required cross-compilers pre-installed, and then implement workflows so that a push to a branch or a versioned release tag will automatically create OpenBIOS binaries.
One of the barriers to OpenBIOS development is getting the correct cross compilers installed: not just for the architecture being developed on, but also for all current supported architectures to ensure there are no regressions.
Up until now I was unable to find a set of compilers that built working binaries across all architectures, but since Glenn pointed out the existence of the crosstool releases on kernel.org I've done some tests and confirmed that the cross compilers produce working binaries for all of SPARC32, SPARC64 and PPC.
This series adds a manual action to create an openbios-builder image that is then integrated into automated workflows for building debug and release OpenBIOS binaries for all supported architectures (amd64, sparc32, sparc64, ppc and x86). The behaviour is currently very simple:
- A push to a branch will build OpenBIOS binaries, and if it is the upstream
openbios repository, generate a "latest" release
- A push to a versioned release tag matching "v*" will build the OpenBIOS
binaries and generate a versioned release For an example of how this will look when merged take a look at the release page of my OpenBIOS fork on GitHub at https://github.com/mcayland/openbios/releases.
As a bonus once this has been merged and the openbios-builder image is pushed to ghcr.io it is possible to perform a local development build with simply:
git clone https://github.com/openbios/openbios.git docker run --rm -it -v "$(pwd)/openbios:/root" ghcr.io/openbios/openbios-builder:master cd /root ./config/scripts/switch-arch sparc32 && make V=1 ... ... exit
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (4): docker: introduce Dockerfile.builder for openbios-builder container .github/workflows: add build-openbios-builder.yml action .github/workflows: add main.yml for building OpenBIOS upon push .github/workflows: add release.yml for generating an OpenBIOS release
.github/workflows/build-openbios-builder.yml | 42 ++++++++ .github/workflows/main.yml | 103 +++++++++++++++++++ .github/workflows/release.yml | 101 ++++++++++++++++++ docker/Dockerfile.builder | 19 ++++ 4 files changed, 265 insertions(+) create mode 100644 .github/workflows/build-openbios-builder.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/release.yml create mode 100644 docker/Dockerfile.builder
I'm planning on doing some more testing on this tomorrow, and will push this to master if everything looks good.
Some background for this work: a future aim of QEMU is to be able to build its own binary firmware images using a docker build image rather than the submitter having to include the binaries within the submodule update PR. Adding the builder image into a workflow also has the advantages that developers who have forked OpenBIOS on github now get build coverage when pushing branches, the docker build image means developers don't have to install their own cross-compilers locally, and pre-built binaries from the latest master are always available for download.
Applied to master, along with the following diff to fix the upstream repository detection:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1217d9d..41ec7ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,7 @@ jobs: run: cd archive && zip -r ../openbios-multiarch-latest.zip debug release && cd ..
- name: Upload pre-release (upstream repository only) - if: "${{ env.GITHUB_REPOSITORY_OWNER == 'openbios' }}" + if: "${{ github.repository_owner == 'openbios' }}" uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}"
This means it is now possible to download the latest binaries from master at https://github.com/openbios/openbios/releases/download/latest/openbios-multi....
ATB,
Mark.