Create consistent_file_size_units.patch #271
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
jobs: | |
check_series: | |
name: 'Check / Series' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check series file | |
run: | | |
for patch in $(ls *.patch); do | |
if ! grep "$patch" series; then | |
echo "::error title=$patch::Patch is missing from series file" | |
exit 1 | |
fi | |
done | |
check_sha256sums: | |
name: 'Check / PKGBUILD' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Arch Linux packaging tools | |
run: | | |
# Run Arch Linux tools on Ubuntu | |
# 'makepkg' throws an unknown error unless 'pacman' is installed. | |
# In Ubuntu, that package is for a PACMAN game! Obviously a bug. | |
sudo apt-get update | |
sudo apt-get install makepkg pacman | |
- name: Check SHA256 checksums | |
run: python3 scripts/ci-check-checksums.py | |
build: | |
# Perform a generic build in case of any critical errors | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [check_series] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get GTK version | |
run: | | |
source PKGBUILD | |
echo "GTK_VERSION=${_gtkver}" >> $GITHUB_ENV | |
- name: Cache GTK source | |
uses: actions/cache@v4 | |
id: gtksrc | |
with: | |
path: 'gtk*.tar.gz' | |
key: gtk-${{ env.GTK_VERSION }} | |
- name: Download GTK source | |
if: steps.gtksrc.outputs.cache-hit != 'true' | |
run: | | |
source PKGBUILD | |
wget "https://gitlab.gnome.org/GNOME/gtk/-/archive/${_gtkver}/gtk-${_gtkver}.tar.gz" | |
- name: Extract GTK source | |
run: | | |
source PKGBUILD | |
tar -xzf gtk*.tar.gz | |
- name: Install build 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 | |
# Uses PKGBUILD prepare() directly | |
- name: Apply patches | |
run: | | |
source PKGBUILD | |
srcdir="$(pwd)" | |
prepare | |
# Uses PKGBUILD build() directly | |
# Build system may connect to GNOME's GitLab to retrieve glib dependency | |
- name: Build GTK | |
run: | | |
source PKGBUILD | |
arch-meson() { meson "$@"; } | |
build | |
makepkg: | |
# Create artifacts for the Arch packages for convenient testing | |
name: 'Package / Arch' | |
runs-on: ubuntu-latest | |
needs: [check_series] | |
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 GTK source | |
uses: actions/cache@v4 | |
id: gtksrc | |
with: | |
path: 'gtk*.tar.gz' | |
key: gtk-${{ env.GTK_VERSION }} | |
- name: Cache packages for pacman | |
uses: actions/cache@v4 | |
env: | |
cache-name: pacman-cache | |
with: | |
path: ~/pacman-cache | |
key: pacman-cache | |
- 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" | |
# 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 | |
- name: Lint package | |
run: | | |
docker exec --workdir=/workspace --user builder archlinux namcap -i PKGBUILD | |
- name: Make package | |
run: | | |
docker exec --workdir=/workspace --user builder archlinux makepkg -s --noconfirm ${{ github.event_name == 'pull_request' && '--skipinteg' || '' }} | |
- 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* |