-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build configuration for php 5.5 #5
Conversation
Based on 5.3 config
@shivammathur sorry, I forgot about this. I've left out CI integration, as I don't have really place to test it and you may want to simplify it and I don't know how you intend to invoke the building. Here's some draft with merge conflicts that you may use as starting point Click to open diffdiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2ad8bfb..24ff68b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,36 +5,39 @@ on:
build-php53:
description: Whether to build PHP 5.3
required: true
+ build-php55:
+ description: Whether to build PHP 5.5
+ required: true
push:
jobs:
- build53:
+ build-php:
if: "!contains(github.event.head_commit.message, 'skip-build')"
- name: Build PHP 5.3
+ name: Build PHP ${{ matrix.php-version }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-20.04]
- php-version: ['5.3']
+ php-version: ['5.3', '5.5']
steps:
- - name: Checkout
- if: github.event.inputs.build-php53 == 'true' || contains(github.event.head_commit.message, 'build-php5.3')
+ - name: "Checkout ${{ matrix.php-version }}"
+ if: github.event.inputs.build-php53 == 'true' || contains(github.event.head_commit.message, 'build-php5.3') || github.event.inputs.build-php55 == 'true' || contains(github.event.head_commit.message, 'build-php5.5')
uses: actions/checkout@v2
- - name: Build
- if: github.event.inputs.build-php53 == 'true' || contains(github.event.head_commit.message, 'build-php5.3')
+ - name: "Build ${{ matrix.php-version }}"
+ if: github.event.inputs.build-php53 == 'true' || contains(github.event.head_commit.message, 'build-php5.3') || github.event.inputs.build-php55 == 'true' || contains(github.event.head_commit.message, 'build-php5.5')
env:
BUILDKIT_STEP_LOG_MAX_SIZE: -1
BUILDKIT_STEP_LOG_MAX_SPEED: -1
DOCKER_BUILDKIT: 1
PHP_VERSION: ${{ matrix.php-version }}
run: |
- docker build . --build-arg=PHP_VERSION=$PHP_VERSION -t php-$PHP_VERSION
+ docker build . -f php-$PHP_VERSION/Dockerfile -t php-PHP_VERSION
docker run --name=php-$PHP_VERSION php-$PHP_VERSION sh -c exit
sudo chmod 777 /usr/local
docker cp php-$PHP_VERSION:/usr/local/php /usr/local/php
- - name: Ship
+ - name: "Ship PHP 5.3"
if: github.event.inputs.build-php53 == 'true' || contains(github.event.head_commit.message, 'build-php5.3')
run: bash .github/scripts/build.sh ship
env:
@@ -42,14 +45,34 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_WORKSPACE: ${{ github.workspace }}
- - name: Upload Artifact
+ - name: "Ship PHP 5.5"
+ if: github.event.inputs.build-php55 == 'true' || contains(github.event.head_commit.message, 'build-php5.5')
+ run: bash .github/scripts/build.sh ship
+ env:
+ PHP_VERSION: ${{ matrix.php-version }}
+ BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
+ BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
+ BINTRAY_REPO: php
+
+ - name: "Upload Artifact: PHP 5.3"
if: github.event.inputs.build-php53 == 'true' || contains(github.event.head_commit.message, 'build-php5.3')
uses: actions/upload-artifact@v2
with:
name: php5.3
+<<<<<<< Updated upstream
path: ${{ github.workspace }}/php-5.3-build.tar.zst
+=======
+ path: /usr/local/php/php-5.3-build.tar.zst
+
+ - name: "Upload Artifact: PHP 5.5"
+ if: github.event.inputs.build-php55 == 'true' || contains(github.event.head_commit.message, 'build-php5.5')
+ uses: actions/upload-artifact@v2
+ with:
+ name: php5.5
+ path: /usr/local/php/php-5.5-build.tar.zst
+>>>>>>> Stashed changes
test:
- needs: build53
+ needs: build-php
name: Test PHP-${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -67,6 +90,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Fetch PHP 5.5
+ if: matrix.php-versions == '5.5'
+ run: curl -o php-5.5/php-5.5.tar.zst -sL https://dl.bintray.com/shivammathur/php/php-5.5-build.tar.zst
+
- name: Install PHP
run: |
sudo ln -sf $(pwd)/php-${{ matrix.php-versions }} /tmp/php-${{ matrix.php-versions }}
@@ -113,7 +140,12 @@ jobs:
run: |
bash .github/scripts/install_zstd.sh
mkdir builds
+<<<<<<< Updated upstream
gh release download -p 'php-5.3-build.tar.zst' -D php-5.3
+=======
+ curl -o php-5.3/php-5.3.tar.zst -sL https://dl.bintray.com/shivammathur/php/php-5.3-build.tar.zst
+ curl -o php-5.5/php-5.5.tar.zst -sL https://dl.bintray.com/shivammathur/php/php-5.5-build.tar.zst
+>>>>>>> Stashed changes
for v in 5.3 5.4 5.5; do
sudo XZ_OPT=-e9 tar cfJ php-$v.tar.xz php-$v
sudo tar cf - php-$v | zstd -22 -T0 --ultra > php-$v.tar.zst
@@ -140,6 +172,12 @@ jobs:
- name: Release
run: |
set -x
+<<<<<<< Updated upstream
+=======
+ find ./builds -name php53.tar.gz -delete || true
+ find ./builds -name php55.tar.gz -delete || true
+ curl -o install.sh -sL https://dl.bintray.com/shivammathur/php/php5-ubuntu.sh
+>>>>>>> Stashed changes
assets=()
for asset in ./builds/*; do
assets+=("$asset")
|
also: please don't squash merge! |
@glensc |
yes, no problem. once this is merged and integrated. |
may I ask what the implications are of supporting php 5.5 in this repo (like the PR suggests)? |
@staabm: php 5.5 already exists, but via .deb packages. using php-build creates more manageable version of old version. adds (better) way to add patches to backport broken functionality. and yes, it may be speedier to download and unpack one tar.xz than add deb repo, update deb repo, install N .deb packages. My vision: |
@shivammathur could you ping me when you add CI integration, or even better, create PR with it and tag me there. I'm interested in how you are solving the problem of setting up CI for both versions build :) |
|
Based on 5.3 config.
To build locally:
This does not add any CI integration.