-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yaml
108 lines (104 loc) · 2.61 KB
/
azure-pipelines.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
jobs:
- job: unit_tests
variables:
- name: cpp
value: |
cd $(Build.SourcesDirectory)
npx haxe $(hxml)
./tests/bin/cpp/Main-debug
- name: cppia
value: |
cd $(Build.SourcesDirectory)
mkdir -p tests/bin/cppia
npx haxe host.hxml
npx haxe $(hxml)
./tests/bin/host/Host
- name: hashlink
value: |
# Manually build hashlink
sudo apt-get install libpng-dev libturbojpeg-dev libvorbis-dev libopenal-dev libsdl2-dev libmbedtls-dev libuv1-dev
git clone https://github.com/HaxeFoundation/hashlink
cd hashlink
git checkout 1.11
make
sudo make install
# usr/local/lib isn't searched for shared objects by default.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
cd $(Build.SourcesDirectory)
npx haxe $(hxml)
hl tests/bin/hl/out.hl
- name: js
value: |
npx haxe $(hxml)
node tests/bin/js/out.js
- name: jvm
value: |
npx haxe $(hxml)
java -jar tests/bin/jvm/out.jar
- name: interp
value: npx haxe $(hxml)
strategy:
matrix:
'cpp':
name: cpp
hxml: test-cpp.hxml
cmd: $(cpp)
'cppia':
name: cppia
hxml: test-cppia.hxml
cmd: $(cppia)
'hl':
name: hashlink
hxml: test-hl.hxml
cmd: $(hashlink)
'js':
name: js
hxml: test-js.hxml
cmd: $(js)
'jvm':
name: jvm
hxml: test-jvm.hxml
cmd: $(jvm)
'interp':
name: interp
hxml: test-interp.hxml
cmd: $(interp)
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: Node
inputs:
versionSpec: '14.15.x'
- task: Npm@1
displayName: Restore
inputs:
command: 'ci'
- script: eval $(cmd)
displayName: Run
- task: PublishTestResults@2
displayName: Tests
inputs:
testResultsFormat: XUnit
testResultsFiles: '*-tests.xml'
testRunTitle: $(name)
searchFolder: $(Build.SourcesDirectory)
failTaskOnFailedTests: true
- script: bash <(curl -s https://codecov.io/bash) -f lcov.info
displayName: Coverage
- job: run_sample
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: Node
inputs:
versionSpec: '14.15.x'
- task: Npm@1
displayName: Restore
inputs:
command: 'ci'
- script: npx haxe run.hxml
displayName: Run
workingDirectory: $(Build.SourcesDirectory)/sample
failOnStderr: true