Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Fedora-40.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Fedora-40"
image_base_name: "Fedora-40"
sub_images: "build test dev"
17 changes: 9 additions & 8 deletions .github/workflows/Fedora-41-AArch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ name: "Fedora 41 AArch64 Images"

on:
workflow_dispatch:

push:
branches: [ '**' ] # Match all branches
branches: [ main ]
paths:
- 'Fedora-41-AArch64/**'

- 'Fedora-41/**'
pull_request:
branches: [ '**' ] # Match PRs targeting any branch
branches: [ main ]
paths:
- 'Fedora-41-AArch64/**'
- 'Fedora-41/**'

jobs:
Build_Image:
uses: ./.github/workflows/build-image-AArch64.yaml
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Fedora-41-AArch64"
image_base_name: "Fedora-41"
image_suffix: "-aarch64"
sub_images: "build test dev"
runs_on: "ubuntu-24.04-arm"
target_platform: "linux/arm64"
2 changes: 1 addition & 1 deletion .github/workflows/Fedora-41.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Fedora-41"
image_base_name: "Fedora-41"
sub_images: "build test dev"
30 changes: 30 additions & 0 deletions .github/workflows/Fedora-43-AArch64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# GitHub Action Workflow for building the Fedora 43 AArch64 images.

# SPDX-License-Identifier: BSD-2-Clause-Patent

name: "Fedora 43 AArch64 Images"

# This workflow only runs (on the main branch or on PRs targeted
# at the main branch) and if files inside the Fedora-43 directory
# have been modifed/added/removed...

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'Fedora-43/**'
pull_request:
branches: [ main ]
paths:
- 'Fedora-43/**'

jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_base_name: "Fedora-43"
image_suffix: "-aarch64"
sub_images: "build test dev"
runs_on: "ubuntu-24.04-arm"
target_platform: "linux/arm64"
2 changes: 1 addition & 1 deletion .github/workflows/Fedora-43.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Fedora-43"
image_base_name: "Fedora-43"
sub_images: "build test dev"
2 changes: 1 addition & 1 deletion .github/workflows/Ubuntu-22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Ubuntu-22"
image_base_name: "Ubuntu-22"
sub_images: "dev test build"
2 changes: 1 addition & 1 deletion .github/workflows/Ubuntu-24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Ubuntu-24"
image_base_name: "Ubuntu-24"
sub_images: "dev test build"
3 changes: 2 additions & 1 deletion .github/workflows/Windows-2022.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
Build_Image:
uses: ./.github/workflows/build-image.yaml
with:
image_name: "Windows-2022"
image_base_name: "Windows-2022"
sub_images: "build"
runs_on: "windows-latest"
target_platform: "windows/amd64"
94 changes: 0 additions & 94 deletions .github/workflows/build-image-AArch64.yaml

This file was deleted.

35 changes: 25 additions & 10 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,38 @@ name: "Build and Push images"
on:
workflow_call:
inputs:
image_name:
image_base_name:
type: string
required: true
description: "Name of the image to build (= folder name)"
description: "Base name of the image to build (= folder name)."
image_suffix:
type: string
required: false
description: "Arch specific suffix for built image."
default: ""
sub_images:
type: string
required: false
description: "Space-separated list of sub-image names. Can not be empty."
description: "Space-separated list of sub-image names. Cannot be empty."
default: "build"
runs_on:
type: string
required: false
description: "The OS used to build the docker image."
default: "ubuntu-latest"
target_platform:
type: string
required: false
description: "Passed via --platform to Dockerfile to allow extracting specified platform from base image."
default: "linux/amd64"

env:
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
IMAGE_NAME: ${{ inputs.image_name }}
IMAGE_BASE_NAME: ${{ inputs.image_base_name }}
IMAGE_SUFFIX: ${{ inputs.image_suffix }}
SUB_IMAGES: ${{ inputs.sub_images }}
TARGET_PLATFORM: ${{ inputs.target_platform }}

jobs:
build-and-push-image:
Expand All @@ -57,11 +69,14 @@ jobs:

- name: Build
run: |
cd "${IMAGE_NAME}"
cd "${IMAGE_BASE_NAME}"
for sub in $SUB_IMAGES; do
IMG=$(tr '[:upper:]' '[:lower:]' <<< "${REGISTRY}/${REPOSITORY}/${IMAGE_NAME}-${sub}")
IMG=$(tr '[:upper:]' '[:lower:]' <<< "${REGISTRY}/${REPOSITORY}/${IMAGE_BASE_NAME}${IMAGE_SUFFIX}-${sub}")
echo "Building Image: ${IMG}:${short_sha}..."
docker build --target "${sub}" --tag "${IMG}:${short_sha}" -f Dockerfile .
docker build \
--target "${sub}" --tag "${IMG}:${short_sha}" \
--platform ${TARGET_PLATFORM} \
-f Dockerfile .
done
docker images
shell: bash
Expand All @@ -71,7 +86,7 @@ jobs:
run: |
# Only check the last sub-image in the list (for now)
sub=${SUB_IMAGES##* }
IMG=$(tr '[:upper:]' '[:lower:]' <<< "${REGISTRY}/${REPOSITORY}/${IMAGE_NAME}-${sub}:${short_sha}")
IMG=$(tr '[:upper:]' '[:lower:]' <<< "${REGISTRY}/${REPOSITORY}/${IMAGE_BASE_NAME}${IMAGE_SUFFIX}-${sub}:${short_sha}")
echo "Launching ${IMG}..."
docker run \
--rm \
Expand All @@ -85,10 +100,10 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
run: |
for sub in $SUB_IMAGES; do
IMG=$(tr '[:upper:]' '[:lower:]' <<< "${REGISTRY}/${REPOSITORY}/${IMAGE_NAME}-${sub}")
IMG=$(tr '[:upper:]' '[:lower:]' <<< "${REGISTRY}/${REPOSITORY}/${IMAGE_BASE_NAME}${IMAGE_SUFFIX}-${sub}")
echo "Pushing Image: ${IMG}:${short_sha}..."
docker tag "${IMG}:${short_sha}" "${IMG}:latest"
docker push "${IMG}:${short_sha}"
docker push "${IMG}:latest"
done
shell: bash
shell: bash
4 changes: 1 addition & 3 deletions .github/workflows/test_build_edk2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ build_step() {
stuart_build $opts -c "${build}" -a "${arch}"
}

if [ "$(uname -m)" = "x86_64" ]; then
build_step "OvmfPkg/PlatformCI/PlatformBuild.py" "X64"
fi
build_step "OvmfPkg/PlatformCI/PlatformBuild.py" "X64"
build_step "ArmVirtPkg/PlatformCI/QemuBuild.py" "AARCH64"
Loading