git.s-ol.nu ~forks/DiligentTools / 8d3069c
Updated travis.yml: using shared build scripts Egor 2 years ago
1 changed file(s) with 6 addition(s) and 61 deletion(s). Raw diff Collapse all Expand all
66 on_success: never
77 on_failure: always
88
9 env:
10 global:
11 - CMAKE_VERSION=3.15.4
12
139 before_install:
1410 - git clone https://github.com/DiligentGraphics/DiligentCore.git ../DiligentCore --recursive
15 - |
16 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
17 wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
18 tar -xzf cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
19 export PATH=$PWD/cmake-${CMAKE_VERSION}-Darwin-x86_64/CMake.app/Contents/bin:$PATH
20 cmake --version
21 if [ "$IOS" = "true" ]; then
22 wget -O vulkansdk-macos-$VULKAN_SDK_VER.tar.gz https://sdk.lunarg.com/sdk/download/$VULKAN_SDK_VER/mac/vulkansdk-macos-$VULKAN_SDK_VER.tar.gz?Human=true &&
23 tar -xzf vulkansdk-macos-$VULKAN_SDK_VER.tar.gz
24 export VULKAN_SDK=$PWD/vulkansdk-macos-$VULKAN_SDK_VER
25 fi
26 fi
27 - |
28 if [ "$TRAVIS_OS_NAME" = "linux" ]; then
29 # Link gcc-7 and g++-7 to their standard commands
30 sudo ln -s /usr/bin/gcc-7 /usr/local/bin/gcc
31 sudo ln -s /usr/bin/g++-7 /usr/local/bin/g++
32 # Export CC and CXX to tell cmake which compiler to use
33 export CC=/usr/bin/gcc-7
34 export CXX=/usr/bin/g++-7
35 # Check versions of gcc, g++ and cmake
36 gcc -v
37 g++ -v
38 # Download a recent cmake
39 mkdir $HOME/usr
40 export PATH="$HOME/usr/bin:$PATH"
41 wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh
42 chmod +x cmake-${CMAKE_VERSION}-Linux-x86_64.sh
43 ./cmake-${CMAKE_VERSION}-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license
44 cmake --version
45 sudo apt-get update
46 sudo apt-get install libx11-dev
47 sudo apt-get install mesa-common-dev
48 sudo apt-get install mesa-utils
49 sudo apt-get install libgl-dev
50 fi
11 - . ../DiligentCore/BuildTools/Scripts/travis/before_install.sh
5112
5213 addons:
5314 apt:
5718 - gcc-7
5819 - g++-7
5920 - cmake
60
21
6122 matrix:
6223 include:
6324 - os: linux
7637 env:
7738 - CONFIG=Release
7839 - IOS=true
79 - VULKAN_SDK_VER="1.1.101.0"
80
40
8141 script:
8242
8343 # Run cmake
8747 echo "Project(DiligentTools_Test)" >> CMakeLists.txt
8848 echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
8949 echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
90 - mkdir build
91 - cd build
92 - |
93 if [ "$TRAVIS_OS_NAME" = "linux" ]; then
94 cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${CONFIG} -DCMAKE_INSTALL_PREFIX=install
95 cmake --build . --target install
96 fi
97 - |
98 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
99 if [ "$IOS" = "true" ]; then
100 cmake .. -DCMAKE_TOOLCHAIN_FILE=../DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=OS64 -DIOS_ARCH=arm64 -DVULKAN_SDK="$VULKAN_SDK" -DCMAKE_INSTALL_PREFIX=install -G "Xcode"
101 else
102 cmake .. -DCMAKE_INSTALL_PREFIX=install -G "Xcode"
103 fi
104 cmake --build . --target install --config ${CONFIG} | xcpretty
105 fi
50 - . ./DiligentCore/BuildTools/Scripts/travis/build_install.sh
10651
10752 after_success:
108
53
10954 - cd ../build/install
110 - export ZIP_NAME=DiligentCore-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip;
55 - export ZIP_NAME=DiligentTools-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip;
11156 - zip -r ${ZIP_NAME} .