Remove unused variables #798
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Acceptance tests | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
merge_group: | |
types: | |
- checks_requested | |
jobs: | |
pre_job: | |
name: 'Check for unnecessary runs' | |
runs-on: ubuntu-latest | |
if: github.repository == 'gyselax/gyselalibxx' && github.event.pull_request.draft == false | |
# Map a step output to a job output | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
# All of these options are optional, so you can remove them if you are happy with the defaults | |
skip_after_successful_duplicate: 'true' | |
paths: '["src/**/*.hpp", "src/**/*.cpp", "tests/**/*.hpp", "tests/**/*.cpp", "simulations/**/*.hpp", "simulations/**/*.cpp", "**/CMakeLists.txt", "vendor/**", ".github/**"]' | |
cancel_others: 'false' | |
cpu_tests: | |
strategy: | |
matrix: | |
toolchain: [tests_toolchain, tests_release_toolchain, tests_release_omp_toolchain] | |
fail-fast: false | |
name: CPU Test (${{ matrix.toolchain }}) | |
needs: pre_job | |
uses: ./.github/workflows/cpu_tests.yml | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
merge_target: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} | |
pr_number: ${{ github.event.pull_request.number }} | |
is_duplicate: ${{ needs.pre_job.outputs.should_skip == 'true' && github.event.pull_request.draft == false }} | |
gpu_tests: | |
name: GPU Test | |
needs: pre_job | |
uses: ./.github/workflows/gpu_tests.yml | |
if: github.repository == 'gyselax/gyselalibxx' | |
with: | |
merge_target: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} | |
SHA: ${{ github.event.pull_request.head.sha }} | |
pr_number: ${{ github.event.pull_request.number }} | |
is_duplicate: ${{ needs.pre_job.outputs.should_skip == 'true' && github.event.pull_request.draft == false }} | |
secrets: inherit | |
set_draft_failing: | |
runs-on: ubuntu-latest | |
needs: [cpu_tests, gpu_tests] | |
if: github.event_name == 'pull_request' && failure() | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set PR to draft to avoid unnecessary runs | |
if: github.repository == 'gyselax/gyselalibxx' | |
run: | | |
isDraft=${{ github.event.pull_request.draft }} | |
if [ "${isDraft}" != "true" ] | |
then | |
if [ "${{github.repository == 'gyselax/gyselalibxx'}}" == "true" ] | |
then | |
gh pr ready ${{ github.event.pull_request.number }} --undo | |
fi | |
gh pr comment ${{ github.event.pull_request.number }} -b "This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass." | |
gh pr edit ${{ github.event.pull_request.number }} --remove-label "Ready to review" | |
fi | |
shell: bash | |
env: | |
GH_TOKEN: ${{ github.token }} | |
set_draft_cancelled: | |
runs-on: ubuntu-latest | |
needs: [cpu_tests, gpu_tests] | |
if: github.event_name == 'pull_request' && cancelled() | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set PR to draft to avoid unnecessary runs | |
run: | | |
isDraft=${{ github.event.pull_request.draft }} | |
if [ "${isDraft}" != "true" ] | |
then | |
if [ "${{github.repository == 'gyselax/gyselalibxx'}}" == "true" ] | |
then | |
gh pr ready ${{ github.event.pull_request.number }} --undo | |
fi | |
gh pr comment ${{ github.event.pull_request.number }} -b "It seems like you haven't finished working on this PR so it has been put back into draft. Please remove the draft status when the PR can run tests without being interrupted." | |
gh pr edit ${{ github.event.pull_request.number }} --remove-label "Ready to review" | |
fi | |
shell: bash | |
env: | |
GH_TOKEN: ${{ github.token }} |