Release 3.24.43-2 #226
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
# Perform a generic build in case of any critical errors | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checks out under $GITHUB_WORKSPACE | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check series file | |
run: | | |
for patch in $(ls *.patch); do | |
grep "$patch" series | |
if [ $? != 0 ]; then | |
echo "::error title=$patch::Patch is missing from series file" | |
exit 1 | |
fi | |
done | |
- name: Get GTK Version | |
run: | | |
source PKGBUILD | |
echo "GTK_VERSION=${_gtkver}" >> $GITHUB_ENV | |
- name: Install Dependencies | |
run: | | |
echo "deb-src http://gb.archive.ubuntu.com/ubuntu/ focal main" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get build-dep gtk+3.0 | |
sudo apt-get install quilt sassc meson ninja-build cmake | |
sudo apt-get install libgif-dev libelf-dev | |
- name: Cache GTK Source | |
uses: actions/cache@v4 | |
id: gtksrc | |
with: | |
path: 'gtk+*.tar.xz' | |
key: gtk-${{ env.GTK_VERSION }} | |
- name: Download GTK Source | |
#if: steps.gtksrc.outputs.cache-hit != 'true' | |
run: | | |
source PKGBUILD | |
wget https://download.gnome.org/sources/gtk+/${pkgver%.*}/gtk+-${_gtkver}.tar.xz | |
- name: Extract GTK Source | |
run: | | |
source PKGBUILD | |
tar -xJf gtk+*.tar.xz | |
# Uses PKGBUILD prepare() directly | |
- name: Apply Patches | |
run: | | |
source PKGBUILD | |
srcdir="$(pwd)" | |
prepare | |
# Based on PKGBUILD build() | |
# Build system may connect to GNOME's GitLab to retrieve glib dependency | |
- name: Build | |
run: | | |
source PKGBUILD | |
CFLAGS+=" -DG_DISABLE_CAST_CHECKS" | |
meson gtk+-${_gtkver} build \ | |
-D broadway_backend=true \ | |
-D colord=auto \ | |
-D demos=false \ | |
-D examples=false \ | |
-D introspection=true \ | |
-D tests=false \ | |
-D installed_tests=false | |
ninja -C build | |
makepkg: | |
# Create artifacts for the Arch packages for convenient testing, and to | |
# validate the package integrity with changes. | |
name: 'Package / Arch' | |
runs-on: ubuntu-latest | |
steps: | |
# Checks out under $GITHUB_WORKSPACE | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get GTK Version | |
run: | | |
source PKGBUILD | |
echo "GTK_VERSION=${_gtkver}" >> $GITHUB_ENV | |
- name: Cache Pacman Packages | |
uses: actions/cache@v4 | |
env: | |
cache-name: pacman-cache | |
with: | |
path: ~/pacman-cache | |
key: pacman-cache | |
- name: Cache GTK Source | |
uses: actions/cache@v4 | |
id: gtksrc | |
with: | |
path: 'gtk+*.tar.xz' | |
key: gtk-${{ env.GTK_VERSION }} | |
- name: Start Arch Linux | |
run: | | |
# Start and update Arch Linux within a Docker container | |
docker run --privileged -d -t -v ~/pacman-cache/pkg:/var/cache/pacman/pkg -v $GITHUB_WORKSPACE:/workspace --name archlinux archlinux:base-devel | |
docker exec archlinux pacman -Syu --noconfirm namcap | |
# Add user | |
docker exec archlinux useradd builder | |
docker exec archlinux /bin/bash -c "echo 'builder ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers" | |
# Use as a reference when validating PKGBUILD | |
cp PKGBUILD PKGBUILD.before | |
md5sum PKGBUILD >> PKGBUILD.md5 | |
# This 'builder' user will take directory ownership | |
docker exec archlinux chown -R builder /workspace | |
- name: Validate PKGBUILD | |
run: | | |
# Validate the PKGBUILD - these commands modify the file | |
docker exec --workdir=/workspace --user builder archlinux makepkg --geninteg | |
docker exec --workdir=/workspace --user builder archlinux namcap -i PKGBUILD | |
# Inform the user if changes need to be made | |
md5sum -c PKGBUILD.md5 || (echo -e "\nTo fix, please push a commit with the following changes to the PKGBUILD file.\nHere's the patch:\n" && diff -u PKGBUILD.before PKGBUILD) | |
- name: Make Package | |
run: | | |
docker exec --workdir=/workspace --user builder archlinux makepkg -s --noconfirm | |
- name: Stop Arch Linux | |
run: | | |
docker stop archlinux -t 1 | |
docker rm archlinux | |
- name: Upload Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gtk3-classic-run${{github.run_number}}-pkg | |
path: gtk3-classic-*.pkg* |