Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 9bd9e9a

Browse files
authored
Merge pull request #438 from konradkonrad/travis_compile_solc
Install solc from zip
2 parents 266dd3f + 2ac2a1d commit 9bd9e9a

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ language: python
22
python: 3.5
33
sudo: required
44
dist: trusty
5-
before_install:
6-
- sudo add-apt-repository -y ppa:ethereum/ethereum
7-
- sudo apt-get update
8-
- sudo apt-get install -y solc
95
env:
106
matrix:
117
- TOX_ENV=py27
@@ -15,7 +11,18 @@ env:
1511
- COVERAGE_APPEND="--append"
1612
- secure: cKbIgpTJ1yjKLBxpCEiT6IH7NShDWZUE+BvnrAfc+ujCsR6LyLJcKxFQmKnWryJCqg7fp82Ep2bF2oDKzanAROar2xDY1SFGbai42seYMaFCw53YPGJ6u3VNCcfT0rN9BWgE7el/m4fjcD6CRsZYKArNNJbMX8csRt3uXXCFLso=
1713
- secure: "QyFPrxQHd2LlNQ6zNeTFYhgPmZaOHoWuywcgn8qaSOh6PklyFxHbexkwg0bl23JvtgNEZ1mCD8j0x1/ydSdtxgCFwK9SEL0h7aYuAq+OAIa/G18OPeTJMf7ASsb2QZdfkt9reFpUnjbadzHkuv+rqqb4bFnTJBKwB2LWzHPLhWg="
14+
- SOLC_VERSION=0.4.8
15+
cache:
16+
directories:
17+
- $HOME/.bin
18+
- $HOME/solc-versions
19+
before_install:
20+
- mkdir -p $HOME/.bin
21+
- export PATH=$PATH:$HOME/.bin
22+
- if [ -n "$SOLC_VERSION" ]; then export LD_LIBRARY_PATH="$HOME/solc-versions/solc-$SOLC_VERSION"; fi
23+
- if [ -n "$SOLC_VERSION" ]; then sudo apt-get install -y tree unzip; fi
1824
install:
25+
- if [ -n "$SOLC_VERSION" ]; then /.$TRAVIS_BUILD_DIR/.travis/install_solc.sh; fi
1926
- travis_retry pip install setuptools --upgrade
2027
- travis_retry pip install tox
2128
- travis_retry pip install coverage

.travis/install_solc.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
#
3+
# Install solc
4+
#
5+
6+
set -e
7+
set -u
8+
9+
mkdir -p $HOME/solc-versions/solc-$SOLC_VERSION
10+
cd $HOME/solc-versions/solc-$SOLC_VERSION
11+
12+
if [ ! -f solc ]
13+
then
14+
git clone --recurse-submodules --branch v$SOLC_VERSION --depth 50 https://github.com/ethereum/solidity.git
15+
./solidity/scripts/install_deps.sh
16+
wget https://github.com/ethereum/solidity/releases/download/v$SOLC_VERSION/solidity-ubuntu-trusty.zip
17+
unzip solidity-ubuntu-trusty.zip
18+
echo "Solidity installed at $HOME/solc-versions/solc-$SOLC_VERSION/solc"
19+
tree $HOME/solc-versions/solc-$SOLC_VERSION
20+
fi
21+
22+
if [ -f $HOME/.bin/solc ]
23+
then
24+
rm $HOME/.bin/solc
25+
fi
26+
27+
ln -s $HOME/solc-versions/solc-$SOLC_VERSION/solc $HOME/.bin/solc
28+
# Check path is correctly set up and echo version
29+
cd
30+
echo $PATH
31+
ls -al $HOME/.bin
32+
ls -al $(readlink -f $HOME/.bin/solc)
33+
solc --version

0 commit comments

Comments
 (0)