Skip to content

ROCm support

ROCm support #8

Workflow file for this run

name: Build ISO (ROCm)
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cleanup
uses: rokibhasansagar/slimhub_actions@main
with:
retain: "docker_imgcache,docker_buildkit,docker_imgcache"
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build image
uses: addnab/docker-run-action@v3
with:
image: archlinux:latest
options: --privileged --volume ${{ github.workspace }}:/workspace
run: |
# Exit on error
set -eu
# Refresh package databases
pacman --sync --noconfirm --refresh
# Upgrade system
pacman --sync --noconfirm --sysupgrade
# Install required packages
pacman --sync --noconfirm --needed archiso patch python python-jinja
# Apply patch to archiso
patch -p0 << 'EOF'
--- /usr/bin/mkarchiso
+++ /usr/bin/mkarchiso
@@ -1227,6 +1227,10 @@
if [[ -v cert_list ]]; then
_cms_sign_artifact "${airootfs_image_filename}"
fi
+
+ _msg_info 'Removing the pacstrap directory...'
+ rm -rf -- "${pacstrap_dir:?}/"
+ _msg_info 'Done!'
}
# export build artifacts for netboot
EOF
# Configure to use ROCm
pushd /workspace
python3 .ci/configure.py rocm
popd
# Build image
mkarchiso -v -m iso -w /workspace/work -o /workspace/out /workspace
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: archiso-output
path: out/