From 525db87185d68e722c32658f0bf045bae927ead5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Sun, 25 Aug 2024 18:23:14 +0200 Subject: [PATCH 1/6] Move the C coverage to the CodeCov GitHub Action Same as Last PR. Now I expect the Lua coverage to work and the C coverage. I did it in 2 PRs to make sure the delta works. I also added a `-j8` in the example test step because it is I/O bound and it has enough ram. This should speed-up the CI (maybe?). --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c04d06987..ee944b2c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -240,10 +240,6 @@ jobs: if: matrix.coverage run: sudo -H luarocks install cluacov - - name: Install codecov.io uploader - if: matrix.coverage == 'codecov' - run: wget -O /tmp/codecov-bash https://codecov.io/bash - # Check out repository to ${{ github.workspace }} # Automatically picks the current branch/PR - uses: actions/checkout@v2 @@ -308,7 +304,7 @@ jobs: run: cd "${{ github.workspace }}/build" && make check-unit - name: Run examples tests - run: cd "${{ github.workspace }}/build" && make check-examples + run: cd "${{ github.workspace }}/build" && make check-examples -j8 - name: Run requires tests if: matrix.coverage @@ -330,7 +326,7 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Upload C code coverage report + - name: Generate C coverage report if: matrix.coverage == 'codecov' run: | # Report coverage for each .gcno file separately. @@ -349,9 +345,13 @@ jobs: # with Code Climate. find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete done - - # Upload to Codecov. - bash /tmp/codecov-bash -X gcov -X coveragepy -F gcov + - name: Upload C code coverage report + if: matrix.coverage == 'codecov' + uses: codecov/codecov-action@v3 + with: + files: "${{ github.workspace }}/gcov" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # `check-qa` is the only test that doesn't get a coverage report, so it has to run after all of that. - name: Run qa tests From 42d09806b5290afc42ca4bfe62a087f83c2b2f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Sun, 25 Aug 2024 18:33:54 +0200 Subject: [PATCH 2/6] Update main.yml --- .github/workflows/main.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee944b2c1..ae3d8dcfc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -304,7 +304,7 @@ jobs: run: cd "${{ github.workspace }}/build" && make check-unit - name: Run examples tests - run: cd "${{ github.workspace }}/build" && make check-examples -j8 + run: cd "${{ github.workspace }}/build" && make check-examples -j16 - name: Run requires tests if: matrix.coverage @@ -318,14 +318,6 @@ jobs: run: | luacov - - name: Upload Lua code coverage report - if: matrix.coverage == 'codecov' - uses: codecov/codecov-action@v3 - with: - files: "${{ github.workspace }}/build/luacov.report.out" - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Generate C coverage report if: matrix.coverage == 'codecov' run: | @@ -345,11 +337,20 @@ jobs: # with Code Climate. find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete done + - name: Upload C code coverage report if: matrix.coverage == 'codecov' uses: codecov/codecov-action@v3 with: - files: "${{ github.workspace }}/gcov" + files: "${{ github.workspace }}/build/*.gcov" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Upload Lua code coverage report + if: matrix.coverage == 'codecov' + uses: codecov/codecov-action@v3 + with: + files: "${{ github.workspace }}/build/luacov.report.out" env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 774fa0ad2e3a5ec9e315a06d34ea1f0ad1341dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Sun, 25 Aug 2024 18:40:00 +0200 Subject: [PATCH 3/6] Update main.yml --- .github/workflows/main.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae3d8dcfc..f989cf537 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -337,16 +337,8 @@ jobs: # with Code Climate. find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete done - - - name: Upload C code coverage report - if: matrix.coverage == 'codecov' - uses: codecov/codecov-action@v3 - with: - files: "${{ github.workspace }}/build/*.gcov" - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Upload Lua code coverage report + - name: Upload code coverage report if: matrix.coverage == 'codecov' uses: codecov/codecov-action@v3 with: From 4a09c2c85ff396ab0751044ac35f89e4bb4b795d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Tue, 27 Aug 2024 12:00:04 +0200 Subject: [PATCH 4/6] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f989cf537..8f6f797f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -304,7 +304,7 @@ jobs: run: cd "${{ github.workspace }}/build" && make check-unit - name: Run examples tests - run: cd "${{ github.workspace }}/build" && make check-examples -j16 + run: cd "${{ github.workspace }}/build" && make check-examples -j24 - name: Run requires tests if: matrix.coverage @@ -337,6 +337,7 @@ jobs: # with Code Climate. find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete done + find .. -iname '*gcov*' 2> /dev/null || true - name: Upload code coverage report if: matrix.coverage == 'codecov' From 59005ca3f749a2a37ededf5e5ec0ccddcac5596a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Tue, 27 Aug 2024 12:12:41 +0200 Subject: [PATCH 5/6] Update main.yml --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f6f797f9..27a18e159 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -337,7 +337,9 @@ jobs: # with Code Climate. find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete done - find .. -iname '*gcov*' 2> /dev/null || true + echo "All gcov files:" + find / -iname '*gcov*' 2> /dev/null || true + echo "PWD ${PWD}" - name: Upload code coverage report if: matrix.coverage == 'codecov' From 8ef35f56a3b1be0b01ce062e55aeab38f4a2a90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Tue, 27 Aug 2024 12:26:42 +0200 Subject: [PATCH 6/6] Update main.yml --- .github/workflows/main.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27a18e159..4e4a9fbca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -337,17 +337,22 @@ jobs: # with Code Climate. find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete done - echo "All gcov files:" - find / -iname '*gcov*' 2> /dev/null || true - echo "PWD ${PWD}" - - name: Upload code coverage report + - name: Upload Lua code coverage report if: matrix.coverage == 'codecov' uses: codecov/codecov-action@v3 with: files: "${{ github.workspace }}/build/luacov.report.out" env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Upload C code coverage report + if: matrix.coverage == 'codecov' + uses: codecov/codecov-action@v3 + with: + files: "${{ github.workspace }}/build/*/*.gcov" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # `check-qa` is the only test that doesn't get a coverage report, so it has to run after all of that. - name: Run qa tests