Skip to content
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

Test PHP 8.0 + Phalcon 5 RC2 #50

Merged
merged 8 commits into from
Jun 16, 2022
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
36 changes: 36 additions & 0 deletions .github/workflows/test_dockerfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test Dockerfile

on:
pull_request:
push:
branches:
- master

jobs:
php80_debian_v5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build on 8.0/Dockerfile
run: docker build --progress=plain --file 8.0/Dockerfile .

php80_alpine_v5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build on 8.0/alpine/Dockerfile
run: docker build --progress=plain --file 8.0/alpine/Dockerfile .

php81_debian_v5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build on 8.1/Dockerfile
run: docker build --progress=plain --file 8.1/Dockerfile .

php81_alpine_v5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build on 8.1/alpine/Dockerfile
run: docker build --progress=plain --file 8.1/alpine/Dockerfile .
24 changes: 24 additions & 0 deletions 8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM php:8.0

LABEL maintainer="MilesChou <github.com/MilesChou>, fizzka <github.com/fizzka>"

ARG PHALCON_VERSION=5.0.0RC2
ARG PHALCON_EXT_PATH=phalcon/safe

RUN set -xe && \
docker-php-source extract && \
# Install ext-phalcon
curl -LO https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.tar.gz && \
tar xzf /v${PHALCON_VERSION}.tar.gz && \
docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
/cphalcon-${PHALCON_VERSION}/build/phalcon \
&& \
# Remove all temp files
rm -r \
${PWD}/v${PHALCON_VERSION}.tar.gz \
${PWD}/cphalcon-${PHALCON_VERSION} \
&& \
docker-php-source delete && \
php -m

COPY docker-phalcon-* /usr/local/bin/
30 changes: 30 additions & 0 deletions 8.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM php:8.0-alpine

LABEL maintainer="MilesChou <github.com/MilesChou>, fizzka <github.com/fizzka>"

ARG PHALCON_VERSION=5.0.0RC2
ARG PHALCON_EXT_PATH=phalcon/safe

RUN set -xe && \
docker-php-source extract && \
apk add --no-cache --virtual .build-deps \
autoconf \
g++ \
make \
&& \
# Install ext-phalcon
curl -LO https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.tar.gz && \
tar xzf /v${PHALCON_VERSION}.tar.gz && \
docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
/cphalcon-${PHALCON_VERSION}/build/phalcon \
&& \
# Remove all temp files
rm -r \
/v${PHALCON_VERSION}.tar.gz \
/cphalcon-${PHALCON_VERSION} \
&& \
docker-php-source delete && \
apk del .build-deps && \
php -m

COPY docker-phalcon-* /usr/local/bin/
23 changes: 23 additions & 0 deletions 8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM php:8.1

LABEL maintainer="MilesChou <github.com/MilesChou>, fizzka <github.com/fizzka>"

ARG PHALCON_VERSION=5.0.0RC2

RUN set -xe && \
docker-php-source extract && \
# Install ext-phalcon
curl -LO https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.tar.gz && \
tar xzf /v${PHALCON_VERSION}.tar.gz && \
docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
/cphalcon-${PHALCON_VERSION}/build/phalcon \
&& \
# Remove all temp files
rm -r \
/v${PHALCON_VERSION}.tar.gz \
/cphalcon-${PHALCON_VERSION} \
&& \
docker-php-source delete && \
php -m

COPY docker-phalcon-* /usr/local/bin/
29 changes: 29 additions & 0 deletions 8.1/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM php:8.1-alpine

LABEL maintainer="MilesChou <github.com/MilesChou>, fizzka <github.com/fizzka>"

ARG PHALCON_VERSION=5.0.0RC2

RUN set -xe && \
apk add --no-cache --virtual .build-deps \
autoconf \
g++ \
make \
&& \
docker-php-source extract && \
# Install ext-phalcon
curl -LO https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.tar.gz && \
tar xzf ${PWD}/v${PHALCON_VERSION}.tar.gz && \
docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
${PWD}/cphalcon-${PHALCON_VERSION}/build/phalcon \
&& \
# Remove all temp files
rm -r \
${PWD}/v${PHALCON_VERSION}.tar.gz \
${PWD}/cphalcon-${PHALCON_VERSION} \
&& \
docker-php-source delete && \
apk del .build-deps && \
php -m

COPY docker-phalcon-* /usr/local/bin/
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@ VERSION := 4.1.0
DEVTOOLS_VERSION := 4.0.3

.PHONY: all build push update variants clean
.PHONY: build7.4 build7.3 build7.2
.PHONY: 8.1 8.0 build7.4 build7.3 build7.2

# ------------------------------------------------------------------------------

all: build

build: build7.4 build7.3 build7.2

8.1:
docker build -t=$(IMAGE):8.1 -f 8.1/Dockerfile .
docker build -t=$(IMAGE):8.1-alpine -f 8.1/alpine/Dockerfile .

8.0:
docker build -t=$(IMAGE):8.0 -f 8.0/Dockerfile .
docker build -t=$(IMAGE):8.0-alpine -f 8.0/alpine/Dockerfile .

build7.4:
docker build -t=$(IMAGE):7.4 -f 7.4/Dockerfile .
docker build -t=$(IMAGE):7.4-alpine -f 7.4/alpine/Dockerfile .
Expand Down