Skip to content

Commit 9d0038c

Browse files
ci: Add a amdclang++ C++20 build.
1 parent 132962a commit 9d0038c

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

.github/workflows/ais-ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ jobs:
4848
platform: ${{ inputs.platform }}
4949
rocm_version: ${{ inputs.rocm_version }}
5050
upload_artifacts: true
51+
build_and_test_cxx20:
52+
if: ${{ !cancelled() && needs.build_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
53+
needs: [AIS_CI_Pre-check, build_AIS_CI_image]
54+
uses: ./.github/workflows/build-ais.yml
55+
with:
56+
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
57+
cxx_compiler: amdclang++
58+
cxx_standard: 20
59+
platform: ${{ inputs.platform }}
60+
rocm_version: ${{ inputs.rocm_version }}
61+
upload_artifacts: false
62+
generate_coverage: false
5163
build_and_test_other_compilers:
5264
# Try building on other compilers, but keep as separate job.
5365
# Removes issues regarding matrix job overwriting outputs and

.github/workflows/build-ais.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ env:
55
AIS_INPUT_BUILD_ID: ${{ inputs.build_id }}
66
AIS_INPUT_CI_IMAGE: ${{ inputs.ci_image }}
77
AIS_INPUT_CXX_COMPILER: ${{ inputs.cxx_compiler }}
8+
AIS_INPUT_CXX_STANDARD: ${{ inputs.cxx_standard }}
89
AIS_INPUT_JOB_DESIGNATOR: ${{ inputs.job_designator }}
910
AIS_INPUT_PLATFORM: ${{ inputs.platform }}
1011
AIS_INPUT_UPLOAD_ARTIFACTS: ${{ inputs.upload_artifacts }}
@@ -18,7 +19,7 @@ env:
1819
AIS_PKG_TYPE: ${{ inputs.platform == 'ubuntu' && 'DEB' || 'RPM' }}
1920
AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }}
2021
# Code coverage report only vetted to work for amdclang++ on Ubuntu
21-
AIS_USE_CODE_COVERAGE: ${{ inputs.cxx_compiler == 'amdclang++' && inputs.platform == 'ubuntu' }}
22+
AIS_USE_CODE_COVERAGE: ${{ inputs.cxx_compiler == 'amdclang++' && inputs.platform == 'ubuntu' && inputs.generate_coverage }}
2223
AIS_HIP_ARCHITECTURES: gfx950;gfx1201;gfx1200;gfx1101;gfx1100;gfx1030;gfx942;gfx90a;gfx908
2324
on:
2425
workflow_call:
@@ -34,6 +35,15 @@ on:
3435
cxx_compiler:
3536
required: true
3637
type: string
38+
cxx_standard:
39+
required: false
40+
type: number
41+
default: 17
42+
generate_coverage:
43+
default: true
44+
description: "Allow coverage to be generated"
45+
required: false
46+
type: boolean
3747
job_designator:
3848
description: "Qualifies the type of job building hipFile."
3949
required: false
@@ -67,7 +77,7 @@ permissions:
6777
packages: read
6878
jobs:
6979
compile_on_AMD:
70-
name: compile_on_AMD (${{ inputs.cxx_compiler }})
80+
name: compile_on_AMD (${{ inputs.cxx_compiler }} C++${{ inputs.cxx_standard}})
7181
outputs:
7282
ais_hipfile_pkg_dev_filename: ${{ steps.pkg-metadata.outputs.AIS_HIPFILE_PKG_DEV_FILENAME }}
7383
ais_hipfile_pkg_filename: ${{ steps.pkg-metadata.outputs.AIS_HIPFILE_PKG_FILENAME }}
@@ -90,7 +100,7 @@ jobs:
90100
# We should expect that there are multiple instances of this job with different cxx_compilers.
91101
# On non-pull_request triggering workflows, AIS_PR_NUMBER may be empty.
92102
run: |
93-
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER:=${GITHUB_RUN_ID}}_${GITHUB_JOB}_${AIS_INPUT_PLATFORM}_${AIS_INPUT_ROCM_VERSION}_${AIS_SAFE_COMPILER_NAME}" >> "${GITHUB_ENV}"
103+
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER:=${GITHUB_RUN_ID}}_${GITHUB_JOB}_${AIS_INPUT_PLATFORM}_${AIS_INPUT_ROCM_VERSION}_${AIS_SAFE_COMPILER_NAME}_${AIS_INPUT_CXX_STANDARD}" >> "${GITHUB_ENV}"
94104
- name: Fetching code repository...
95105
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
96106
with:
@@ -142,6 +152,7 @@ jobs:
142152
cmake \
143153
-DCMAKE_BUILD_TYPE=Debug \
144154
-DCMAKE_CXX_COMPILER="${_AIS_INPUT_CXX_COMPILER}" \
155+
-DAIS_CXX_STANDARD="${{ env.AIS_INPUT_CXX_STANDARD }}" \
145156
-DCMAKE_CXX_FLAGS="-Werror" \
146157
-DCMAKE_HIP_ARCHITECTURES="${{ env.AIS_HIP_ARCHITECTURES }}" \
147158
-DCMAKE_HIP_PLATFORM=amd \

0 commit comments

Comments
 (0)