-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathazure-pipelines.yml
130 lines (129 loc) · 5.06 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
variables:
DECODE_PERCENTS: false
# Azure-pipelines: [warning]%25 detected in ##vso command. In March 2021, the agent command parser will be updated to unescape this to %. To opt out of this behavior, set a job level variable DECODE_PERCENTS to false. Setting to true will force this behavior immediately. More information can be found at https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/design/percentEncoding.md
jobs:
- job: linux
pool: {vmImage: 'Ubuntu-latest'}
strategy:
matrix:
x86:
image: 'fdabrandao/manylinux32:coin_cmake-3.12.4'
nbits: 32
x64:
image: 'fdabrandao/manylinux64:coin_cmake-3.12.4'
nbits: 64
variables:
upload: $(Build.ArtifactStagingDirectory)
steps:
- bash: |
lscpu | grep -E '^Thread|^Core|^Socket|^CPU\('
cat /proc/cpuinfo
displayName: Check CPU
- bash: |
set -ex
BUILD_DIR=manylinux/linux-intel$NBITS/
git submodule update --init --recursive --remote
mkdir -p $BUILD_DIR/*
rm -rf $BUILD_DIR/*
docker run -v `pwd`:/base --rm $IMAGE /base/manylinux/build.sh `nproc` intel$NBITS $NBITS
displayName: Build package
- bash: |
set -ex
BUILD_DIR=manylinux/linux-intel$NBITS/
UPLOAD_DIR=$UPLOAD/linux-intel$NBITS/
mkdir -p $UPLOAD_DIR
cp Cbc/Cbc/LICENSE $UPLOAD_DIR/coin-license.txt
cp $BUILD_DIR/bin/{cbc,bonmin,couenne,ipopt} $UPLOAD_DIR
cp $BUILD_DIR/coin-versions.txt $UPLOAD_DIR
cd $UPLOAD_DIR
tar czvf coin.linux-intel$NBITS.`date +%Y%m%d`.tgz *
mkdir -p $UPLOAD/{cbc,bonmin,couenne,ipopt}
zip $UPLOAD/cbc/cbc-linux$NBITS.zip cbc coin-license.txt
zip $UPLOAD/bonmin/bonmin-linux$NBITS.zip bonmin coin-license.txt
zip $UPLOAD/couenne/couenne-linux$NBITS.zip couenne coin-license.txt
zip $UPLOAD/ipopt/ipopt-linux$NBITS.zip ipopt coin-license.txt
displayName: Upload package
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: '$(Build.ArtifactStagingDirectory)'}
- job: macos
pool: {vmImage: 'macOS-10.15'}
variables:
upload: $(Build.ArtifactStagingDirectory)
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- script: |
brew install gcc
displayName: Install gcc (installs gfortran too)
- bash: |
set -ex
git submodule update --init --recursive --remote
mkdir build
cd build
export FC="gfortran-10"
cmake .. -DARCH=64
make all coin-versions -j2
make test || true
displayName: Build package
- bash: |
set -ex
UPLOAD_DIR=$UPLOAD/macos/
mkdir -p $UPLOAD_DIR
cp Cbc/Cbc/LICENSE $UPLOAD_DIR/coin-license.txt
cp build/bin/{cbc,bonmin,couenne,ipopt} $UPLOAD_DIR
cp build/coin-versions.txt $UPLOAD_DIR
cd $UPLOAD_DIR
tar czvf coin.macos64.`date +%Y%m%d`.tgz *
mkdir -p $UPLOAD/{cbc,bonmin,couenne,ipopt}
zip $UPLOAD/cbc/cbc-osx.zip cbc coin-license.txt
zip $UPLOAD/bonmin/bonmin-osx.zip bonmin coin-license.txt
zip $UPLOAD/couenne/couenne-osx.zip couenne coin-license.txt
zip $UPLOAD/ipopt/ipopt-osx.zip ipopt coin-license.txt
displayName: Upload package
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: '$(Build.ArtifactStagingDirectory)'}
- job: windows
pool: {vmImage: 'windows-2019'}
strategy:
matrix:
x86:
arch: 'win32'
nbits: 32
x64:
arch: 'x64'
nbits: 64
variables:
upload: $(Build.ArtifactStagingDirectory)
steps:
- script: |
choco uninstall mingw
choco install mingw --x86 -y
choco install make --x86 -y
condition: eq(variables['arch'], 'win32')
displayName: Install mingw
- bash: |
set -ex
git submodule update --init --recursive --remote
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A $ARCH -DARCH=$NBITS -DCOIN_DISABLE_WARNINGS=1 -DCMAKE_SH="CMAKE_SH-NOTFOUND"
cmake --build . -t ALL_BUILD coin-versions -j 2 --config Release
ctest -C Release || true
ls -l Release
displayName: Build package
- bash: |
set -ex
UPLOAD_DIR=$UPLOAD/win$NBITS/
mkdir -p $UPLOAD_DIR
cp Cbc/Cbc/LICENSE $UPLOAD_DIR/coin-license.txt
cp build/bin/Release/{cbc.exe,bonmin.exe,couenne.exe,ipopt.exe,libipoptfort.dll} $UPLOAD_DIR
cp build/coin-versions.txt $UPLOAD_DIR
cd $UPLOAD_DIR
7z a -tzip coin.mswin$NBITS.`date +%Y%m%d`.zip *
mkdir -p $UPLOAD/{cbc,bonmin,couenne,ipopt}
7z a -tzip $UPLOAD/cbc/cbc-win$NBITS.zip cbc.exe coin-license.txt
7z a -tzip $UPLOAD/bonmin/bonmin-win$NBITS.zip libipoptfort.dll bonmin.exe coin-license.txt
7z a -tzip $UPLOAD/couenne/couenne-win$NBITS.zip libipoptfort.dll couenne.exe coin-license.txt
7z a -tzip $UPLOAD/ipopt/ipopt-win$NBITS.zip ipopt.exe libipoptfort.dll coin-license.txt
displayName: Upload package
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: '$(Build.ArtifactStagingDirectory)'}