Skip to content

Commit

Permalink
Merge branch 'main' into gdgirard_10-partial-derivatives-of-a-2d-field
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyBourne authored Dec 12, 2024
2 parents 8b5b68b + 7bbbca0 commit 841c82d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/cpu_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ on:
description: "The number of the pull request that triggered the test"
required: false
type: number
is_duplicate:
description: "Indicate if the run would be a duplicate"
required: false
default: false
type: boolean

concurrency:
group: ${{ github.event_name != 'workflow_dispatch' && format('{0}-{1}-{2}', github.workflow, inputs.pr_number, inputs.toolchain) || github.run_id }}
Expand All @@ -44,17 +49,21 @@ jobs:
name: CPU Test (${{ inputs.toolchain }})
steps:
- name: Checkout gyselalibxx
if: ${{ (! inputs.is_duplicate) || true }}
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Filter tests"
if: ${{ (! inputs.is_duplicate) || true }}
uses: ./.github/actions/test_filter
with:
base_sha: ${{ inputs.merge_target }}
trigger_type: ${{ github.event_name }}
- name: Build code
if: ${{ (! inputs.is_duplicate) || true }}
uses: ./.github/actions/build_code
with:
toolchain: toolchains/docker.gyselalibxx_env/${{ inputs.toolchain }}.cmake
- name: Run tests
if: ${{ (! inputs.is_duplicate) || true }}
uses: ./.github/actions/run_tests
10 changes: 10 additions & 0 deletions .github/workflows/gpu_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
description: "The number of the pull request that triggered the test"
required: false
type: number
is_duplicate:
description: "Indicate if the run would be a duplicate"
required: false
default: false
type: boolean

concurrency:
group: ${{ github.event_name != 'workflow_dispatch' && format('{0}-{1}', github.workflow, inputs.pr_number) || github.run_id }}
Expand All @@ -29,21 +34,26 @@ jobs:
environment: development
steps:
- name: Checkout gyselalibxx
if: ${{ (! inputs.is_duplicate) || true }}
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Filter tests"
if: ${{ (! inputs.is_duplicate) || true }}
uses: ./.github/actions/test_filter
with:
base: ${{ inputs.merge_target }}
trigger_type: ${{ github.event_name }}
- name: Setup environment
if: ${{ (! inputs.is_duplicate) || true }}
run: |
. toolchains/v100.persee/environment.sh
shell: bash
- name: Build code
if: ${{ (! inputs.is_duplicate) || true }}
uses: ./.github/actions/build_code
with:
toolchain: toolchains/v100.persee/toolchain.cmake
- name: Run tests
if: ${{ (! inputs.is_duplicate) || true }}
uses: ./.github/actions/run_tests
16 changes: 4 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
name: 'Check for unnecessary runs'
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
# Map a step output to a job output
Expand All @@ -25,15 +25,7 @@ jobs:
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/**"
paths: '["src/**/*.hpp", "src/**/*.cpp", "tests/**/*.hpp", "tests/**/*.cpp", "simulations/**/*.hpp", "simulations/**/*.cpp", "**/CMakeLists.txt", "vendor/**"]'
cancel_others: 'false'

cpu_tests:
Expand All @@ -43,21 +35,21 @@ jobs:
fail-fast: false
name: CPU Test (${{ matrix.toolchain }})
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true' && github.event.pull_request.draft == false
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
if: needs.pre_job.outputs.should_skip != 'true' && github.event.pull_request.draft == false
uses: ./.github/workflows/gpu_tests.yml
with:
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 }}

set_draft_failing:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 841c82d

Please sign in to comment.