Skip to content

Commit a6ea57d

Browse files
committed
Used leyyins code to dynamically adjust number of threads.
1 parent ce219f2 commit a6ea57d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,25 @@ before_install:
2121
- sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
2222
- sudo apt-get update -qq
2323
- sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libglew-dev cmake
24+
25+
before_script:
26+
- export THREADS=`nproc`
27+
- echo "THREADS = $THREADS"
28+
2429
script:
30+
2531
# First a debug build:
2632
- mkdir build-debug
2733
- cd build-debug
2834
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCHECK_ASSETS=off
29-
- make VERBOSE=1 -j 32
35+
- make VERBOSE=1 -j $THREADS
3036

3137
# Then a release build:
3238
- cd ..
3339
- mkdir build-release
3440
- cd build-release
3541
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCHECK_ASSETS=off
36-
- make VERBOSE=1 -j 32
42+
- make VERBOSE=1 -j $THREADS
3743

3844
notifications:
3945
irc:

0 commit comments

Comments
 (0)