Skip to content

Commit 5633341

Browse files
committed
package/ci: initial CircleCI setup with a desktop Linux build.
1 parent b463da7 commit 5633341

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../package/ci/circleci.yml

package/ci/circleci.yml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
version: 2.1
2+
3+
orbs:
4+
codecov: codecov/[email protected]
5+
6+
executors:
7+
ubuntu-16_04:
8+
docker:
9+
- image: ubuntu:xenial-20201014
10+
11+
commands:
12+
install-base:
13+
steps:
14+
- run:
15+
name: Update apt and install base tools
16+
# - Curl needed by codecov, wget by us
17+
# - git soft-required by the `checkout` step, but needed by us to
18+
# generate version info
19+
command: |
20+
apt update
21+
apt install -y ninja-build lcov wget curl git
22+
23+
install-gcc-4_8:
24+
steps:
25+
- run:
26+
name: Install GCC 4.8
27+
command: |
28+
apt install -y g++-4.8
29+
echo 'export CXX=g++-4.8' >> $BASH_ENV
30+
31+
install-cmake-3_4:
32+
steps:
33+
- run:
34+
name: Install CMake 3.4
35+
command: |
36+
mkdir -p $HOME/cmake && cd $HOME/cmake
37+
wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz
38+
tar --strip-components=1 -xzf cmake-3.4.3-Linux-x86_64.tar.gz
39+
echo 'export PATH=$HOME/cmake/bin:$PATH' >> $BASH_ENV
40+
source $BASH_ENV && cmake --version | grep 3.4
41+
42+
make-expected-linux-dirs:
43+
steps:
44+
- run:
45+
name: Create files expected by Utility::Directory tests on Linux
46+
command: |
47+
mkdir -p ~/.config/autostart
48+
mkdir -p ~/.local
49+
50+
build:
51+
parameters:
52+
script:
53+
type: string
54+
steps:
55+
- checkout
56+
- run:
57+
name: Build & test
58+
command: |
59+
if [ "$BUILD_STATIC" != "ON" ]; then export BUILD_STATIC=OFF; fi
60+
if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi
61+
./package/ci/<< parameters.script >>
62+
63+
lcov:
64+
steps:
65+
- run:
66+
name: Collect code coverage
67+
command: |
68+
lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null
69+
lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Corrade/*" --output-file coverage.info > /dev/null
70+
lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null
71+
lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/build/src/Corrade/*" --output-file coverage.info > /dev/null
72+
- codecov/upload:
73+
file: coverage.info
74+
75+
jobs:
76+
linux:
77+
executor: ubuntu-16_04
78+
environment:
79+
CMAKE_CXX_FLAGS: --coverage
80+
LCOV_EXTRA_OPTS: --gcov-tool /usr/bin/gcov-4.8
81+
CONFIGURATION: Debug
82+
steps:
83+
- install-base
84+
- install-gcc-4_8
85+
- install-cmake-3_4
86+
- make-expected-linux-dirs
87+
- build:
88+
script: travis-desktop.sh
89+
- lcov
90+
91+
workflows:
92+
version: 2
93+
build:
94+
jobs:
95+
- linux

0 commit comments

Comments
 (0)