Skip to content

Commit

Permalink
removing useless jobs from release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andrelcmoreira committed Aug 18, 2024
1 parent 0c14e93 commit cfd0461
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 112 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
branches:
- develop
push:
branches:
- main

env:
COVERAGE_REPORT_DIR: build/coverage
Expand Down
116 changes: 4 additions & 112 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down

0 comments on commit cfd0461

Please sign in to comment.