Skip to content

Commit e2a1d5c

Browse files
committed
build: sury84
1 parent 685b974 commit e2a1d5c

File tree

3 files changed

+56
-27
lines changed

3 files changed

+56
-27
lines changed

.github/workflows/build.yaml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,33 @@ on:
33
push:
44
tags:
55
- '[0-9]+.[0-9]+.[0-9]+'
6+
workflow_dispatch:
67
jobs:
7-
ubuntu_2204_php81_origin_deb:
8-
runs-on: ubuntu-22.04
9-
timeout-minutes: 60
8+
Ubuntu-2204:
109
strategy:
1110
matrix:
12-
platform: ["linux/arm64/v8", "linux/amd64"]
11+
runs-on: ['ubuntu-22.04', 'ubuntu-22.04-arm']
12+
build: ['ubuntu2204', 'ubuntu2204_sury84']
13+
runs-on: ${{ matrix.runs-on }}
14+
timeout-minutes: 60
1315
steps:
1416
- name: Checkout
1517
uses: actions/checkout@v5
1618
with:
17-
submodules: recursive
18-
- name: Setup QEMU
19-
uses: docker/setup-qemu-action@v3
20-
with:
21-
platforms: arm64
22-
- name: Setup Buildx
23-
uses: docker/setup-buildx-action@v3
24-
- name: Build Container
25-
uses: docker/build-push-action@v6
26-
with:
27-
build-args: PLATFORM=${{ matrix.platform }}
28-
cache-from: type=gha
29-
cache-to: type=gha,mode=max
30-
context: .
31-
file: ./build/ubuntu2204/Dockerfile
32-
load: true
33-
tags: "pskel-build-ubuntu2204-${{ matrix.platform }}"
34-
- name: Build Extension with Container
35-
id: build_container
19+
submodules: true
20+
fetch-depth: 1
21+
- name: Inspections
22+
id: inspections
23+
run: echo "arch=$(uname -m)" >> $GITHUB_OUTPUT
24+
- name: Build container
25+
run: |
26+
docker build -t"builder" -f"./build/${{ matrix.build }}/Dockerfile" .
27+
- name: Build extension with container
3628
run: |
37-
echo "arch=$(echo "${{ matrix.platform }}" | sed "s/^linux\///g" | sed "s/\//_/g")" >> $GITHUB_OUTPUT
3829
mkdir "artifacts"
39-
docker run --env VERSION="${{ github.ref_name }}" --rm -v"$(pwd)/artifacts:/tmp/artifacts" -i "pskel-build-ubuntu2204-${{ matrix.platform }}"
40-
- name: Upload deb Packages
30+
docker run --env VERSION="${{ github.ref_name }}" --rm -v"$(pwd)/artifacts:/tmp/artifacts" -i "builder"
31+
- name: Upload .deb packages
4132
uses: actions/upload-artifact@v4
4233
with:
43-
name: ubuntu_2204_debs_${{ steps.build_container.outputs.arch }}
34+
name: ${{ matrix.build }}_${{ steps.inspections.outputs.arch }}
4435
path: artifacts/

build/ubuntu2204_sury84/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ARG PLATFORM=${BUILDPLATFORM:-linux/amd64}
2+
3+
FROM --platform=${PLATFORM} ubuntu:22.04
4+
5+
ENV DEBIAN_FRONTEND="noninteractive"
6+
7+
RUN apt-get update && \
8+
apt-get install -y \
9+
"software-properties-common" && \
10+
add-apt-repository ppa:ondrej/php -y && \
11+
apt-get update && \
12+
apt-get install -y \
13+
"php8.4" "php8.4-dev" "checkinstall"
14+
15+
COPY ./ext /tmp/ext
16+
17+
COPY ./build/ubuntu2204_sury84/build.sh /usr/bin/build
18+
19+
ENTRYPOINT ["/usr/bin/build"]

build/ubuntu2204_sury84/build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh -eux
2+
3+
cd "/tmp/ext"
4+
echo "COLOPL PHP timeshifter extension for sury PHP 8.4" > "description-pak"
5+
phpize8.4
6+
./configure --with-php-config="$(which "php-config8.4")"
7+
make -j"$(nproc)"
8+
TEST_PHP_ARGS="--show-diff -q" make test
9+
checkinstall \
10+
--pkgname="php8.4-colopl-timeshifter" \
11+
--pkglicense="PHP-3.01" \
12+
--pkgversion="${VERSION}" \
13+
--pkggroup="php8.4" \
14+
--maintainer="[email protected]" \
15+
--requires="php8.4-common" \
16+
--stripso="yes" \
17+
--pakdir="/tmp/artifacts" \
18+
--nodoc
19+
cd -

0 commit comments

Comments
 (0)