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

Added build job for alpine #4104

Merged
merged 1 commit into from
Mar 17, 2021
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
9 changes: 5 additions & 4 deletions .github/workflows/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM hyperf/hyperf:7.4-alpine-v3.11-dev
ARG PHP_VERSION
ARG ALPINE_VERSION

FROM hyperf/hyperf:${PHP_VERSION}-alpine-v${ALPINE_VERSION}-dev

LABEL maintainer="Swoole Team <team@swoole.com>" version="1.0" license="MIT"

Expand All @@ -7,10 +10,8 @@ COPY . /opt/www
WORKDIR /opt/www

RUN set -ex \
&& ln -sf /usr/bin/phpize7 /usr/local/bin/phpize \
&& ln -sf /usr/bin/php-config7 /usr/local/bin/php-config \
&& phpize \
&& ./configure --enable-mysqlnd --enable-openssl --enable-http2 \
&& ./configure --enable-openssl --enable-http2 --enable-swoole-curl --enable-swoole-json \
&& make -s -j$(nproc) && make install \
&& echo "extension=swoole.so" > /etc/php7/conf.d/50_swoole.ini \
# check
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-openssl --enable-debug-log &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build7
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-curl --enable-swoole-json
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-curl --enable-swoole-json
--enable-openssl --enable-debug-log &&
make clean && make -j$(sysctl -n hw.ncpu)

Expand All @@ -56,15 +56,15 @@ jobs:
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-openssl &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build6
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-curl --enable-swoole-json
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-curl --enable-swoole-json
--enable-openssl --enable-debug-log &&
make clean && make -j$(sysctl -n hw.ncpu)

build-macos-latest:
runs-on: macos-latest
steps:
- name: install dependencies
run: brew install openssl && brew link openssl && brew install curl && brew link curl
run: brew install openssl && brew link openssl && brew install curl && brew link curl
- uses: actions/checkout@v1
- name: phpize
run: phpize
Expand All @@ -80,17 +80,28 @@ jobs:
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build5
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-openssl
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-openssl
--with-openssl-dir=/usr/local/opt/openssl@1.1 &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build6
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-curl --enable-swoole-json
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-curl --enable-swoole-json
--enable-openssl --with-openssl-dir=/usr/local/opt/openssl@1.1 --enable-debug-log &&
make clean && make -j$(sysctl -n hw.ncpu)

build-alpine-latest:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '7.3', '7.4' ]
alpine-version: [ '3.9', '3.10', '3.11', '3.12' ]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest one is 3.13 and it's more then x86-64 arches there

Help on enabling more tests are welcome https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/20327

exclude:
- php-version: '7.3'
alpine-version: '3.12'
max-parallel: 8
fail-fast: false
steps:
- uses: actions/checkout@v1
- name: build
run: cp .github/workflows/alpine.Dockerfile alpine.Dockerfile && docker build -t swoole . -f alpine.Dockerfile
run: |
cp .github/workflows/alpine.Dockerfile alpine.Dockerfile
docker build -t swoole . -f alpine.Dockerfile --build-arg PHP_VERSION=${{ matrix.php-version }} --build-arg ALPINE_VERSION=${{ matrix.alpine-version }}