forked from cataphract/php-rar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-template.yml
65 lines (56 loc) · 1.83 KB
/
azure-template.yml
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
parameters:
name: ~
displayName: ~
phpVersion: bundled
imageName: ubuntu-20.04
zts: false
clang: false
publishCoverage: false
valgrind: false
jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
pool:
vmImage: ${{ parameters.imageName }}
variables:
${{ if eq(parameters.clang, true) }}:
CC: clang
CXX: clang++
steps:
- checkout: self
displayName: Checkout
clean: true
submodules: recursive
- bash: |
source test_funcs.sh
install_php ${{ parameters.phpVersion }} ${{ parameters.zts }}
displayName: Install PHP ${{ parameters.phpVersion }}
- ${{ if eq(parameters.valgrind, true) }}:
- bash: >
sudo apt-get install valgrind
displayName: "Install Valgrind"
- script: |
source test_funcs.sh
build_ext ${{ parameters.phpVersion }} ${{ parameters.zts }} ${{ parameters.publishCoverage }}
displayName: Build extension
- script: |
source test_funcs.sh
run_tests ${{ parameters.phpVersion }} ${{ parameters.zts }} ${{ parameters.publishCoverage }}
${{ if eq(parameters.valgrind, true) }}:
env:
RUN_TESTS_FLAGS: -m
displayName: Run tests
- task: PublishTestResults@2
displayName: Publish test results
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'report.xml'
searchFolder: '$(System.DefaultWorkingDirectory)'
mergeTestResults: true
- ${{ if eq(parameters.publishCoverage, true) }}:
- bash: >
bash <(curl -s https://codecov.io/bash)
displayName: "Publish coverage (Codecov)"
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)