8000 [travis] build libsodium only if it's not already enabled · dunglas/symfony@24a00d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 24a00d8

Browse files
[travis] build libsodium only if it's not already enabled
1 parent f89ef42 commit 24a00d8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,15 @@ before_install:
173173
[[ -e $ext_cache ]] || (tfold ext.symfony_debug "cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && mv modules/symfony_debug.so $ext_cache && phpize --clean")
174174
echo extension = $ext_cache >> $INI
175175
elif [[ $PHP = 7.* ]]; then
176-
# install libsodium
177-
sudo add-apt-repository ppa:ondrej/php -y
178-
sudo apt-get update -q
179-
sudo apt-get install libsodium-dev -y
176+
if ! php --ri sodium > /dev/null; then
177+
# install libsodium
178+
sudo add-apt-repository ppa:ondrej/php -y
179+
sudo apt-get update -q
180+
sudo apt-get install libsodium-dev -y
181+
tfold ext.libsodium tpecl libsodium sodium.so $INI
182+
fi
180183
181184
tfold ext.apcu tpecl apcu-5.1.6 apcu.so $INI
182-
tfold ext.libsodium tpecl libsodium sodium.so $INI
183185
tfold ext.mongodb tpecl mongodb-1.5.0 mongodb.so $INI
184186
fi
185187
done

0 commit comments

Comments
 (0)
0