Skip to content

test build

test build #4

Workflow file for this run

name: Build ChimeraOS Mesa
on:
push:
branches:
- main
- dev
tags: '*'
workflow_dispatch:
env:
PKGDEST: "/tmp/mesa-chimeraos"
BUILDDIR: "/tmp/build"
jobs:
build-mesa:
runs-on: ubuntu-latest
outputs:
full_version: ${{ steps.set-mesa-version.outputs.full_version }}
container: archlinux:base-devel
steps:
- uses: actions/checkout@v3
- name: Create build user
run: |
useradd -m build
cp -vR common /home/build/common
cp -vR mesa /home/build/mesa
cp -vR lib32-mesa /home/build/lib32-mesa
chown -vR build /home/build/mesa
chown -vR build /home/build/lib32-mesa
- name: Set up pacman keyring
run: |
pacman-key --init
pacman-key --populate archlinux
mkdir -p /etc/gnupg && echo "auto-key-retrieve" >> /etc/gnupg/gpg.conf
echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist\n" >> /etc/pacman.conf
- name: Generate .SRCINFO
run: |
su build bash -c "cd /home/build/mesa && makepkg --printsrcinfo > /home/build/mesa/.SRCINFO"
su build bash -c "cd /home/build/lib32-mesa && makepkg --printsrcinfo > /home/build/lib32-mesa/.SRCINFO"
- name: Install dependencies (mesa)
run: |
pacman -Syu --noconfirm $(sed -n -e 's/^[[:space:]]*\(make\)\?depends\(_x86_64\)\? = \([[:alnum:][:punct:]]*\)[[:space:]]*$/\3/p' /home/build/mesa/.SRCINFO)
- name: Build mesa-chimeraos package
id: build-mesa-package
shell: bash
run: |
pip install mako
su build bash -c "cd /home/build/mesa && MAKEFLAGS=-j$(nproc) makepkg"
- name: Set mesa package version
id: set-mesa-version
shell: bash
run: |
. /home/build/mesa/PKGBUILD
full_version=${pkgver}-${pkgrel}
echo "full_version=$full_version" >> "$GITHUB_OUTPUT"
- name: Install dependencies (lib32-mesa)
run: |
pacman -S --noconfirm $(sed -n -e 's/^[[:space:]]*\(make\)\?depends\(_x86_64\)\? = \([[:alnum:][:punct:]]*\)[[:space:]]*$/\3/p' /home/build/lib32-mesa/.SRCINFO)
pacman --noconfirm -U --overwrite '*' /tmp/mesa-chimeraos/*.pkg.tar.zst --ask=4
- name: Build lib32-mesa-chimeraos package
id: build-lib32-mesa-package
shell: bash
run: |
pip install mako
su build bash -c "cd /home/build/lib32-mesa && MAKEFLAGS=-j$(nproc) makepkg"
- name: Remove epoch in name
shell: bash
run: |
find ${{ env.PKGDEST }}/*.pkg.tar* -type f -name '*:*' -execdir bash -c 'mv "$1" "${1//:/--}"' bash {} \;
- name: Upload package artifact
uses: actions/upload-artifact@v3
with:
name: mesa-chimeraos
path: |
${{ env.PKGDEST }}/*.pkg.tar.zst
if-no-files-found: error
make-release:
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev')
runs-on: ubuntu-latest
needs: [build-mesa]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: mesa-chimeraos
path: ${{ env.PKGDEST }}
- name: Make release
uses: softprops/action-gh-release@v1
with:
name: mesa-chimeraos-${{needs.build-mesa.outputs.full_version}}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: true
fail_on_unmatched_files: true
files: |
${{ env.PKGDEST }}/*.pkg.tar.zst