|
3 | 3 |
|
4 | 4 | # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
5 | 5 |
|
6 |
| -name: delta coverage checks |
| 6 | +name: code coverage |
7 | 7 |
|
8 | 8 | permissions:
|
9 |
| - # Grant read permissions to repository in case it is not a forked public |
10 |
| - # repository, but a private repository that was created manually. |
11 |
| - contents: read |
12 |
| - |
13 | 9 | # Grant read permissions to private container images.
|
14 | 10 | packages: read
|
15 | 11 |
|
|
32 | 28 |
|
33 | 29 | jobs:
|
34 | 30 | build:
|
35 |
| - runs-on: ubuntu-20.04 |
| 31 | + runs-on: ubuntu-22.04 |
36 | 32 |
|
37 | 33 | container:
|
38 |
| - image: ghcr.io/intel/fpga-runtime-for-opencl/ubuntu-20.04-dev:main |
39 |
| - |
40 |
| - env: |
41 |
| - TMP_DIR: /home/build |
| 34 | + image: ghcr.io/intel/fpga-runtime-for-opencl/ubuntu-22.04-dev:main |
42 | 35 |
|
43 | 36 | steps:
|
44 | 37 | - name: checkout main branch
|
45 | 38 | uses: actions/checkout@v3
|
46 | 39 | with:
|
47 | 40 | ref: ${{ github.base_ref }}
|
48 |
| - |
49 |
| - - name: create build directories |
50 |
| - run: mkdir "$TMP_DIR/child_build" "$TMP_DIR/parent_build" |
| 41 | + |
| 42 | + - name: create build directory |
| 43 | + run: mkdir build |
51 | 44 |
|
52 | 45 | - name: create parent build files
|
53 |
| - run: cd "$TMP_DIR/parent_build" && cmake -G Ninja "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DACL_CODE_COVERAGE=ON |
| 46 | + run: cd build && cmake -G Ninja "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DACL_CODE_COVERAGE=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
54 | 47 |
|
55 | 48 | - name: build parent runtime
|
56 |
| - run: cd "$TMP_DIR/parent_build" && ninja -v -k0 |
| 49 | + run: cd build && ninja -v -k0 |
57 | 50 |
|
58 | 51 | - name: parent runtime coverage scan
|
59 |
| - run: cd "$TMP_DIR/parent_build" && ctest -T Test -T Coverage |
| 52 | + run: cd build && ctest -T Test -T Coverage |
| 53 | + |
| 54 | + - name: save build directory for later comparison |
| 55 | + run: mv -t "$RUNNER_TEMP" build |
60 | 56 |
|
61 | 57 | - name: checkout current branch
|
62 | 58 | uses: actions/checkout@v3
|
63 | 59 |
|
| 60 | + - name: create build directory |
| 61 | + run: mkdir build |
| 62 | + |
64 | 63 | - name: create child build files
|
65 |
| - run: cd "$TMP_DIR/child_build" && cmake -G Ninja "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DACL_CODE_COVERAGE=ON |
| 64 | + run: cd build && cmake -G Ninja "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DACL_CODE_COVERAGE=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
66 | 65 |
|
67 | 66 | - name: build child runtime
|
68 |
| - run: cd "$TMP_DIR/child_build" && ninja -v -k0 |
| 67 | + run: cd build && ninja -v -k0 |
69 | 68 |
|
70 | 69 | - name: child runtime coverage scan
|
71 |
| - run: cd "$TMP_DIR/child_build" && ctest -T Test -T Coverage |
| 70 | + run: cd build && ctest -T Test -T Coverage |
72 | 71 |
|
73 | 72 | - name: coverage status
|
74 |
| - run: ./scripts/coverage_diff.py "$TMP_DIR/child_build" "$TMP_DIR/parent_build" |
| 73 | + run: ./scripts/coverage_diff.py build "$RUNNER_TEMP"/build |
0 commit comments