mirror of
https://github.com/mii443/merkle_sigs.rs.git
synced 2025-08-22 16:05:42 +00:00
Install protobuf on CI
This commit is contained in:
12
.travis.yml
12
.travis.yml
@ -1,5 +1,10 @@
|
||||
language: rust
|
||||
cache: cargo # https://docs.travis-ci.com/user/caching/#Rust-Cargo-cache
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cargo
|
||||
- $HOME/protobuf
|
||||
- $TRAVIS_BUILD_DIR/target
|
||||
|
||||
rust:
|
||||
- stable
|
||||
@ -54,3 +59,8 @@ script:
|
||||
- cargo build --verbose --all-features
|
||||
- cargo test --verbose --all-features
|
||||
- cargo doc --verbose --all-features --no-deps
|
||||
|
||||
before_install:
|
||||
- export PATH=$PATH:$HOME/protobuf/bin
|
||||
- export PROTOC_VERSION=$(cat PROTOC_VERSION)
|
||||
- bash install_protobuf.sh
|
||||
|
1
PROTOC_VERSION
Normal file
1
PROTOC_VERSION
Normal file
@ -0,0 +1 @@
|
||||
3.5.1
|
18
install_protobuf.sh
Executable file
18
install_protobuf.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PROTOC_VERSION=$(cat PROTOC_VERSION)
|
||||
|
||||
check_protoc_version () {
|
||||
this_version=`protoc --version`
|
||||
return `[ "libprotoc $PROTOC_VERSION" = "$this_version" ]`
|
||||
}
|
||||
|
||||
if check_protoc_version; then
|
||||
echo $PROTOC_VERSION detected.
|
||||
exit
|
||||
fi
|
||||
|
||||
wget https://github.com/google/protobuf/archive/v$PROTOC_VERSION.tar.gz
|
||||
tar -xzvf v$PROTOC_VERSION.tar.gz
|
||||
cd protobuf-$PROTOC_VERSION && ./autogen.sh && ./configure --prefix=$HOME/protobuf && make && make install
|
Reference in New Issue
Block a user