Skip to content

Commit

Permalink
Merge pull request #137 from jacobweinstock/build-arm64
Browse files Browse the repository at this point in the history
Refactor multi arch builds:

## Description

<!--- Please describe what this PR is going to change -->
This is attempting to improve the time it takes to build both architectures and splits each image into its own GitHub actions job so that failures can be retried independently. 

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->


## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
jacobweinstock authored Aug 20, 2024
2 parents 010f549 + a72b268 commit c2452a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
strategy:
matrix:
platform: [amd64]
action: [archive2disk,cexec,grub2disk,image2disk,kexec,oci2disk,qemuimg2disk,rootio,slurp,syslinux,writefile]
steps:
- uses: actions/checkout@v4

- name: Build linux/${{ matrix.platform }}
run: make images -j$(nproc) GOOS=linux GOARCH=${{ matrix.platform }}
run: make ${{ matrix.action }} -j$(nproc) GOOS=linux GOARCH=${{ matrix.platform }}
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ env:

jobs:
build:
name: Build
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
action: [archive2disk,cexec,grub2disk,image2disk,kexec,oci2disk,qemuimg2disk,rootio,slurp,syslinux,writefile]
steps:
- uses: actions/checkout@v4

Expand All @@ -32,7 +35,4 @@ jobs:
run: make prepare-release

- name: Run Release
run: make release -j $(nprox)

- name: Clean up Release
run: make clean-release
run: make release-${{ matrix.action }} -j $(nprox)
9 changes: 8 additions & 1 deletion grub2disk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as grub2disk
FROM golang:1.21-alpine AS base

FROM base AS build-amd64
RUN apk add --no-cache grub grub-bios git ca-certificates gcc musl-dev

FROM base AS build-arm64
RUN apk add --no-cache grub git ca-certificates gcc musl-dev

FROM build-${TARGETARCH} AS grub2disk
COPY . /src
WORKDIR /src/grub2disk
RUN --mount=type=cache,sharing=locked,id=gomod,target=/go/pkg/mod/cache \
Expand Down

0 comments on commit c2452a9

Please sign in to comment.