Skip to content

Commit 41cd379

Browse files
committed
Add CI starter workflows
fixes #782
1 parent 010aa02 commit 41cd379

File tree

5 files changed

+80
-0
lines changed

5 files changed

+80
-0
lines changed

examples/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Examples
2+
3+
This folder contains examples on how to make use of Popper in distinct
4+
contexts:
5+
6+
* [Continuous Integration (CI)](./ci/). A list of starter workflows
7+
for using Popper to continuously test your project.

examples/ci/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CI workflow starters
2+
3+
A list of examples that can be used as starter points for automating
4+
CI workflows with Popper.
5+
6+
## CI Service Setup
7+
8+
You can use the `popper` tool to generate configuration files that are
9+
consumed by a CI service to automatically run a workflow. Assuming you
10+
place the starter workflow on the root of your repository, you can
11+
generate a CI configuration file by doing:
12+
13+
```bash
14+
popper ci --file ci.yml <SERVICE>
15+
```
16+
17+
Where `SERVICE` is the name of a supported service (Travis, CircleCI,
18+
Jenkins and Gitlab are supported). See more in [Popper
19+
documentation](../docs/sections/cli_features.md#continuously-validating-a-workflow).

examples/ci/cpp-conan.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
steps:
2+
- id: dev-init
3+
uses: docker://conanio/gcc72:1.25.2
4+
runs: [bash]
5+
args:
6+
- -c
7+
- |
8+
rm -rf build
9+
mkdir -p build
10+
cd build
11+
conan install ../ --build=missing
12+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
13+
14+
- id: build
15+
uses: docker://conanio/gcc72:1.25.2
16+
runs: [bash]
17+
args:
18+
- -c
19+
- |
20+
cd build/
21+
cmake --build .
22+
23+
- id: test
24+
uses: docker://conanio/gcc72:1.25.2
25+
runs: [bash]
26+
args:
27+
- -c
28+
- |
29+
cd build/
30+
make test

examples/ci/go.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- id: get deps
3+
uses: docker://golang:1.14.4-alpine3.11
4+
args: [go, get, -v, -t, -d, ./...]
5+
6+
- name: build
7+
uses: docker://golang:1.14.4-alpine3.11
8+
args: [go, build, -v, .]
9+
10+
- name: test
11+
uses: docker://golang:1.14.4-alpine3.11
12+
args: [go, test, -v, .]

examples/ci/nodejs.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- id: install
3+
uses: docker://node:12-alpine
4+
args: [yarn, install]
5+
6+
- id: build
7+
uses: docker://node:12-alpine
8+
args: [yarn, build]
9+
10+
- id: test
11+
uses: docker://node:12-alpine
12+
args: [yarn, test]

0 commit comments

Comments
 (0)