-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathazure-pipelines.yml
87 lines (86 loc) · 3.14 KB
/
azure-pipelines.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
jobs:
# All tasks on window
- job: build_all_window
pool:
vmImage: 'windows-2019'
variables:
phpVersion: 8.2
steps:
- task: UseDotNet@2
inputs:
version: '6.0.x'
- script: |
cp scripts/aelf-node/php.ini /c/tools/php/php.ini
php -c /c/tools/php/php.ini
- script: |
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
php composer.phar config -g repo.packagist composer https://packagist.phpcomposer.com
php composer.phar install --no-interaction --prefer-dist --ignore-platform-reqs
displayName: 'composer install'
- powershell: ./scripts/aelf-node/start-window.ps1
displayName: 'deploy and test'
# All tasks on Linux
- job: build_all_linux
displayName: Build all tasks (Linux)
services:
redis:
image: redis
ports:
- 6379:6379
pool:
vmImage: ubuntu-latest
variables:
phpVersion: 8.2
steps:
- task: UseDotNet@2
inputs:
version: '6.0.x'
- script: cd scripts/aelf-node && bash start.sh
displayName: 'Deploy a full node'
- script: |
sudo update-alternatives --set php /usr/bin/php$(phpVersion)
sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
php -version
displayName: 'Use PHP version $(phpVersion)'
- script: |
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer install --no-interaction --prefer-dist --ignore-platform-reqs
displayName: 'composer install'
- script: php phpunit.phar --bootstrap bootstrap.php tests/AElfTest.php
displayName: 'test'
- job: build_all_macos
# All tasks on macOS
displayName: Build all tasks (macos)
pool:
vmImage: macOS-latest
variables:
phpVersion: 8.2
steps:
- task: UseDotNet@2
inputs:
version: '6.0.x'
- script: cd scripts/aelf-node && bash start-mac.sh
displayName: 'Deploy a full node'
- script: |
sudo update-alternatives --set php /usr/bin/php$(phpVersion)
sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
php -version
displayName: 'Use PHP version $(phpVersion)'
- script: |
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer install --no-interaction --prefer-dist --ignore-platform-reqs
- script: php phpunit.phar --bootstrap bootstrap.php tests/AElfTest.php
displayName: 'test'