-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
40 lines (37 loc) · 1.15 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
stages:
- build
- test
build:
stage: build
image: alpine:latest
before_script:
- echo "Installing GCC, boost-dev, CMake, make..."
- apk add --no-cache gcc g++ cmake boost-dev git make
- echo "Downloading GoogleTestFramework.."
- git clone --depth 1 https://github.com/google/googletest.git
- echo "Installing GoogleTestFramework..."
- cd googletest
- cmake -Bbuild -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
- cmake --build build --target install -j`nproc`
- cd -
script:
- echo $PATH
- echo "Building project..."
- cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -Bcmake-build-Debug -H.
- cmake --build cmake-build-Debug -j`nproc`
artifacts:
when: on_success
expire_in: 1 days
paths:
- cmake-build-Debug/output/
test:
stage: test
image: alpine:latest
before_script:
- echo "Installing boost-dev..."
- apk add --no-cache boost-dev
script:
- echo "Running output file..."
- ./cmake-build-Debug/output/unittest-relearn
dependencies:
- build