-
Notifications
You must be signed in to change notification settings - Fork 6
88 lines (88 loc) · 3.47 KB
/
Copy pathais-ci.yml
File metadata and controls
88 lines (88 loc) · 3.47 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: AIS_CI
run-name: Main CI workflow to coordinate jobs for a single platform.
on:
workflow_call:
inputs:
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
permissions:
contents: read
packages: read
jobs:
AIS_CI_Pre-check:
outputs:
changed_dockerfile: ${{ steps.ci-flags.outputs.changed_dockerfile }}
runs-on: [ubuntu-24.04]
steps:
- name: Fetching code repository...
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- name: Git fetch base ref
run: git fetch origin "${GITHUB_BASE_REF}"
- name: Set CI Flags
id: ci-flags
run: |
echo "changed_dockerfile=$(./util/files-changed.sh "origin/${GITHUB_BASE_REF}" HEAD 'util/docker/DOCKERFILE.*')" >> "${GITHUB_OUTPUT}"
build_AIS_CI_image:
needs: AIS_CI_Pre-check
permissions:
contents: read
packages: write
uses: ./.github/workflows/build-ais-ci-image.yml
with:
dockerfile_changed: ${{ needs.AIS_CI_Pre-check.outputs.changed_dockerfile == '1' }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
build_and_test:
# cancelled() needed. Otherwise success() implicitly added and fails if build_AIS_CI_image skipped.
if: ${{ !cancelled() && needs.build_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
needs: [AIS_CI_Pre-check, build_AIS_CI_image]
uses: ./.github/workflows/build-ais.yml
with:
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
cxx_compiler: amdclang++
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
upload_artifacts: true
build_and_test_other_compilers:
# Try building on other compilers, but keep as separate job.
# Removes issues regarding matrix job overwriting outputs and
# does not propagate failures.
if: ${{ !cancelled() && needs.build_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
needs: [AIS_CI_Pre-check, build_AIS_CI_image]
strategy:
fail-fast: false
matrix:
cxx_compiler:
- clang++
- g++
uses: ./.github/workflows/build-ais.yml
with:
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
cxx_compiler: ${{ matrix.cxx_compiler }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
AIS_system_tests:
# cancelled() needed. Otherwise success() implicitly added and fails if the chained
# dependency build_AIS_CI_image is skipped.
if: ${{ !cancelled() && needs.build_and_test.result == 'success'}}
needs: [build_and_test]
uses: ./.github/workflows/test-ais-system.yml
with:
ais_hipfile_pkg_dev_filename: ${{ needs.build_and_test.outputs.ais_hipfile_pkg_dev_filename }}
ais_hipfile_pkg_filename: ${{ needs.build_and_test.outputs.ais_hipfile_pkg_filename }}
ci_image: ${{ needs.build_and_test.outputs.ci_image }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
build_and_test_Nvidia:
if: ${{ !cancelled() && needs.build_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
needs: [AIS_CI_Pre-check, build_AIS_CI_image]
uses: ./.github/workflows/build-ais-nvidia.yml
with:
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}