|
2 | 2 |
|
3 | 3 | on: [push]
|
4 | 4 |
|
5 |
| -env: |
6 |
| - CI: "ON" |
7 |
| - |
8 | 5 | jobs:
|
9 | 6 |
|
10 | 7 | Build:
|
|
20 | 17 | GCC_V: ${{matrix.gcc_v}}
|
21 | 18 |
|
22 | 19 | steps:
|
| 20 | + |
| 21 | + - name: Set vars |
| 22 | + id: vars |
| 23 | + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
| 24 | + |
23 | 25 | - name: Checkout code
|
24 | 26 | uses: actions/checkout@v2
|
25 | 27 | with:
|
@@ -92,20 +94,40 @@ jobs:
|
92 | 94 | cmake ..
|
93 | 95 | make -j 4 check
|
94 | 96 |
|
95 |
| - # - name: Run tests |
96 |
| - # run: | |
97 |
| - # ./bin/slsqp_test |
98 |
| - # ./bin/slsqp_test_2 |
99 |
| - # ./bin/slsqp_test_3 |
100 |
| - # ./bin/slsqp_test_71 |
101 |
| - # ./bin/slsqp_test_stopping_criterion |
102 |
| - |
103 |
| - # - name: Build documentation |
104 |
| - # run: ford ./json-fortran.md |
105 |
| - |
106 |
| - # - name: Deploy Documentation |
107 |
| - # if: github.ref == 'refs/heads/master' |
108 |
| - # uses: JamesIves/[email protected] |
109 |
| - # with: |
110 |
| - # branch: gh-pages # The branch the action should deploy to. |
111 |
| - # folder: doc # The folder the action should deploy. |
| 97 | + - name: Deploy Documentation for master |
| 98 | + if: github.ref == 'refs/heads/master' && $DEPLOY_DOCUMENTATION == 'yes' |
| 99 | + |
| 100 | + with: |
| 101 | + branch: gh-pages # The branch the action should deploy to. |
| 102 | + folder: doc # The folder the action should deploy. |
| 103 | + clean: true |
| 104 | + clean-exclude: | |
| 105 | + prev |
| 106 | +
|
| 107 | + - name: Rebuild documentation for tagged release |
| 108 | + env: |
| 109 | + TAGNAME: ${{ steps.vars.outputs.tag }} |
| 110 | + if: $DEPLOY_DOCUMENTATION == 'yes' && startsWith(github.ref, 'refs/tags/') |
| 111 | + run: | |
| 112 | + echo ${TAGNAME} |
| 113 | + rm -rf doc |
| 114 | + sed "2 s/^/version: ${TAGNAME}\n/" json-fortran.md > json-fortran.tagged.md |
| 115 | + ford --debug json-fortran.tagged.md |
| 116 | +
|
| 117 | + - name: Deploy documentation for tagged release |
| 118 | + env: |
| 119 | + TAGNAME: ${{ steps.vars.outputs.tag }} |
| 120 | + if: $DEPLOY_DOCUMENTATION == 'yes' && startsWith(github.ref, 'refs/tags/') |
| 121 | + |
| 122 | + with: |
| 123 | + branch: gh-pages # The branch the action should deploy to. |
| 124 | + folder: doc # The folder the action should deploy. |
| 125 | + target-folder: prev/$TAGNAME # deploy to a version-specific folder |
| 126 | + |
| 127 | + - name: Upload coverage |
| 128 | + if: $CODE_COVERAGE == 'yes' |
| 129 | + run: | |
| 130 | + rm json_*.F90-*unicode.gcov || true |
| 131 | + mv json_*.F90.gcov src/ |
| 132 | + mv jf_test*.[fF]90.gcov src/tests/ |
| 133 | + bash <(curl -s https://codecov.io/bash) -v -X $GCOV |
0 commit comments