diff --git a/.github/workflows/performance_test.yml b/.github/workflows/performance_test.yml new file mode 100644 index 00000000..d95e603e --- /dev/null +++ b/.github/workflows/performance_test.yml @@ -0,0 +1,53 @@ +name: Unit Tests + +on: + pull_request: + branches: [ main ] + +env: + BUILD_TYPE: Debug + +jobs: + performance_test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: install compiler + run: sudo apt update && sudo apt-get install -y clang-12 + + - name: Configure CMake + env: + CC: clang-12 + CXX: clang++-12 + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + id: build_step + run: | + cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t compilation_benchmark |& tee ${{github.workspace}}/build/compilation_output.log + echo "::set-output name=compile_benchmark_time::"`grep "Clang front-end timer" ${{github.workspace}}/build/compilation_output.log | grep -o "^\s\+\S\+\s" | grep -o "\S\+"` + + - name: Post compilation performance to pull rquest + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '### ⏱ 🏁 big_nexus.cpp compilation benchmark took **${{ steps.build_step.outputs.compile_benchmark_time }}** seconds' + }) + + - name: 'Upload Compilation Trace' + uses: actions/upload-artifact@v3 + with: + name: compilation_trace.json + path: ${{github.workspace}}/build/benchmark/CMakeFiles/compilation_benchmark.dir/big_nexus.cpp.json + diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 2346aa36..4ba63b68 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -155,49 +155,3 @@ jobs: with: name: cib.hpp path: ${{github.workspace}}/build/include/cib/cib.hpp - - - - performance_test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: install compiler - run: sudo apt update && sudo apt-get install -y clang-12 - - - name: Configure CMake - env: - CC: clang-12 - CXX: clang++-12 - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - id: build_step - run: | - cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t compilation_benchmark |& tee ${{github.workspace}}/build/compilation_output.log - echo "::set-output name=compile_benchmark_time::"`grep "Clang front-end timer" ${{github.workspace}}/build/compilation_output.log | grep -o "^\s\+\S\+\s" | grep -o "\S\+"` - - - name: Post compilation performance to pull rquest - uses: actions/github-script@v5 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '### ⏱ 🏁 big_nexus.cpp compilation benchmark took **${{ steps.build_step.outputs.compile_benchmark_time }}** seconds' - }) - - - name: 'Upload Compilation Trace' - uses: actions/upload-artifact@v3 - with: - name: compilation_trace.json - path: ${{github.workspace}}/build/benchmark/CMakeFiles/compilation_benchmark.dir/big_nexus.cpp.json -