Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 84ea963

Browse files
author
Matus Novak
committed
Added Travis CI, AppVeyor, and Circle CI
Fixed #4 unknown runtime behaviour on Clang Replaced GitBook with VuePress Added Squirrel dependency as optional gitsubmodule
1 parent 5498332 commit 84ea963

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+12436
-2982
lines changed

.circleci/config.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
compile_gcc: &compile_gcc
2+
steps:
3+
- checkout
4+
- run:
5+
name: Init dependencies
6+
command: |
7+
git config --global user.email "GITHUB_USER_EMAIL"
8+
git config --global user.name "GITHUB_USER_NAME"
9+
apt-get update
10+
apt-get install zip wget -y
11+
wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz
12+
tar -xvzf cmake-3.10.2-Linux-x86_64.tar.gz
13+
chmod +x ./cmake-3.10.2-Linux-x86_64/bin/ccmake
14+
chmod +x ./cmake-3.10.2-Linux-x86_64/bin/cmake
15+
chmod +x ./cmake-3.10.2-Linux-x86_64/bin/cpack
16+
chmod +x ./cmake-3.10.2-Linux-x86_64/bin/ctest
17+
DIR=$(pwd)
18+
ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/ccmake /usr/bin/ccmake
19+
ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/cmake /usr/bin/cmake
20+
ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/cpack /usr/bin/cpack
21+
ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/ctest /usr/bin/ctest
22+
curl -k -o next_git_tag.sh https://gist.githubusercontent.com/matusnovak/eba81343f5578c38cf0a9bc22b548727/raw/1678041e118a77c3083216cbf55bcf7b46e02e38/next_git_tag.sh
23+
chmod +x next_git_tag.sh
24+
- run:
25+
name: Init submodules
26+
command: |
27+
git submodule init
28+
git submodule update
29+
- run:
30+
name: Build
31+
command: |
32+
mkdir build
33+
cd build
34+
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=MinSizeRel
35+
make install
36+
- run:
37+
name: Test
38+
command: |
39+
cd build
40+
ctest --verbose -C MinSizeRel -E "test_gl"
41+
- run:
42+
name: Package
43+
command: |
44+
GCC_MACHINE=$(gcc -dumpmachine)
45+
GCC_VERSION=$(gcc -dumpversion)
46+
cd install && zip -r "../simplesquirrel-$GCC_MACHINE-$GCC_VERSION.zip" * && cd ..
47+
mkdir /tmp/install
48+
cp *.zip /tmp/install
49+
50+
- store_artifacts:
51+
path: /tmp/install
52+
53+
- run:
54+
name: Deploy
55+
command: |
56+
if [ "$CIRCLE_BRANCH" == "master" ]; then
57+
wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2
58+
tar -xvjf linux-amd64-github-release.tar.bz2
59+
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
60+
GCC_MACHINE=$(gcc -dumpmachine)
61+
GCC_VERSION=$(gcc -dumpversion)
62+
source ./next_git_tag.sh
63+
./bin/linux/amd64/github-release release --user $CIRCLE_PROJECT_USERNAME --repo $CIRCLE_PROJECT_REPONAME --tag $GITHUB_RELEASE_TAG --name "Compiled - $GITHUB_RELEASE_TAG" --description "$COMMIT_MESSAGE" || true
64+
./bin/linux/amd64/github-release upload --user $CIRCLE_PROJECT_USERNAME --repo $CIRCLE_PROJECT_REPONAME --tag $GITHUB_RELEASE_TAG --replace --name simplesquirrel-$GCC_MACHINE-$GCC_VERSION.zip --file simplesquirrel-$GCC_MACHINE-$GCC_VERSION.zip
65+
fi
66+
67+
version: 2
68+
jobs:
69+
compile_gcc_550:
70+
<<: *compile_gcc
71+
72+
docker:
73+
- image: gcc:5.5.0
74+
env:
75+
- ARCH: 'x86_64'
76+
- TOOLSET: 'linux-gnu'
77+
78+
compile_gcc_640:
79+
<<: *compile_gcc
80+
81+
docker:
82+
- image: gcc:6.4.0
83+
env:
84+
- ARCH: 'x86_64'
85+
- TOOLSET: 'linux-gnu'
86+
87+
compile_gcc_730:
88+
<<: *compile_gcc
89+
90+
docker:
91+
- image: gcc:8.2.0
92+
env:
93+
- ARCH: 'x86_64'
94+
- TOOLSET: 'linux-gnu'
95+
96+
compile_gcc_820:
97+
<<: *compile_gcc
98+
99+
docker:
100+
- image: gcc:8.2.0
101+
env:
102+
- ARCH: 'x86_64'
103+
- TOOLSET: 'linux-gnu'
104+
105+
build_docs:
106+
docker:
107+
- image: circleci/python:3.6
108+
steps:
109+
- checkout
110+
- run:
111+
name: Init dependencies
112+
command: |
113+
sudo apt install doxygen
114+
git clone https://github.com/matusnovak/doxybook.git
115+
cd doxybook
116+
sudo python setup.py install
117+
118+
- run:
119+
name: Build
120+
command: |
121+
chmod +x ./doxygen/make.sh
122+
./doxygen/make.sh
123+
mkdir /tmp/doxygen
124+
cp -v ./doxygen/*.md /tmp/doxygen
125+
126+
- persist_to_workspace:
127+
root: /tmp
128+
paths:
129+
- doxygen
130+
131+
upload_docs:
132+
docker:
133+
- image: circleci/node:9
134+
steps:
135+
- attach_workspace:
136+
at: /tmp
137+
- checkout
138+
- run:
139+
name: Init dependencies
140+
command: |
141+
sudo npm install -g vuepress
142+
npm install
143+
144+
- run:
145+
name: Build
146+
command: |
147+
cp -v /tmp/doxygen/*.md ./doxygen
148+
vuepress build
149+
150+
- run:
151+
name: Deploy
152+
command: |
153+
git config --global user.email "GITHUB_USER_EMAIL"
154+
git config --global user.name "GITHUB_USER_NAME"
155+
npm run publish
156+
157+
workflows:
158+
version: 2
159+
build_and_test:
160+
jobs:
161+
- compile_gcc_550
162+
- compile_gcc_640:
163+
requires:
164+
- compile_gcc_550
165+
- compile_gcc_730:
166+
requires:
167+
- compile_gcc_640
168+
- compile_gcc_820:
169+
requires:
170+
- compile_gcc_730
171+
- build_docs:
172+
requires:
173+
- compile_gcc_820
174+
filters:
175+
branches:
176+
only:
177+
- master
178+
- upload_docs:
179+
requires:
180+
- build_docs
181+
filters:
182+
branches:
183+
only:
184+
- master

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ install/
3838
_book
3939
.vscode
4040
.publish
41+
42+
# doxygen
43+
doxygen/*.md
44+
doxygen/xml
45+
!doxygen/index.md

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "libs/squirrel"]
2+
path = libs/squirrel
3+
url = https://github.com/albertodemichelis/squirrel.git

.travis.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
language: cpp
2+
matrix:
3+
include:
4+
- os: linux
5+
addons:
6+
apt:
7+
sources:
8+
- ubuntu-toolchain-r-test
9+
packages:
10+
- g++-5
11+
- cmake
12+
env:
13+
- ARCH=x86_64
14+
- TOOLSET=linux-gnu
15+
- os: osx
16+
osx_image: xcode6.4
17+
addons:
18+
apt:
19+
sources:
20+
- llvm-toolchain-precise-3.7
21+
packages:
22+
- cmake
23+
- clang-3.7
24+
env:
25+
- ARCH=x86_64
26+
- TOOLSET=apple-darwin
27+
before_script:
28+
- curl -k -o next_git_tag.sh https://gist.githubusercontent.com/matusnovak/eba81343f5578c38cf0a9bc22b548727/raw/1678041e118a77c3083216cbf55bcf7b46e02e38/next_git_tag.sh
29+
- chmod +x ./next_git_tag.sh
30+
- git submodule init
31+
- git submodule update
32+
script:
33+
- export CURRENT_BRANCH=$TRAVIS_BRANCH
34+
- if [ $TRAVIS_OS_NAME == linux ]; then sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc; fi
35+
- if [ $TRAVIS_OS_NAME == linux ]; then sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-5 /usr/bin/g++; fi
36+
- gcc --version
37+
- g++ --version
38+
- mkdir build
39+
- cd build && (cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=MinSizeRel || travis_terminate 1) && cd ..
40+
- cd build && (make install || travis_terminate 1) && cd ..
41+
- cd build && (ctest --verbose -C MinSizeRel -E "test_gl" || travis_terminate 1) && cd ..
42+
- export GCC_MACHINE=$(gcc -dumpmachine)
43+
- export GCC_VERSION=$(gcc -dumpversion)
44+
- cd install && zip -r "../simplesquirrel-$GCC_MACHINE-$GCC_VERSION.zip" * && cd ..
45+
- if [ $TRAVIS_OS_NAME == linux ]; then wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2; fi
46+
- if [ $TRAVIS_OS_NAME == osx ]; then wget https://github.com/aktau/github-release/releases/download/v0.7.2/darwin-amd64-github-release.tar.bz2; fi
47+
- if [ $TRAVIS_OS_NAME == linux ]; then tar -xvjf linux-amd64-github-release.tar.bz2 && cp ./bin/linux/amd64/github-release . ; fi
48+
- if [ $TRAVIS_OS_NAME == osx ]; then tar -xvjf darwin-amd64-github-release.tar.bz2 && cp ./bin/darwin/amd64/github-release . ; fi
49+
- export COMMIT_MESSAGE=$(git log -1 --pretty=%B)
50+
- source ./next_git_tag.sh
51+
- export GITHUB_PROJECT_USERNAME=${TRAVIS_REPO_SLUG%/*}
52+
- export GITHUB_PROJECT_REPONAME=${TRAVIS_REPO_SLUG#*/}
53+
- if [ $TRAVIS_BRANCH == master ]; then ./github-release release --user $GITHUB_PROJECT_USERNAME --repo $GITHUB_PROJECT_REPONAME --tag $GITHUB_RELEASE_TAG --name "Compiled - $GITHUB_RELEASE_TAG" --description "$COMMIT_MESSAGE" || true; fi
54+
- if [ $TRAVIS_BRANCH == master ]; then ./github-release upload --user $GITHUB_PROJECT_USERNAME --repo $GITHUB_PROJECT_REPONAME --tag $GITHUB_RELEASE_TAG --replace --name simplesquirrel-$GCC_MACHINE-$GCC_VERSION.zip --file simplesquirrel-$GCC_MACHINE-$GCC_VERSION.zip || travis_terminate 1; fi
55+
branches:
56+
only:
57+
- master
58+
- devel
59+
notifications:
60+
email:
61+
recipients:
62+
- matusnov@gmail.com
63+
on_success: always
64+
on_failure: always

.vuepress/config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
base: "/simplesquirrel/",
3+
title: "SimpleSquirrel",
4+
description: "Simple Squirrel Binding library for C++11",
5+
themeConfig: {
6+
sidebar: "auto",
7+
nav: [
8+
{ text: "Home", link: "/" },
9+
{ text: "Install", link: "/INSTALL" },
10+
{ text: "Modules", link: "/doxygen/modules" },
11+
{
12+
text: "Classes",
13+
items: [
14+
{ text: "Class List", link: "/doxygen/annotated" },
15+
{ text: "Class Index", link: "/doxygen/classes" },
16+
{ text: "Function Index", link: "/doxygen/functions" },
17+
{ text: "Variable Index", link: "/doxygen/variables" },
18+
{ text: "Enumeration Index", link: "/doxygen/enumerations" }
19+
]
20+
},
21+
{ text: "Files", link: "/doxygen/files" },
22+
{ text: "Pages", link: "/doxygen/pages" }
23+
]
24+
}
25+
};

0 commit comments

Comments
 (0)