Skip to content

Commit

Permalink
AlmaLinux 9.x aarch64 support AlmaLinux#18
Browse files Browse the repository at this point in the history
  • Loading branch information
yuravk committed Nov 1, 2024
1 parent 03b49aa commit 4b1b771
Showing 1 changed file with 47 additions and 23 deletions.
70 changes: 47 additions & 23 deletions .github/workflows/build-media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ on:
default: false

jobs:
build-x86_64:
matrix-x86_64:
name: ${{ matrix.version }} ${{ matrix.arch }} ${{ matrix.image_type }}
runs-on: ubuntu-latest
if: inputs.version_major == '8' || inputs.version_major == '9' || inputs.version_major == '10-kitten'
# if: inputs.version_major == '8' || inputs.version_major == '9' || inputs.version_major == '10-kitten'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -111,8 +111,8 @@ jobs:
uses: actions/checkout@v4


build-aarch64:
name: ${{ matrix.version == '9' && format('{0} {1} {2}', inputs.version_major, matrix.arch, matrix.image_type) || format('{0} aarch64 [EXCLUDED]', inputs.version_major) }}
start-aarch64-runner:
name: ${{ matrix.version == '9' && format('Runner for {0} {1} {2}', inputs.version_major, matrix.arch, matrix.image_type) || format('Runner for {0} aarch64 [EXCLUDED]', inputs.version_major) }}
# name: ${{ inputs.version_major }} ${{ matrix.arch }} ${{ matrix.image_type }}
runs-on: ubuntu-latest
# if: inputs.version_major == '9'
Expand All @@ -130,27 +130,51 @@ jobs:
- version: 10-kitten
arch: aarch64

# release_variant: ${{ fromJSON(format('["{0}"]', ( inputs.version_major == '10-kitten' && '10-kitten", "10-kitten-x86_64_v2' || inputs.version_major ) )) }}
# exclude:
# - image_type: 'false'
# - release_variant: '10-kitten-x86_64_v2'
# image_type: 'KDE'
# - release_variant: '10-kitten-x86_64_v2'
# image_type: 'MATE'
# - release_variant: '10-kitten-x86_64_v2'
# image_type: 'XFCE'
# # TODO: these excludes need to be later removed
# - release_variant: '10-kitten'
# image_type: 'KDE'
# - release_variant: '10-kitten'
# image_type: 'MATE'
# - release_variant: '10-kitten'
# image_type: 'XFCE'

steps:
- name: Setup and start the runner
id: start-ec2-runner
uses: NextChapterSoftware/[email protected]
with:
github_token: ${{ secrets.GIT_HUB_TOKEN }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
ec2_ami_id: ${{ secrets[format('EC2_AMI_ID_AL{0}', matrix.version)] }}
ec2_subnet_id: ${{ secrets.EC2_SUBNET_ID}}
ec2_security_group_id: ${{ secrets.EC2_SECURITY_GROUP_ID }}

ec2_instance_type: t4g.medium # 2 vCPU and 4 GiM Memory
ec2_root_disk_size_gb: "16" # override default size which is too small for images
ec2_root_disk_ebs_class: "gp3" # use faster and cheeper storage instead of default 'gp2'
ec2_instance_ttl: 60 # Optional (default is 60 minutes)
ec2_spot_instance_strategy: None # Other options are: SpotOnly, BestEffort, MaxPerformance
ec2_instance_tags: > # Required for IAM role resource permission scoping
[
{"Key": "Project", "Value": "GitHub Actions Self-hosted Runners"}
]
build-aarch64:
if: ${{ always() && contains(join(needs.start-aarch64-runner.result, ','), 'success') }}
name: ${{ matrix.version == '9' && format('{0} {1} {2}', inputs.version_major, matrix.arch, matrix.image_type) || format('{0} aarch64 [EXCLUDED]', inputs.version_major) }}
runs-on: ${{ github.run_id }}
needs: [start-aarch64-runner]
strategy:
fail-fast: false
matrix:
# Set image types matrix based on boolean inputs.* with true value
image_type: ${{ fromJSON(format('["{0}", "{1}", "{2}", "{3}", "{4}"]', ( inputs.GNOME && 'GNOME' ), ( inputs.GNOME-Mini && 'GNOME-Mini' ), ( inputs.KDE && 'KDE' ), ( inputs.MATE && 'MATE' ), ( inputs.XFCE && 'XFCE' ) )) }}
version: ${{ fromJSON(format('["{0}"]', inputs.version_major)) }}
arch: [aarch64]
exclude:
- version: 8
arch: aarch64
# TODO: these excludes need to be later removed
- version: 10-kitten
arch: aarch64

- name: Checkout ${{ github.action_repository }}
uses: actions/checkout@v4
steps:
- name: Checkout ${{ github.action_repository }}
uses: actions/checkout@v4

# - name: Prepare envirounment variables
# run: |
Expand Down

0 comments on commit 4b1b771

Please sign in to comment.