Build x86_64/rocm/tensorflow-rocm #641
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: Builder (Self-hosted x86_64) | |
run-name: Build ${{ inputs.pkgbase }} | |
on: | |
workflow_dispatch: | |
inputs: | |
pkgbase: | |
description: 'Path to pkgbase' | |
required: true | |
jobs: | |
build: | |
runs-on: X64 | |
timeout-minutes: 4320 | |
container: | |
image: archlinux | |
options: --privileged --memory-swap -1 --memory-swappiness 100 | |
volumes: | |
- /build:/mnt | |
- /build:/var/cache/pacman | |
env: | |
CACTUS_CONFIG: ${{ secrets.CACTUS_CONFIG }} | |
steps: | |
- name: Install runtime dependencies | |
run: | | |
mkdir -p /mnt/sync /var/lib/pacman | |
rm -rf /var/lib/pacman/sync | |
ln -sf /mnt/sync /var/lib/pacman/sync | |
[ -f /mnt/mirrorlist ] && cp /mnt/mirrorlist /etc/pacman.d/ | |
pacman-key --init | |
pacman -Syu --noconfirm | |
pacman -S --noconfirm --needed base-devel devtools dbus git github-cli jq pacman-contrib pyalpm python-mysqlclient wget yq zsh | |
- uses: arch4edu/cactus/actions/setup-cactus@main | |
- name: Export configurations | |
id: config | |
run: python -m cactus.common.config | |
- uses: arch4edu/cactus/actions/update-status@main | |
with: | |
pkgbase: ${{ github.event.inputs.pkgbase }} | |
status: building | |
workflow: ${{ github.run_id }} | |
- uses: actions/checkout@master | |
with: | |
repository: ${{ steps.config.outputs.github_repository }} | |
path: repository | |
token: ${{ steps.config.outputs.github_token }} | |
- uses: arch4edu/cactus/actions/config-pacman-repository@main | |
with: | |
pacman-repository: ${{ steps.config.outputs.pacman_repository }} | |
keyring-repository: ${{ steps.config.outputs.pacman_keyring_repository }} | |
mirrorlist-repository: ${{ steps.config.outputs.pacman_mirrorlist_repository }} | |
- uses: arch4edu/cactus/actions/config-makepkg@main | |
- uses: petronny/git-config-user@master | |
with: | |
path: repository | |
- name: Configure GitHub CLI | |
run: echo ${{ steps.config.outputs.github_token }} | gh auth login --with-token | |
- name: Add path | |
run: echo "$(realpath cactus/builder/bin)" >> $GITHUB_PATH | |
- name: Download dependencies | |
run: python -m cactus.builder.download-depends repository ${{ github.event.inputs.pkgbase }} | |
- uses: arch4edu/cactus/actions/build-package@main | |
id: build | |
with: | |
pkgbase: ${{ github.event.inputs.pkgbase }} | |
- uses: arch4edu/cactus/actions/upload-log@main | |
with: | |
pkgbase: ${{ github.event.inputs.pkgbase }} | |
- uses: arch4edu/cactus/actions/upload-package@main | |
if: ${{ steps.build.outputs.result == 'built' }} | |
with: | |
pkgbase: ${{ github.event.inputs.pkgbase }} | |
- name: Push changes | |
if: ${{ steps.build.outputs.result == 'built' }} | |
run: | | |
cd repository/${{ github.event.inputs.pkgbase }} | |
git-push | |
- uses: arch4edu/cactus/actions/update-status@main | |
if: ${{ always() }} | |
with: | |
pkgbase: ${{ github.event.inputs.pkgbase }} | |
status: ${{ steps.build.outputs.result }} | |
workflow: ${{ github.run_id }} | |
- uses: arch4edu/cactus/actions/clean@main |