Skip to content

Commit ec5032f

Browse files
authored
add github workflow (#4)
1 parent 812bcaf commit ec5032f

File tree

7 files changed

+65
-104
lines changed

7 files changed

+65
-104
lines changed

.c9build.sh

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

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ jobs:
55
docker:
66
- image: circleci/python:2.7-stretch
77
environment:
8-
CPPUTEST_HOME: cpputest-3.8
8+
CPPUTEST_HOME: cpputest-4.0
99
steps:
1010
- checkout
1111
- run: "curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin"
1212
- run: "testspace config url samples.testspace.com"
1313
- run: "sudo pip install gcovr"
14-
- run: "wget https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.zip"
15-
- run: "unzip cpputest-3.8.zip"
14+
- run: "wget https://github.com/cpputest/cpputest/releases/download/v4.0/cpputest-4.0.zip"
15+
- run: "unzip cpputest-4.0.zip"
1616
- run: cd $CPPUTEST_HOME/cpputest_build && autoreconf .. -i && ../configure && make && cp -R ./lib ../
1717
- run: make -C $CPPUTEST_HOME/examples CPPUTEST_USE_GCOV=Y clean all_no_tests |& tee build.log ; test ${PIPESTATUS[0]} -eq 0
1818
- run: $CPPUTEST_HOME/examples/CppUTestExamples_tests -o junit -v

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build
2+
on:
3+
push:
4+
schedule:
5+
- cron: '0 1 * * 0'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-18.04
10+
env:
11+
CPPUTEST_HOME: cpputest-4.0
12+
steps:
13+
- uses: actions/setup-python@v2
14+
with:
15+
python-version: 2.7
16+
- name: Setup build tools
17+
run: |
18+
sudo pip install gcovr
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 50
22+
- uses: testspace-com/setup-testspace@v1
23+
with:
24+
domain: samples
25+
- name: Install CppUTest
26+
run: |
27+
wget https://github.com/cpputest/cpputest/releases/download/v4.0/cpputest-4.0.zip
28+
unzip cpputest-4.0.zip
29+
pushd $CPPUTEST_HOME/cpputest_build
30+
autoreconf .. -i
31+
../configure
32+
make
33+
cp -R ./lib ../
34+
popd
35+
- name: Build
36+
run: |
37+
make -C $CPPUTEST_HOME/examples CPPUTEST_CXX_WARNINGFLAGS=-Wno-c++14-compat CPPUTEST_USE_GCOV=Y clean all_no_tests |& tee build.log ; test ${PIPESTATUS[0]} -eq 0
38+
- name: Test
39+
run: |
40+
$CPPUTEST_HOME/examples/CppUTestExamples_tests -o junit -v
41+
gcovr --root ./ --filter ".*/ApplicationLib/.*" -x -o coverage.xml
42+
- name: Push
43+
run: |
44+
testspace build.log{lint} [Tests]cpputest_*.xml coverage.xml
45+
if: always()

.gitignore

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
# Ignore everything
2-
*
3-
4-
# But not these files
5-
!.gitignore
6-
7-
!LICENSE
8-
!README.md
9-
10-
!.travis.yml
11-
!shippable.yml
12-
!.circleci/config.yml
13-
!.c9build.sh
14-
!.testspace.txt
1+
cpputest*
152

3+
build.log
4+
.cpputest_*.links/
5+
cpputest_*.xml
6+
coverage.xml

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ language:
33

44
env:
55
global:
6-
- CPPUTEST_HOME=$TRAVIS_BUILD_DIR/cpputest-3.8
6+
- CPPUTEST_HOME=$TRAVIS_BUILD_DIR/cpputest-4.0
77

88
before_install:
99
- mkdir -p $HOME/bin
1010
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
1111
- testspace config url samples.testspace.com
1212
- testspace -v
1313
- pip install --user gcovr
14-
- wget https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.zip
15-
- unzip cpputest-3.8.zip
14+
- wget https://github.com/cpputest/cpputest/releases/download/v4.0/cpputest-4.0.zip
15+
- unzip cpputest-4.0.zip
1616

1717
install:
1818
- pushd $CPPUTEST_HOME/cpputest_build
@@ -26,6 +26,6 @@ script:
2626
- make -C $CPPUTEST_HOME/examples CPPUTEST_CXX_WARNINGFLAGS=-Wno-c++14-compat CPPUTEST_USE_GCOV=Y clean all_no_tests |& tee build.log ; test ${PIPESTATUS[0]} -eq 0
2727
- $CPPUTEST_HOME/examples/CppUTestExamples_tests -o junit -v
2828
- gcovr --root ./ --filter ".*/ApplicationLib/.*" -x -o coverage.xml
29-
29+
3030
after_script:
31-
- testspace build.log{lint} [Tests]cpputest_*.xml coverage.xml
31+
- testspace build.log{lint} [Tests]cpputest_*.xml coverage.xml

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
## C++/CppUTest sample for demonstrating Testspace
66

7-
Sample demonstrates techniques for using Testspace with C++ code and the [CppUTest framework](https://cpputest.github.io):
7+
Sample demonstrates techniques for using Testspace with C++ code and the [CppUTest framework](https://cpputest.github.io):
88
* Using a Testspace Project that is `connected` with this GitHub Repo
99
* Using 3 Online CI services for demonstration purposes only
10-
* Can review the Results at [testspace-samples:cpp.cpputest](https://samples.testspace.com/projects/testspace-samples:cpp.cpputest)
11-
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
10+
* Can review the Results at [testspace-samples:cpp.cpputest](https://samples.testspace.com/projects/testspace-samples:cpp.cpputest)
11+
* Refer to our [Help](https://help.testspace.com/) for more information
1212

1313
***
1414
Using Multiple Online CI Services:
1515

16+
![Build](https://github.com/testspace-samples/cpp.googletest/workflows/Build/badge.svg)
1617
[![Build Status](https://travis-ci.org/testspace-samples/cpp.cpputest.svg?branch=master)](https://travis-ci.org/testspace-samples/cpp.cpputest)
1718
[![CircleCI](https://circleci.com/gh/testspace-samples/cpp.cpputest.svg?style=svg)](https://circleci.com/gh/testspace-samples/cpp.cpputest)
18-
[![Run Status](https://api.shippable.com/projects/56ffcaa09d043da07b0991f0/badge?branch=master)](https://app.shippable.com/projects/56ffcaa09d043da07b0991f0)
1919

2020
***
2121
Publishing Results using www.testspace.com.
@@ -28,7 +28,7 @@ Publishing Results using www.testspace.com.
2828

2929
***
3030

31-
Download and configure the Testspace client
31+
Download and configure the Testspace client
3232

3333
<pre>
3434
mkdir -p $HOME/bin
@@ -44,11 +44,11 @@ $CPPUTEST_HOME/examples/CppUTestExamples_tests -o junit -v
4444
gcovr --root ./ --filter ".*examples/ApplicationLib/.*" -x -o coverage.xml
4545
</pre>
4646

47-
Push Content using Testspace client
47+
Push Content using Testspace client
4848

4949
<pre>
5050
testspace build.log{lint} [Tests]cpputest_*.xml coverage.xml
51-
</pre>
51+
</pre>
5252

5353

5454

shippable.yml

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

0 commit comments

Comments
 (0)