Skip to content

Commit 9831457

Browse files
committed
Optimize CI
1 parent 43b5543 commit 9831457

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
ARG PHP_VERSION
22
ARG ALPINE_VERSION
33

4-
FROM hyperf/hyperf:${PHP_VERSION}-alpine-v${ALPINE_VERSION}-dev
4+
FROM phpswoole/php:${PHP_VERSION}-alpine
55

66
LABEL maintainer="Swoole Team <[email protected]>" version="1.0" license="Apache2"
77

88
ARG PHP_VERSION
99

10-
COPY . /opt/www
10+
COPY . /swoole
1111

12-
WORKDIR /opt/www
12+
WORKDIR /swoole
1313

1414
RUN set -ex \
1515
&& phpize \
1616
&& ./configure --enable-openssl --enable-swoole-curl \
17-
&& make -s -j$(nproc) && make install \
18-
&& echo "extension=swoole.so" > /etc/php$(echo $PHP_VERSION | sed 's/\.//g')/conf.d/50_swoole.ini \
19-
# check
20-
&& php -v \
21-
&& php -m \
22-
&& php --ri swoole \
23-
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
17+
&& make -s -j$(nproc) && make install
18+
19+
RUN echo "extension=swoole.so" > "/usr/local/etc/php/conf.d/swoole.ini"
20+
RUN php -v
21+
RUN php -m
22+
RUN php --ri swoole
23+
RUN echo -e "\033[42;37m Build Completed :).\033[0m\n"

.github/workflows/core.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
if: "!contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[core]')"
12+
timeout-minutes: 15
1213
services:
1314
tinyproxy:
1415
image: "vimagick/tinyproxy"

.github/workflows/ext.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
make clean && make -j$(nproc)
4242

4343
build-macos-latest:
44-
if: "!contains(github.event.head_commit.message, '--filter=')"
44+
if: "!contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[macos]')"
4545
runs-on: macos-latest
4646
steps:
4747
- name: install dependencies
@@ -70,28 +70,16 @@ jobs:
7070
make clean && make -j$(sysctl -n hw.ncpu)
7171

7272
build-alpine-latest:
73-
if: "!contains(github.event.head_commit.message, '--filter=')"
73+
if: "!contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[alpine]')"
7474
runs-on: ubuntu-latest
7575
strategy:
7676
matrix:
77-
php-version: [ '8.1', '8.2', '8.3' ]
78-
alpine-version: [ '3.16', '3.17', '3.18', '3.19', 'edge' ]
79-
exclude:
80-
- php-version: '8.3'
81-
alpine-version: '3.16'
82-
- php-version: '8.3'
83-
alpine-version: '3.17'
84-
- php-version: '8.3'
85-
alpine-version: '3.18'
86-
- php-version: '8.2'
87-
alpine-version: '3.16'
88-
- php-version: '8.2'
89-
alpine-version: '3.17'
77+
php-version: [ '8.0', '8.1', '8.2', '8.3' ]
9078
max-parallel: 8
9179
fail-fast: false
9280
steps:
9381
- uses: actions/checkout@v4
9482
- name: build
9583
run: |
9684
cp .github/workflows/alpine.Dockerfile alpine.Dockerfile
97-
docker build -t swoole . -f alpine.Dockerfile --build-arg PHP_VERSION=${{ matrix.php-version }} --build-arg ALPINE_VERSION=${{ matrix.alpine-version }}
85+
docker build -t swoole . -f alpine.Dockerfile --build-arg PHP_VERSION=${{ matrix.php-version }}

.github/workflows/unit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
test-linux:
77
runs-on: ubuntu-latest
88
if: "!contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[unit]')"
9+
timeout-minutes: 15
910
strategy:
1011
fail-fast: false
1112
matrix:

0 commit comments

Comments
 (0)