Skip to content

Commit bef084d

Browse files
committed
switch to github actions
1 parent f73d8ac commit bef084d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Benchmark
2+
3+
on:
4+
push
5+
6+
jobs:
7+
benchmark:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
PHP_VERSION: [
12+
'4.4',
13+
'5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6',
14+
'7.1', '7.2', '7.3', '7.4',
15+
'8.0', '8.0jit', '8.1', '8.1jit', '8.2', '8.2jit'
16+
]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
- name: "Setup Docker and Git Repo"
22+
run: |
23+
git clone -b 1.0 --single-branch https://github.com/phpseclib/phpseclib.git
24+
if [[ "${{ matrix.PHP_VERSION }}" == "8"* ]]; then docker pull "quay.io/phpseclib/php${{ matrix.PHP_VERSION }}" && docker image tag "quay.io/phpseclib/php${{ matrix.PHP_VERSION }}" "phpseclib/php${{ matrix.PHP_VERSION }}"; else docker pull "phpseclib/php${{ matrix.PHP_VERSION }}"; fi
25+
- name: "Run Benchmark"
26+
run: |
27+
docker run -v "`pwd`:/opt/src" \
28+
-w "/opt/src" \
29+
"phpseclib/php${{ matrix.PHP_VERSION }}" \
30+
php test.php
31+
timeout-minutes: 10

0 commit comments

Comments
 (0)