-
Notifications
You must be signed in to change notification settings - Fork 42
77 lines (74 loc) · 2.27 KB
/
nightly.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Nightly
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
test:
name: Test on ${{ matrix.id }} with ${{ matrix.php }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- id: linux-x64
os: ubuntu-18.04
php: '8.0'
allow_failure: false
nightly: wasmer-linux-amd64.tar.gz
- id: linux-x64
os: ubuntu-18.04
php: '8.1'
allow_failure: false
nightly: wasmer-linux-amd64.tar.gz
- id: macos-x64
os: macos-latest
php: '8.0'
allow_failure: false
nightly: wasmer-darwin-amd64.tar.gz
- id: macos-x64
os: macos-latest
php: '8.1'
allow_failure: false
nightly: wasmer-darwin-amd64.tar.gz
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install Wasmer nightly
run: |
GH_URL="https://github.com"
LATEST_URL="${GH_URL}/wasmerio/wasmer-nightly/releases/latest/"
ASSET_PATTERN="/wasmerio/wasmer-nightly/.*/${{ matrix.nightly }}"
ASSET_URL=$(curl -Ls ${LATEST_URL} | grep -wo ${ASSET_PATTERN})
curl -Ls ${GH_URL}${ASSET_URL} --output ${{ matrix.nightly }}
mkdir -p /tmp/wasmer
tar xzf ${{ matrix.nightly }} -C /tmp/wasmer
cp -f /tmp/wasmer/include/{wasm,wasmer_wasm}.h ./include
cp -f /tmp/wasmer/lib/libwasmer.* ./lib
- name: Configure
run: |
phpize
./configure
- name: Build
run: |
make || ${{ matrix.allow_failure }}
- name: Run tests (phpt)
run: |
make test || ${{ matrix.allow_failure }}
- name: Run examples
run: |
make examples || ${{ matrix.allow_failure }}
- name: Archive test results
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: results-${{ matrix.id }}-${{ matrix.php }}
retention-days: 3
path: |
tests/**/*.diff
tests/**/*.exp
tests/**/*.out