From cfd0461838e52a59655a4dced6fb533f11fcfea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?andr=C3=A9?= Date: Sun, 18 Aug 2024 03:11:58 -0300 Subject: [PATCH] removing useless jobs from release workflow --- .github/workflows/pull_request.yaml | 3 + .github/workflows/release.yaml | 116 +--------------------------- 2 files changed, 7 insertions(+), 112 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index cca039e..534ff68 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -5,6 +5,9 @@ on: push: branches: - develop + push: + branches: + - main env: COVERAGE_REPORT_DIR: build/coverage diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3758196..eef35af 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,119 +5,11 @@ on: types: published env: - COVERAGE_REPORT_DIR: build/coverage DOC_HTML_DIR: build/html - MINIMUM_COVERAGE: 85 - LD_PRELOAD: LD_PRELOAD=build/test/src/libc/libpreload.so DOC_ARTIFACT: pool-day-doc jobs: - build: - name: Build library - runs-on: ubuntu-latest - container: - image: andrelcmoreira/pool-day:v1 - volumes: - - ${{ github.workspace }}:/pool-day - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} - steps: - - uses: actions/checkout@v2 - - name: Build library - run: | - cmake -DCMAKE_BUILD_TYPE=Release -S . -B build - cmake --build build - - build_samples: - name: Build samples - runs-on: ubuntu-latest - container: - image: andrelcmoreira/pool-day:v1 - volumes: - - ${{ github.workspace }}:/pool-day - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} - steps: - - uses: actions/checkout@v2 - - name: Build samples - run: | - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON -S . -B build - cmake --build build - - unit_tests: - name: Run unit tests - runs-on: ubuntu-latest - needs: build - container: - image: andrelcmoreira/pool-day:v1 - volumes: - - ${{ github.workspace }}:/pool-day - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} - steps: - - uses: actions/checkout@v2 - - - name: Build tests - run: | - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_UNIT_TESTS=ON -S . -B build - cmake --build build - - - name: Run unit tests - run: ${{ env.LD_PRELOAD }} build/test/pool-day-tests - - dynamic_analysis: - name: Run dynamic analysis - runs-on: ubuntu-latest - needs: unit_tests - container: - image: andrelcmoreira/pool-day:v1 - volumes: - - ${{ github.workspace }}:/pool-day - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} - steps: - - uses: actions/checkout@v2 - - - name: Build tests - run: | - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_UNIT_TESTS=ON -S . -B build - cmake --build build - - - name: Run valgrind - run: ${{ env.LD_PRELOAD }} valgrind --leak-check=full --error-exitcode=1 build/test/pool-day-tests - - check_coverage: - name: Check test coverage - runs-on: ubuntu-latest - needs: unit_tests - container: - image: andrelcmoreira/pool-day:v1 - volumes: - - ${{ github.workspace }}:/pool-day - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} - steps: - - uses: actions/checkout@v2 - - - name: Build tests - run: | - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_UNIT_TESTS=ON -DBUILD_COVERAGE=ON -S . -B build - cmake --build build - - - name: Generate coverage report - run: | - mkdir ${{ env.COVERAGE_REPORT_DIR }} - ${{ env.LD_PRELOAD }} build/test/pool-day-tests - gcovr -r . -s --html --html-details \ - --fail-under-line ${{ env.MINIMUM_COVERAGE }} \ - -o ${{ env.COVERAGE_REPORT_DIR }}/pool-day.html - - generate_documentation: + generate_doc: name: Generate documentation runs-on: ubuntu-latest container: @@ -129,15 +21,15 @@ jobs: password: ${{ secrets.DOCKERHUB_PASS }} steps: - uses: actions/checkout@v2 - - name: Build library documentation + - name: Build library doc run: | cmake -DBUILD_DOCUMENTATION=ON -S . -B build cmake --build build - - name: Create documentation tarball + - name: Create doc tarball run: tar -C ${{ env.DOC_HTML_DIR }} -czf ${{ env.DOC_ARTIFACT }}.tar.gz . - - name: Upload documentation to release + - name: Upload doc to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }}