-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
55 lines (47 loc) · 1.75 KB
/
action.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: 'Install-OpenCppCoverage'
description: 'Installs OpenCppCoverage on github actions'
inputs:
install-folder:
description: 'The designated install folder'
required: true
default: 'C:/Program Files (x86)/'
outputs:
OpenCppCoverage-exe-path:
description: 'The path to the OpenCppCoverage tool'
runs:
using: "composite"
steps:
- uses: suisei-cn/actions-download-file@v1
id: OPEN_CPP_COVERAGE_TAR # Remember to give an ID if you need the output
name: Download the file
with:
url: "https://github.com/KungFuDonkey/OpenCppCoverageBinaries/releases/download/v0.9.9.0/OpenCppCoverage.tar"
target: ${{ inputs.install-folder }}
- name: unzip-OpenCppCoverage
shell: bash
run: |
cd "${{ inputs.install-folder }}"
tar -xf OpenCppCoverage.tar
rm OpenCppCoverage.tar
- name: search-OpenCppCoverage
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "${{inputs.install-folder}}\\OpenCppCoverage\\OpenCppCoverage.exe"
- name: check-OpenCppCoverage-missing
shell: bash
if: steps.check_files.outputs.files_exists == 'false'
run: |
echo "install of OpenCppCoverage is missing"
exit -1
- name: export-OpenCppCoverage-path
shell: bash
env:
INPUT_FOLDER: ${{ inputs.install-folder }}
run: |
EXE_PATH="${{ env.INPUT_FOLDER }}OpenCppCoverage/OpenCppCoverage.exe"
echo "Exe path found: $EXE_PATH"
echo "::set-output name=OpenCppCoverage-exe-path::$EXE_PATH"
echo "Setting PATH variable for console usage"
echo "$INPUT_FOLDER\\OpenCppCoverage" >> $GITHUB_PATH
echo "Succesfully installed OpenCppCoverage to $INPUT_FOLDER"