Update repositories, reenable ROCm on selfhosted runner, add packages… #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ISO on selfhosted runner (ROCm) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
vm-start: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Start virtual machine | |
run: | | |
# Do nothing for now | |
exit 0 | |
build: | |
needs: vm-start | |
runs-on: self-hosted | |
steps: | |
- 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 --rm --volume ${{ github.workspace }}:/workspace | |
run: | | |
# Exit on error | |
set -eu | |
# Enter project directory | |
pushd /workspace | |
# Install dependencies | |
.ci/dependencies.sh | |
# Patch mkarchiso | |
.ci/mkarchiso.sh | |
# Configure to use ROCm | |
.ci/configure.py rocm | |
popd | |
# Build image | |
mkarchiso -v -m iso -w /_work -o /workspace/out /workspace | |
- name: Create summary | |
run: | | |
# Exit on error | |
set -eu | |
# Print checksums to summary | |
sha256sum out/* > "$GITHUB_STEP_SUMMARY" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archiso-output | |
path: out/ | |
vm-shutdown: | |
needs: build | |
runs-on: self-hosted | |
steps: | |
- name: Stop virtual machine | |
run: | | |
# Shutdown in 1 minute | |
sudo shutdown 1 | |
vm-shutdown-wait: | |
needs: vm-shutdown | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait until virtual machine is stopped | |
run: | | |
# Wait for 2 minutes | |
sleep 120 |