-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (66 loc) · 2.17 KB
/
cpu_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CPU acceptance tests
on:
workflow_dispatch:
inputs:
toolchain:
description: "Tool chain to use for test"
required: true
type: choice
options:
- tests_toolchain
- tests_release_toolchain
- tests_release_omp_toolchain
merge_target:
description: "The branch to which this branch should be compared to filter out costly tests (default: main)"
required: false
default: main
type: string
workflow_call:
inputs:
toolchain:
description: "Tool chain to use for test"
required: true
type: string
merge_target:
description: "The branch to which this branch should be compared to filter out costly tests"
required: true
type: string
pr_number:
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 }}
cancel-in-progress: true
jobs:
cpu_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/gyselax/gyselalibxx_env:latest
options: --user root
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