Skip to content

Commit 44707b3

Browse files
authored
Travis CI: macOS build added (#120)
* travis: new travis * Fix bundle creation; Add uploading to Bintray; Enable tests for macOS; Update readme. Signed-off-by: Remigiusz Kołłątaj <[email protected]> * Fix review findings Signed-off-by: Remigiusz Kołłątaj <[email protected]>
1 parent 60cf29e commit 44707b3

File tree

7 files changed

+75
-32
lines changed

7 files changed

+75
-32
lines changed

.bintray-linux.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

.travis.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
1-
sudo: required
21
language: cpp
3-
dist: trusty
4-
group: edge
52

63
notifications:
74
email: false
85

9-
services:
10-
docker
6+
matrix:
7+
include:
8+
- os: linux
9+
dist: trusty
10+
sudo: required
11+
services: docker
12+
group: edge
13+
- os: osx
14+
osx_image: xcode9.4
1115

1216
#Blacklist
1317
branches:
1418
except:
1519
- gh-pages
1620

1721
before_install:
18-
- env
19-
- echo refs/heads/$TRAVIS_BRANCH~ refs/heads/$TRAVIS_BRANCH refs/heads/$TRAVIS_BRANCH | ./.trigger_appveyor.rb || true
20-
- export ci_env=`bash <(curl -s https://codecov.io/env)`
22+
- ./travis/before_install.sh
2123

2224
script:
23-
- export CC=gcc-6 CXX=g++-6 CMAKE_BUILD_TYPE=Debug WITH_COVERAGE=ON PACKAGE=OFF
24-
- ./.travis.sh
25-
- export CC=gcc-53 CXX=g++-53 CMAKE_BUILD_TYPE=Release WITH_COVERAGE=OFF PACKAGE=ON
26-
- ./.travis.sh
27-
- export CC=gcc-53 CXX=g++-53 CMAKE_BUILD_TYPE=Debug WITH_COVERAGE=OFF PACKAGE=OFF
28-
- ./.travis.sh
29-
- export CC=clang-3.5 CXX=clang++-3.5 CMAKE_BUILD_TYPE=Release WITH_COVERAGE=OFF PACKAGE=OFF
30-
- ./.travis.sh
31-
- export CC=clang-3.5 CXX=clang++-3.5 CMAKE_BUILD_TYPE=Debug WITH_COVERAGE=OFF PACKAGE=OFF
32-
- ./.travis.sh
25+
- ./travis/build.sh
3326

3427
#Generate and deploy documentation
3528
after_success:
36-
- cd $TRAVIS_BUILD_DIR
37-
- chmod +x .travis_doxygen.sh
38-
- docker run
39-
$ci_env -e DOXYFILE -e GH_REPO_NAME -e GH_REPO_REF -e GH_REPO_TOKEN -e TRAVIS_BUILD_NUMBER
40-
-v `pwd`:/root/sources rkollataj/candevstudio /bin/bash
41-
-c "cd /root/sources && ./.travis_doxygen.sh"
29+
- ./travis/doxygen.sh

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
* [Visual Studio 2015](#visual-studio-2015)
1313
* [Visual Studio 2015 Win64](#visual-studio-2015-win64)
1414
* [MinGW](#mingw)
15+
* [macOS / OS X](#macos--os-x)
1516
* [Prebuilt packages](#prebuilt-packages)
1617
* [Download](#download)
1718
* [Package naming](#package-naming)
1819
* [Linux](#linux-1)
1920
* [Windows](#windows-1)
21+
* [macOS / OS X](#macos--os-x-1)
2022
* [Quick Start](#quick-start)
2123
* [CAN Hardware](#can-hardware)
2224
* [Microchip CAN BUS Analyzer](#microchip-can-bus-analyzer)
@@ -102,6 +104,16 @@ cd build
102104
cmake .. -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=C:\Qt\5.9\mingw53_32
103105
cmake --build .
104106
```
107+
### macOS / OS X
108+
```
109+
git clone https://github.com/GENIVI/CANdevStudio.git
110+
cd CANdevStudio
111+
git submodule update --init --recursive
112+
mkdir build
113+
cd build
114+
cmake .. -GNinja -DCMAKE_PREFIX_PATH=/path/to/Qt/lib/cmake
115+
ninja
116+
```
105117
## Prebuilt packages
106118
Binary packages are automatically uploaded by CI tools (i.e. Travis and Appveyor) to [Bintray](https://bintray.com/rkollataj/CANdevStudio) artifactory for every commit on master branch.
107119
### Download
@@ -112,7 +124,7 @@ Use Bintray badges above to dowload stable or develop version (each commit on ma
112124
**X** - major version number of previous stable version<br/>
113125
**Y** - minor version of previous stable version<br/>
114126
**Z** - SHA commit ID<br/>
115-
**SYS** - either **win32** or **Linux**<br/>
127+
**SYS** - either **win32**, **Linux** or **Darwin**<br/>
116128
**standalone** - bundle version that contains Qt libraries and all relevant plugins.<br/>
117129
### Linux
118130
All packages are being built on Ubuntu 16.04 LTS. You may experience problems with missing or incompatible libraries when trying to run the package on other distros.
@@ -121,7 +133,9 @@ To run standalone version use CANdevStudio.sh script.
121133
### Windows
122134
Packages built with MinGW 5.3.
123135

124-
Standalone version contains Qt and MinGW runtime libs.
136+
Standalone version contains Qt and MinGW runtime libs.
137+
### macOS / OS X
138+
Package is a DMG installer.
125139
## Quick Start
126140
General instructions to start your first simulation:
127141
1. Build the latest master or release.

travis/before_install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
4+
echo refs/heads/$TRAVIS_BRANCH~ refs/heads/$TRAVIS_BRANCH refs/heads/$TRAVIS_BRANCH | ./.trigger_appveyor.rb || true
5+
export ci_env=`bash <(curl -s https://codecov.io/env)`
6+
else
7+
brew install qt5 ninja
8+
fi
9+

travis/build.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
4+
export CC=gcc-6 CXX=g++-6 CMAKE_BUILD_TYPE=Debug WITH_COVERAGE=ON PACKAGE=OFF
5+
./travis/docker_compile.sh
6+
export CC=gcc-53 CXX=g++-53 CMAKE_BUILD_TYPE=Release WITH_COVERAGE=OFF PACKAGE=ON
7+
./travis/docker_compile.sh
8+
export CC=gcc-53 CXX=g++-53 CMAKE_BUILD_TYPE=Debug WITH_COVERAGE=OFF PACKAGE=OFF
9+
./travis/docker_compile.sh
10+
export CC=clang-3.5 CXX=clang++-3.5 CMAKE_BUILD_TYPE=Release WITH_COVERAGE=OFF PACKAGE=OFF
11+
./travis/docker_compile.sh
12+
export CC=clang-3.5 CXX=clang++-3.5 CMAKE_BUILD_TYPE=Debug WITH_COVERAGE=OFF PACKAGE=OFF
13+
./travis/docker_compile.sh
14+
else
15+
chmod -R 755 /usr/local/Cellar/qt/5.11.1/lib/
16+
echo "Building for OSX"
17+
cmake -H. -Bbuild-osx -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.11.1/lib/cmake -GNinja -DWITH_TESTS=ON -DCMAKE_INSTALL_PREFIX=install
18+
cmake --build build-osx --config Release
19+
cmake --build build-osx --config Release --target install
20+
cmake --build build-osx --config Release --target install
21+
cd build-osx
22+
ctest
23+
cpack -G DragNDrop
24+
for f in *.dmg; do
25+
curl -T $f -urkollataj:$BINTRAY_API_KEY https://api.bintray.com/content/rkollataj/CANdevStudio/master/${TRAVIS_COMMIT:0:7}/$f\;override=1
26+
done
27+
curl -urkollataj:$BINTRAY_API_KEY -X POST https://api.bintray.com/content/rkollataj/CANdevStudio/master/${TRAVIS_COMMIT:0:7}/publish
28+
fi
File renamed without changes.

travis/doxygen.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
4+
cd "$TRAVIS_BUILD_DIR" || exit
5+
chmod +x .travis_doxygen.sh
6+
docker run
7+
$ci_env -e DOXYFILE -e GH_REPO_NAME -e GH_REPO_REF -e GH_REPO_TOKEN -e TRAVIS_BUILD_NUMBER
8+
-v `pwd`:/root/sources rkollataj/candevstudio /bin/bash
9+
-c "cd /root/sources && ./.travis_doxygen.sh"
10+
fi

0 commit comments

Comments
 (0)