forked from pmmp/PHP-Binaries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
91 lines (88 loc) · 2.51 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
87
88
89
90
91
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-18.04'
steps:
- bash: |
sudo apt-get update
sudo apt-get install make autoconf automake libtool libtool-bin m4 wget libc-bin gzip bzip2 bison g++ git re2c
displayName: Install Dependencies
- bash: |
# Used "set -ex" instead of hashbang since script isn't executed with hashbang
set -ex
trap "exit 1" ERR
echo $PWD
ls
chmod +x compile.sh
echo | ./compile.sh -t linux64 -j 4 -f -g
tar -czf ./PHP_Linux-x86_64.tar.gz bin
displayName: Build PHP
- bash: |
pwd
cd $BUILD_SOURCESDIRECTORY
pwd
cp PHP_Linux-x86_64.tar.gz $BUILD_ARTIFACTSTAGINGDIRECTORY
cp install.log $BUILD_ARTIFACTSTAGINGDIRECTORY
displayName: Copy Artifacts
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Linux'
inputs:
ArtifactName: Linux
condition: succeededOrFailed()
- job: Windows
pool:
vmImage: 'windows-2019'
steps:
- script: |
choco install wget --no-progress
displayName: Install Dependencies
- script: |
windows-compile-vs.bat
displayName: Build PHP
env:
VS_EDITION: Enterprise
SOURCES_PATH: $(Build.SourcesDirectory)\pocketmine-php-sdk
- script: |
dir
cd %BUILD_SOURCESDIRECTORY%
dir
cp php-*.zip %BUILD_ARTIFACTSTAGINGDIRECTORY%
cp compile.log %BUILD_ARTIFACTSTAGINGDIRECTORY%
displayName: Copy Artifacts
condition: succeededOrFailed()
- script: type compile.log
displayName: Show Build Log
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Windows'
inputs:
ArtifactName: Windows
condition: succeededOrFailed()
- job: MacOS
pool:
vmImage: 'macOS-10.14'
steps:
- bash: |
brew install libtool autoconf automake pkg-config bison re2c
displayName: Install Dependencies
- bash: |
export PATH="/usr/local/opt/bison/bin:$PATH"
set -ex
trap "exit 1" ERR
./compile.sh -t mac-x86-64 -j4 -f -g
tar -czf ./PHP_MacOS-x86_64.tar.gz bin
displayName: Build PHP
- bash: |
pwd
cd $BUILD_SOURCESDIRECTORY
pwd
cp PHP_MacOS-x86_64.tar.gz $BUILD_ARTIFACTSTAGINGDIRECTORY
cp install.log $BUILD_ARTIFACTSTAGINGDIRECTORY
displayName: Copy Artifacts
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Mac'
inputs:
ArtifactName: Mac
condition: succeededOrFailed()