From c2d967ae08245c5916edb570621a33aff5dae6bb Mon Sep 17 00:00:00 2001 From: Benjamin Gill Date: Wed, 13 Jun 2018 14:09:46 +0100 Subject: [PATCH 1/2] Add rust-server to travis CI --- .travis.yml | 6 ++- pom.xml | 1 + samples/server/petstore/rust-server/pom.xml | 46 +++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 samples/server/petstore/rust-server/pom.xml diff --git a/.travis.yml b/.travis.yml index aded98aa6cfb..85c6b05ae745 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,9 @@ cache: - $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings - $HOME/samples/client/petstore/typescript-angular/node_modules - $HOME/samples/client/petstore/typescript-angular/typings + - $HOME/samples/server/petstore/rust-server/target - $HOME/perl5 + - $HOME/.cargo services: - docker @@ -59,6 +61,8 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq bats - sudo apt-get install -qq curl + # Install Rust + - curl https://sh.rustup.rs -sSf | sh -s -- -y -v # install perl module #- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) #- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role @@ -83,7 +87,7 @@ install: # Add Godeps dependencies to GOPATH and PATH - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)" - export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace" - - export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH" + - export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$HOME/.cargo/bin:$PATH" - go version script: diff --git a/pom.xml b/pom.xml index 877428f18c8b..13373b5fbc0e 100644 --- a/pom.xml +++ b/pom.xml @@ -921,6 +921,7 @@ samples/client/petstore/typescript-angular-v4.3/npm samples/client/petstore/ruby + samples/server/petstore/rust-server diff --git a/samples/server/petstore/rust-server/pom.xml b/samples/server/petstore/rust-server/pom.xml new file mode 100644 index 000000000000..6255746d0ef3 --- /dev/null +++ b/samples/server/petstore/rust-server/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + org.openapitools + RustServerTests + pom + 1.0-SNAPSHOT + Rust Petstore Sample + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + bundle-test + integration-test + + exec + + + cargo + + test + + + + + + + + From 1e6bc780c9c3228dcf2a007f40a6c5b3567334fd Mon Sep 17 00:00:00 2001 From: Benjamin Gill Date: Wed, 13 Jun 2018 14:15:49 +0100 Subject: [PATCH 2/2] Install rust correctly (and only once) --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85c6b05ae745..b8f521d776d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_install: - stack upgrade - stack --version # install rust - - curl -sSf https://static.rust-lang.org/rustup.sh | sh + - curl https://sh.rustup.rs -sSf | sh -s -- -y -v # required when sudo: required for the Ruby petstore tests - gem install bundler - npm install -g typescript @@ -61,8 +61,6 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq bats - sudo apt-get install -qq curl - # Install Rust - - curl https://sh.rustup.rs -sSf | sh -s -- -y -v # install perl module #- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) #- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role