mesa-chimeraos 25.1.1-chos1-3 #178
This file contains hidden or 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 ChimeraOS Mesa | |
| on: | |
| push: | |
| branches: [ main ] | |
| 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@v4 | |
| - 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: Disable generation of debug packages | |
| run: | | |
| sed -i '/BUILDENV/s/debug/!debug/g' /etc/makepkg.conf | |
| sed -i '/BUILDENV/s/!!debug/!debug/g' /etc/makepkg.conf | |
| - name: Set CPU optimizations | |
| run: | | |
| sed -i '/BUILDENV/s/CFLAGS="-march=x86-64 -mtune=generic/CFLAGS="-march=x86-64-v2 -mtune=x86-64-v4/g' /etc/makepkg.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: | | |
| 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: | | |
| 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@v4 | |
| 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/main') | |
| runs-on: ubuntu-latest | |
| needs: [build-mesa] | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| 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 |