Browse Source

Add new job matrix for linked LLVM bitcode Emscripten CI build.
Upload HTML5 samples built from this new job matrix.
[ci package] [ci only: Emscripten]

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
dbfd0ca65c
2 changed files with 9 additions and 3 deletions
  1. 6 3
      .travis.yml
  2. 3 0
      Source/Urho3D/CMakeLists.txt

+ 6 - 3
.travis.yml

@@ -335,10 +335,13 @@ env:
     - CCACHE_SLOPPINESS=pch_defines,time_macros
     - CCACHE_COMPRESS=1
     - CCACHE_MAXSIZE=100M
-  matrix:
-    - URHO3D_LIB_TYPE=STATIC
 matrix:
   fast_finish: true
+  include:
+    - compiler: gcc-archived-bitcode
+      env: URHO3D_LIB_TYPE=STATIC
+    - compiler: gcc-linked-bitcode
+      env: URHO3D_LIB_TYPE=SHARED
 before_script:
   - export TRAVIS_COMMIT=$TRAVIS_COMMIT~
   - export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
@@ -350,7 +353,7 @@ before_script:
   - rake ci_setup_cache
 script:
   - rake ci
-  - if [ $PACKAGE_UPLOAD ]; then rake ci_package_upload && rake ci_emscripten_samples_update || ! [ $RELEASE_TAG ]; fi
+  - if [ $PACKAGE_UPLOAD ]; then rake ci_package_upload && if [ "$URHO3D_LIB_TYPE" == "SHARED" ]; then rake ci_emscripten_samples_update; fi || ! [ $RELEASE_TAG ]; fi
 after_script: rake ci_teardown_cache
 
 ...

+ 3 - 0
Source/Urho3D/CMakeLists.txt

@@ -207,6 +207,9 @@ if (NOT ANDROID AND NOT EMSCRIPTEN)
     else ()
         message (FATAL_ERROR "The .soversion file is corrupted. It should contain a version number with this format major(0xFFFF).minor(0xFF).patch-level(0xFF). e.g.: 0.1.2")
     endif ()
+elseif (EMSCRIPTEN)
+    # Emscripten does not support generation of shared library in a conventional sense, it just produces "linked" LLVM bitcode
+    set (CMAKE_SHARED_LIBRARY_SUFFIX ".bc")
 endif ()
 install (TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${DEST_RUNTIME_DIR} LIBRARY DESTINATION ${DEST_LIBRARY_DIR} ARCHIVE DESTINATION ${DEST_LIBRARY_DIR})