Skip to content

Fix: Multimedia Arches #17759

Fix: Multimedia Arches

Fix: Multimedia Arches #17759

Workflow file for this run

# for each folder in anda/
# generate a new workflow for each folder in anda/
name: Automatically build packages
on:
push:
paths:
- anda/**
branches:
- frawhide
pull_request:
branches:
- frawhide
merge_group:
branches:
- frawhide
workflow_dispatch:
workflow_call:
jobs:
manifest:
runs-on: ubuntu-22.04
outputs:
build_matrix: ${{ steps.generate_build_matrix.outputs.build_matrix }}
container:
image: ghcr.io/terrapkg/builder:frawhide
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Set workspace as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate build matrix
id: generate_build_matrix
run: anda ci >> $GITHUB_OUTPUT
build:
needs: manifest
strategy:
matrix:
pkg: ${{ fromJson(needs.manifest.outputs.build_matrix) }}
version: ["rawhide"]
fail-fast: false
runs-on: ${{ matrix.pkg.arch == 'aarch64' && 'ARM64' || matrix.pkg.labels['large'] && 'x86-64-lg' || 'ubuntu-22.04' }}
container:
image: ghcr.io/terrapkg/builder:f${{ matrix.version }}
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: CI Setup Script
if: ${{ matrix.pkg.labels.mock != '1' }}
run: |
dir=$(dirname ${{ matrix.pkg.pkg }})
if [ -f $dir/ci_setup.rhai ]; then
anda run $dir/ci_setup.rhai --labels script_path=$dir/ci_setup.rhai
fi
- name: Install Build Dependencies
if: ${{ matrix.pkg.labels.mock != '1' }}
run: |
dir=$(dirname ${{ matrix.pkg.pkg }})
dnf5 builddep -y ${dir}/*.spec
- name: Build with Andaman
run: anda build ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ !matrix.pkg.labels.mock == '1' && '-rrpmbuild' || '' }}
- name: Generating artifact name
id: art
run: |
NAME=${{ matrix.pkg.pkg }}-${{ matrix.pkg.arch }}-${{ matrix.version }}
x=${NAME//\//@}
echo "name=$x" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.art.outputs.name }}
compression-level: 0 # The RPMs are already compressed :p
path: |
anda-build/rpm/rpms/*
anda-build/rpm/srpm/*
- name: Upload packages to subatomic
if: github.event_name == 'push'
run: |
subrepo="${{ matrix.pkg.labels.subrepo }}"
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }} anda-build/rpm/rpms/*
- name: Upload source packages to subatomic
if: github.event_name == 'push'
run: |
subrepo="${{ matrix.pkg.labels.subrepo }}"
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }}-source anda-build/rpm/srpm/*
- name: Notify Madoguchi (Success)
if: success() && github.event_name == 'push'
run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA
- name: Notify Madoguchi (Failure)
if: ( cancelled() || failure() ) && github.event_name == 'push'
run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA