Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
run: |
cd build
docker run --tty \
-v ${PWD}/fpm:/root/fpm \
-v ${PWD}:/root/build \
fpm /bin/bash -c "./fpm.sh ${{ github.event.inputs.tag }}"

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages
path: build/fpm/dist/*
path: build/dist/*
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/build/fpm/dist
/build/fpm/src/deb/*-php*
/build/fpm/src/rpm/*-php*
key-private.asc
/build/dist
/build/src/deb/*-php*
/build/src/rpm/*-php*
key-private.asc
14 changes: 4 additions & 10 deletions build/deb-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@

gpg --batch --import key-private.asc

# 16.04 18.04 20.04 22.04 24.04 9 10 11 12
dists="xenial bionic focal jammy noble stretch buster bullseye bookworm"
source build/distros.sh

architectures="amd64 arm64"

symlink_pkg='pkg=${0/pool/$1}; mkdir -p $(dirname $pkg); [ ! -L $pkg ] && ln -sr $0 $pkg'

cd deb

for dist in $dists; do

case "$dist" in
jammy | noble | bookworm)
find pool -name "*.deb" -name '*+libssl*' -exec bash -c "$symlink_pkg" {} pools/$dist \; ;;
*)
find pool -name "*.deb" ! -name '*+*' -exec bash -c "$symlink_pkg" {} pools/$dist \; ;;
esac
for dist in "${deb_dists[@]}"; do
find pool -name "*$dist*.deb" -exec bash -c "$symlink_pkg" {} pools/$dist \;

for arch in $architectures; do
mkdir -p dists/$dist/main/binary-$arch
Expand Down
21 changes: 21 additions & 0 deletions build/distros.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

deb_dists=(
xenial # 16.04
bionic # 18.04
focal # 20.04
jammy # 22.04
noble # 24.04
plucky # 25.04
stretch # 9
buster # 10
bullseye # 11
bookworm # 12
trixie # 13
)

el_dists=(
el7
el8
el9
)
2 changes: 1 addition & 1 deletion build/fpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN apt-get -y install \

RUN gem install fpm

WORKDIR /root/fpm
WORKDIR /root/build
65 changes: 65 additions & 0 deletions build/fpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

set -e

source /root/build/helpers.sh
source /root/build/distros.sh

version=$1
baseurl="https://builds.r2.relay.so/$version/relay-$version"

declare -A php_api=(
["7.4"]=20190902
["8.0"]=20200930
["8.1"]=20210902
["8.2"]=20220829
["8.3"]=20230831
["8.4"]=20240924
["8.5"]=20250925
)

packages=()

for deb in "${deb_dists[@]}"; do
case "$deb" in
jammy | noble | plucky | bookworm | trixie) variant=+libssl3 ;;
*) variant="" ;;
esac

for arch in amd64 arm64; do
arch_url=$(echo $arch | sed 's/amd64/x86-64/; s/arm64/aarch64/')

packages+=(
"$deb deb base $arch 8.4 20240924 $baseurl-php8.4-debian-${arch_url}${variant}.tar.gz"
)

for php in 7.4 8.0 8.1 8.2 8.3 8.4 8.5; do
api=${php_api[$php]}

packages+=(
"$deb deb multi $arch $php $api $baseurl-php$php-debian-${arch_url}${variant}.tar.gz"
"$deb deb ls $arch $php $api $baseurl-php$php-debian-${arch_url}${variant}.tar.gz"
)
done
done
done

for el in "${el_dists[@]}"; do
url_distro=$(echo $el | sed 's/el7/centos7/; s/el8/centos8/')

for arch in x86_64 aarch64; do
for php in 7.4 8.0 8.1 8.2 8.3 8.4 8.5; do
api=${php_api[$php]}

packages+=(
"$el rpm single.$el $arch $php $api $baseurl-php$php-$url_distro-${arch/_/-}.tar.gz"
"$el rpm multi.$el $arch $php $api $baseurl-php$php-$url_distro-${arch/_/-}.tar.gz"
"$el rpm ls.$el $arch $php $api $baseurl-php$php-$url_distro-${arch/_/-}.tar.gz"
)
done
done
done

main

exit 255
210 changes: 0 additions & 210 deletions build/fpm/fpm.sh

This file was deleted.

15 changes: 0 additions & 15 deletions build/fpm/src/deb/config.base.sh

This file was deleted.

Loading