From 1c94376087e1edba102d4a1bbdb371bdf903b71d Mon Sep 17 00:00:00 2001 From: Donnie-Ice Date: Wed, 5 Jun 2024 19:00:36 +0000 Subject: [PATCH 1/2] [nasa/cryptolib#215] Testing code coverage + uploads to all builds --- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 307904d6..5ec69c29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: CryptoLib on: push: - branches: [ main, dev ] + branches: [ main, dev, 215-re-evaluate-codecov-app-being-used-in-ci ] pull_request: branches: [ main, dev ] @@ -27,6 +27,17 @@ jobs: working-directory: ${{github.workspace}} run: bash ${GITHUB_WORKSPACE}/support/scripts/build_minimal.sh + - name: Code-Coverage + working-directory: ${{github.workspace}} + run: make gcov + + - name: Upload + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a + with: + files: 'coverage/*.c.gcov' + # # Internal Build # @@ -77,6 +88,17 @@ jobs: - name: KMC Build Script working-directory: ${{github.workspace}} run: bash ${GITHUB_WORKSPACE}/support/scripts/build_kmc.sh + + - name: Code-Coverage + working-directory: ${{github.workspace}} + run: make gcov + + - name: Upload + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a + with: + files: 'coverage/*.c.gcov' # # Wolf Build @@ -116,6 +138,17 @@ jobs: - name: Wolf Build Script working-directory: ${{github.workspace}} run: bash ${GITHUB_WORKSPACE}/support/scripts/build_wolf.sh + + - name: Code-Coverage + working-directory: ${{github.workspace}} + run: make gcov + + - name: Upload + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a + with: + files: 'coverage/*.c.gcov' # # RHEL Build @@ -130,7 +163,7 @@ jobs: - name: Update run: yum update -y - name: Install Dependencies - run: yum install -y python38-devel libcurl-devel libgpg-error-devel libgcrypt-devel git cmake gcc java-11-openjdk-devel openssl wget mariadb-devel mariadb-common mariadb-connector-c mariadb-connector-c-config mariadb-errmsg mariadb-gssapi-server + run: yum install -y lcov python38-devel libcurl-devel libgpg-error-devel libgcrypt-devel git cmake gcc java-11-openjdk-devel openssl wget mariadb-devel mariadb-common mariadb-connector-c mariadb-connector-c-config mariadb-errmsg mariadb-gssapi-server # Might want to trim this down, but these dependencies should work for KMC - name: Install Python Dependencies run: pip3 install pycryptodome @@ -139,3 +172,14 @@ jobs: - name: RHEL Build Script working-directory: ${{github.workspace}} run: bash ${GITHUB_WORKSPACE}/support/scripts/build_rhel.sh + + - name: Code-Coverage + working-directory: ${{github.workspace}} + run: make gcov + + - name: Upload + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a + with: + files: 'coverage/*.c.gcov' From 65c039878f302dbb0f436056567ecda540db870e Mon Sep 17 00:00:00 2001 From: Donnie-Ice Date: Thu, 6 Jun 2024 17:34:36 +0000 Subject: [PATCH 2/2] [nasa/cryptolib#215] Fixed combining of codecov reports for all builds --- .github/workflows/build.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ec69c29..98de99f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: CryptoLib on: push: - branches: [ main, dev, 215-re-evaluate-codecov-app-being-used-in-ci ] + branches: [ main, dev ] pull_request: branches: [ main, dev ] @@ -27,17 +27,6 @@ jobs: working-directory: ${{github.workspace}} run: bash ${GITHUB_WORKSPACE}/support/scripts/build_minimal.sh - - name: Code-Coverage - working-directory: ${{github.workspace}} - run: make gcov - - - name: Upload - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a - with: - files: 'coverage/*.c.gcov' - # # Internal Build # @@ -63,11 +52,12 @@ jobs: run: make gcov - name: Upload - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a with: files: 'coverage/*.c.gcov' + verbose: true # # KMC Build @@ -94,11 +84,12 @@ jobs: run: make gcov - name: Upload - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a with: files: 'coverage/*.c.gcov' + verbose: true # # Wolf Build @@ -144,11 +135,12 @@ jobs: run: make gcov - name: Upload - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a with: files: 'coverage/*.c.gcov' + verbose: true # # RHEL Build @@ -163,8 +155,10 @@ jobs: - name: Update run: yum update -y - name: Install Dependencies - run: yum install -y lcov python38-devel libcurl-devel libgpg-error-devel libgcrypt-devel git cmake gcc java-11-openjdk-devel openssl wget mariadb-devel mariadb-common mariadb-connector-c mariadb-connector-c-config mariadb-errmsg mariadb-gssapi-server + run: yum install -y epel-release python38-devel libcurl-devel libgpg-error-devel libgcrypt-devel git cmake gcc java-11-openjdk-devel openssl wget mariadb-devel mariadb-common mariadb-connector-c mariadb-connector-c-config mariadb-errmsg mariadb-gssapi-server # Might want to trim this down, but these dependencies should work for KMC + - name: install lcov + run: yum install -y --enablerepo=epel lcov - name: Install Python Dependencies run: pip3 install pycryptodome # End Container Setup @@ -178,8 +172,9 @@ jobs: run: make gcov - name: Upload - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: 71699f25-12a3-44a4-8a83-be777b9e577a with: files: 'coverage/*.c.gcov' + verbose: true