File tree 4 files changed +98
-44
lines changed
actions/docker_pull_and_make
4 files changed +98
-44
lines changed Original file line number Diff line number Diff line change
1
+ name : docker_pull_and_make
2
+
3
+ inputs :
4
+ leatherman_pkg_suffix :
5
+ description : leatherman suffix
6
+ type : string
7
+ cmake_extra_vars :
8
+ description : extra vars for cmake
9
+ type : string
10
+ make_command :
11
+ description : make command
12
+ type : string
13
+ coveralls :
14
+ description : on or off
15
+ type : string
16
+
17
+ runs :
18
+ using : " composite"
19
+ steps :
20
+ - name : pull_docker_image
21
+ shell : bash
22
+ run : docker pull gcr.io/cpp-projects/cpp-ci:1
23
+ - name : run_make
24
+ shell : bash
25
+ run : |
26
+ docker run -v `pwd`:/cpp-hocon gcr.io/cpp-projects/cpp-ci:1 /bin/bash -c "
27
+ wget https://github.com/puppetlabs/leatherman/releases/download/1.5.2/leatherman${{ inputs.leatherman_pkg_suffix }}.tar.gz &&
28
+ tar xzvf leatherman${{ inputs.leatherman_pkg_suffix }}.tar.gz --strip 1 -C / &&
29
+ cd /cpp-hocon &&
30
+ cmake ${{ inputs.cmake_extra_vars }} . &&
31
+ mkdir dest &&
32
+ make ${{ inputs.make_command }} DESTDIR=/cpp-hocon/dest VERBOSE=1 -j2 &&
33
+ { [[ '${{ inputs.coveralls }}' != 'ON' ]] || coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; } "
Original file line number Diff line number Diff line change
1
+ name : CI checks
2
+ on :
3
+ pull_request :
4
+ branches : [master]
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ jobs :
10
+ ci_checks :
11
+ strategy :
12
+ matrix :
13
+ options :
14
+ - make_command : cpplint
15
+ - make_command : cppcheck
16
+ - make_command : all test install ARGS=-V
17
+ cmake_extra_vars : -DBOOST_STATIC=ON -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=ON
18
+ coveralls : ON
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : checkout
22
+ uses : actions/checkout@v3
23
+ - name : docker_pull_and_make
24
+ uses : ./.github/actions/docker_pull_and_make
25
+ with :
26
+ cmake_extra_vars : ${{ matrix.options.cmake_extra_vars }}
27
+ make_command : ${{ matrix.options.make_command }}
28
+ coveralls : ${{ matrix.options.coveralls }}
Original file line number Diff line number Diff line change
1
+ name : release jobs
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' *'
6
+
7
+ permissions :
8
+ contents : write
9
+
10
+ jobs :
11
+ release :
12
+ strategy :
13
+ matrix :
14
+ options :
15
+ - make_command : all test install ARGS=-V
16
+ cmake_extra_vars : -DBOOST_STATIC=ON
17
+ - make_command : all test install ARGS=-V
18
+ leatherman_pkg_suffix : " -dynamic"
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : checkout
22
+ uses : actions/checkout@v3
23
+ - name : docker_pull_and_make
24
+ uses : ./.github/actions/docker_pull_and_make
25
+ with :
26
+ cmake_extra_vars : ${{ matrix.options.cmake_extra_vars }}
27
+ make_command : ${{ matrix.options.make_command }}
28
+ leatherman_pkg_suffix : ${{ matrix.options.leatherman_pkg_suffix }}
29
+ - name : build_release_artifact_for_tags
30
+ if : startsWith(github.ref, 'refs/tags/')
31
+ run : tar czvf cpp-hocon${{ matrix.options.leatherman_pkg_suffix }}.tar.gz `find dest -type f -print`
32
+ - name : upload_release_artifacts_for_tag
33
+ uses : softprops/action-gh-release@v1
34
+ if : startsWith(github.ref, 'refs/tags/')
35
+ with :
36
+ files : cpp-hocon${{ matrix.options.leatherman_pkg_suffix }}.tar.gz
37
+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments