Skip to content

Commit 5693eee

Browse files
authored
Fix CircleCI build (#17016)
* fix circleci build * add maven opts * remove cache path * clear cache * fix node 0 * use 1024 * skip save cache * restore tests * fix * fix typo * update * clean up pom.xml
1 parent f83e4ff commit 5693eee

3 files changed

Lines changed: 101 additions & 306 deletions

File tree

.circleci/config.yml

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -57,54 +57,43 @@ commands: # a reusable command with parameters
5757
- run: docker ps -a
5858
- run: sleep 30
5959
- run: cat /etc/hosts
60-
# Test
61-
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
60+
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
6261
- run:
6362
name: "Setup custom environment variables"
6463
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
6564
- run: ./CI/circle_parallel.sh
6665
# Save dependency cache
67-
- save_cache:
68-
key: source-v2-{{ .Branch }}-{{ .Revision }}
69-
paths:
70-
# This is a broad list of cache paths to include many possible development environments
71-
# You can probably delete some of these entries
72-
- vendor/bundle
73-
- ~/.nvm
74-
- ~/.pyenv
75-
- ~/virtualenvs
76-
- ~/.m2
77-
- ~/.ivy2
78-
- ~/.sbt
79-
- ~/.bundle
80-
- ~/.go_workspace
81-
- ~/.gradle
82-
- ~/.cache/bower
83-
- ".git"
84-
- ~/.stack
85-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
86-
- ~/R
87-
# save "default" cache using the key "source-v2-"
88-
- save_cache:
89-
key: source-v2-
90-
paths:
91-
# This is a broad list of cache paths to include many possible development environments
92-
# You can probably delete some of these entries
93-
- vendor/bundle
94-
- ~/.nvm
95-
- ~/.pyenv
96-
- ~/virtualenvs
97-
- ~/.m2
98-
- ~/.ivy2
99-
- ~/.sbt
100-
- ~/.bundle
101-
- ~/.go_workspace
102-
- ~/.gradle
103-
- ~/.cache/bower
104-
- ".git"
105-
- ~/.stack
106-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
107-
- ~/R
66+
#- save_cache:
67+
# key: source-v2-{{ .Branch }}-{{ .Revision }}
68+
# paths:
69+
# # This is a broad list of cache paths to include many possible development environments
70+
# # You can probably delete some of these entries
71+
# - ~/.m2
72+
# - ~/.ivy2
73+
# - ~/.sbt
74+
# - ~/.bundle
75+
# - ~/.go_workspace
76+
# - ~/.gradle
77+
# - ".git"
78+
# - ~/.stack
79+
# - ~/R
80+
## save "default" cache using the key "source-v2-"
81+
#- save_cache:
82+
# key: source-v2-
83+
# paths:
84+
# # This is a broad list of cache paths to include many possible development environments
85+
# # You can probably delete some of these entries
86+
# - vendor/bundle
87+
# - ~/.m2
88+
# - ~/.ivy2
89+
# - ~/.sbt
90+
# - ~/.bundle
91+
# - ~/.go_workspace
92+
# - ~/.gradle
93+
# - ~/.cache/bower
94+
# - ".git"
95+
# - ~/.stack
96+
# - ~/R
10897
# Teardown
10998
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
11099
# Save test results

CI/circle_parallel.sh

Lines changed: 69 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ set -e
1010
export NODE_ENV=test
1111

1212
if [ "$NODE_INDEX" = "1" ]; then
13-
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
13+
echo "Running node $NODE_INDEX ..."
1414
java -version
1515

16-
./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
16+
(cd samples/client/petstore/ruby && mvn integration-test)
17+
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
18+
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
19+
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
1720

1821
elif [ "$NODE_INDEX" = "2" ]; then
1922
echo "Running node $NODE_INDEX to test Go"
@@ -33,20 +36,14 @@ elif [ "$NODE_INDEX" = "2" ]; then
3336
export PATH="/usr/local/go1.18/go/bin:$PATH"
3437
go version
3538

36-
# run integration tests
37-
./mvnw --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
39+
# run go integration tests
40+
(cd samples/client/petstore/go && mvn integration-test)
41+
(cd samples/openapi3/client/petstore/go && mvn integration-test)
42+
(cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test)
43+
3844
elif [ "$NODE_INDEX" = "3" ]; then
3945

40-
echo "Running node $NODE_INDEX to test 'samples.circleci.node3' defined in pom.xml ..."
41-
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
42-
#tar -xf Python-3.8.9.tgz
43-
#cd Python-3.8.9
44-
#./configure --enable-optimizations
45-
#sudo make altinstall
46-
pyenv install --list
47-
pyenv install 3.7.12
48-
#pyenv install 2.7.14 #python2 no longer supported
49-
pyenv global 3.7.12
46+
echo "Running node $NODE_INDEX ... "
5047

5148
# Install node@stable (for angular 6)
5249
set +e
@@ -63,23 +60,71 @@ elif [ "$NODE_INDEX" = "3" ]; then
6360
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
6461
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
6562

66-
./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
63+
(cd samples/client/others/typescript-angular && mvn integration-test)
64+
(cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
65+
(cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
66+
(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
67+
(cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
68+
(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
69+
(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
70+
(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
71+
(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
72+
(cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test)
73+
(cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test)
74+
(cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test)
75+
(cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test)
76+
(cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test)
77+
#(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
78+
(cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
79+
(cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
80+
(cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
81+
(cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
82+
(cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
83+
(cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test)
84+
(cd samples/client/petstore/typescript-node/npm && mvn integration-test)
85+
(cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
86+
(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
87+
(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
88+
(cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
89+
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
90+
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
6791

6892
elif [ "$NODE_INDEX" = "4" ]; then
69-
echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
93+
echo "Running node $NODE_INDEX ..."
7094

71-
#mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
72-
#(cd samples/openapi3/client/petstore/python && make test)
73-
# comment out due to ModuleNotFoundError: No module named 'urllib3.request'
74-
#(cd samples/openapi3/client/petstore/python-prior && make test)
75-
#(cd samples/openapi3/client/3_0_3_unit_test/python && make test)
95+
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
96+
#tar -xf Python-3.8.9.tgz
97+
#cd Python-3.8.9
98+
#./configure --enable-optimizations
99+
#sudo make altinstall
100+
pyenv install --list
101+
pyenv install 3.7.12
102+
#pyenv install 2.7.14 #python2 no longer supported
103+
pyenv global 3.7.12
104+
105+
(cd samples/openapi3/client/petstore/python && mvn integration-test)
106+
(cd samples/openapi3/client/petstore/python-pydantic-v1 && mvn integration-test)
107+
(cd samples/openapi3/client/petstore/python-aiohttp && mvn integration-test)
108+
(cd samples/openapi3/client/petstore/python-pydantic-v1-aiohttp && mvn integration-test)
76109

77110
else
78-
echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..."
111+
echo "Running node $NODE_INDEX ..."
79112
java -version
80113

81-
./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error
82-
./mvnw --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
114+
(cd samples/client/petstore/scala-akka && mvn integration-test)
115+
(cd samples/client/petstore/scala-sttp && mvn integration-test)
116+
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
117+
(cd samples/client/petstore/clojure && mvn integration-test)
118+
(cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)
119+
(cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test)
120+
(cd samples/client/petstore/java/jersey3 && mvn integration-test)
121+
(cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test)
122+
(cd samples/client/petstore/java/okhttp-gson && mvn integration-test)
123+
(cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test)
124+
(cd samples/client/petstore/java/resteasy && mvn integration-test)
125+
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
126+
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)
127+
83128
fi
84129

85130

0 commit comments

Comments
 (0)