Skip to content

chore(deps): bump the github-actions group across 1 directory with 23 updates #658

chore(deps): bump the github-actions group across 1 directory with 23 updates

chore(deps): bump the github-actions group across 1 directory with 23 updates #658

name: rocprofiler-register Continuous Integration
on:
push:
branches:
- develop
paths:
- 'projects/rocprofiler-register/**'
- '.github/workflows/rocprofiler-register-continuous-integration.yml'
- '!**/*.md'
- '!**/*.rtf'
- '!**/*.rst'
- '!**/.markdownlint-ci2.yaml'
- '!**/.readthedocs.yaml'
- '!**/.spellcheck.local.yaml'
- '!**/.wordlist.txt'
- '.github/actions/rocprofiler-sdk-util/resolve-ci-config/**'
pull_request:
paths:
- 'projects/rocprofiler-register/**'
- '.github/workflows/rocprofiler-register-continuous-integration.yml'
- '!**/*.md'
- '!**/*.rtf'
- '!**/*.rst'
- '!**/.markdownlint-ci2.yaml'
- '!**/.readthedocs.yaml'
- '!**/.spellcheck.local.yaml'
- '!**/.wordlist.txt'
- '.github/actions/rocprofiler-sdk-util/resolve-ci-config/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci_config:
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
name: Load CI config
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
gfx94x_runner: ${{ steps.runner.outputs.gfx94x_runner }}
gfx94x_sandbox_runner: ${{ steps.runner.outputs.gfx94x_sandbox_runner }}
steps:
- name: Checkout workflow actions
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: .github/actions/rocprofiler-sdk-util/resolve-ci-config
set-safe-directory: true
- name: Resolve runner labels
id: runner
uses: ./.github/actions/rocprofiler-sdk-util/resolve-ci-config
ci:
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
needs: ci_config
strategy:
fail-fast: false
matrix:
compiler: ['clang-14', 'clang-15', 'gcc-11', 'gcc-12']
ci-args: ['']
ci-tag: ['']
runner_type: ['gfx94x']
include:
- compiler: 'gcc-12'
ci-args: '--coverage'
ci-tag: '-codecov'
runner_type: 'gfx94x'
- compiler: 'clang-15'
ci-args: '--linter clang-tidy'
ci-tag: '-clang-tidy'
runner_type: 'gfx94x'
- compiler: 'clang-13'
ci-args: ''
ci-tag: ''
runner_type: 'gfx94x'
- compiler: 'gcc-12'
ci-args: '--memcheck ThreadSanitizer'
ci-tag: '-thread-sanitizer'
# DO NOT UPDATE: sanitizer builds and tests cause issue on prod machines
runner_type: 'sandbox'
- compiler: 'gcc-12'
ci-args: '--memcheck AddressSanitizer'
ci-tag: '-address-sanitizer'
# DO NOT UPDATE: sanitizer builds and tests cause issue on prod machines
runner_type: 'sandbox'
- compiler: 'gcc-12'
ci-args: '--memcheck LeakSanitizer'
ci-tag: '-leak-sanitizer'
# DO NOT UPDATE: sanitizer builds and tests cause issue on prod machines
runner_type: 'sandbox'
# - compiler: 'gcc-12'
# ci-args: '--memcheck UndefinedBehaviorSanitizer'
# ci-tag: '-undefined-behavior-sanitizer'
# runner_type: 'sandbox'
runs-on: ${{ matrix.runner_type == 'sandbox' && needs.ci_config.outputs.gfx94x_sandbox_runner || needs.ci_config.outputs.gfx94x_runner }}
container:
image: docker.io/rocm/rocprofiler-private:ubuntu-22.04-gfx94X-latest
credentials:
username: ${{ secrets.ROCPROFILER_AZURE_CI_USER }}
password: ${{ secrets.ROCPROFILER_AZURE_CI_PASS }}
options: --privileged --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
env:
BUILD_TYPE: RelWithDebInfo
INSTALL_PREFIX: /opt/rocprofiler-register
PACKAGING_INSTALL_PREFIX: /opt/rocm
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
PATH: /usr/bin:$PATH
SUBMODULE_PATHS: "projects/rocprofiler-register"
steps:
- name: Setup Git
shell: bash
run: |
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:git-core/ppa
apt update
apt install -y git
- uses: actions/checkout@v7
with:
sparse-checkout: projects/rocprofiler-register
submodules: false
set-safe-directory: true
- name: Init/Update submodules
run: |
git config --global --add safe.directory '*'
git submodule update --init --recursive --jobs 16 -- ${SUBMODULE_PATHS}
- name: Install Packages
timeout-minutes: 25
run: |
cd projects/rocprofiler-register
CC=${{ matrix.compiler }} &&
CXX=$(echo ${{ matrix.compiler }} | sed 's/clang-/clang++-/1' | sed 's/gcc-/g++-/1') &&
apt-get update &&
apt-get install -y build-essential python3 python3-venv environment-modules ${{ matrix.compiler }} ${CXX} &&
update-alternatives --install /usr/bin/cc cc /usr/bin/${CC} 100 &&
update-alternatives --install /usr/bin/c++ c++ /usr/bin/${CXX} 100 &&
python3 -m venv "${RUNNER_TEMP}/rocprofiler-register-venv" &&
"${RUNNER_TEMP}/rocprofiler-register-venv/bin/python" -m pip install --upgrade pip &&
"${RUNNER_TEMP}/rocprofiler-register-venv/bin/python" -m pip install -r requirements.txt &&
echo "${RUNNER_TEMP}/rocprofiler-register-venv/bin" >> "${GITHUB_PATH}"
- name: Setup GCov
timeout-minutes: 25
if: ${{ matrix.compiler == 'gcc-12' }}
run: |
cd projects/rocprofiler-register
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 100
- name: Setup Clang-Tidy
timeout-minutes: 25
if: ${{ matrix.compiler == 'clang-15' }}
run: |
cd projects/rocprofiler-register
apt-get install -y clang-tidy-15
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100
- name: Configure, Build, and Test
timeout-minutes: 115
shell: bash
working-directory: projects/rocprofiler-register
run:
python3 ./scripts/run-ci.py -B build
--name ${{ github.repository_owner }}-${{ github.ref_name }}-azure-mi300x-${{ matrix.compiler }}${{ matrix.ci-tag }}
--build-jobs 2
--site GitHub
${{ matrix.ci-args }}
--disable-cdash
--
-DCMAKE_C_COMPILER=/usr/bin/cc
-DCMAKE_CXX_COMPILER=/usr/bin/c++
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PREFIX }}
-DROCPROFILER_REGISTER_BUILD_TESTS=ON
-DROCPROFILER_REGISTER_BUILD_SAMPLES=ON
--
-VV
- name: Install
timeout-minutes: 10
working-directory: projects/rocprofiler-register
run:
cmake --build build --target install --parallel 2
- name: CPack and Install
working-directory: projects/rocprofiler-register
run: |
cd build
cpack -G STGZ
rm -rf ${{ env.PACKAGING_INSTALL_PREFIX }}/lib/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/lib/cmake/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/share/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/libexec/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/include/rocprofiler-register
mkdir -p ${{ env.PACKAGING_INSTALL_PREFIX }}
./rocprofiler-register-*-Linux.sh --prefix=${{ env.PACKAGING_INSTALL_PREFIX }} --exclude-subdir --skip-license
ls -lah ${{ env.PACKAGING_INSTALL_PREFIX }}/lib
- name: Test Installed Packages
if: ${{ contains(matrix.compiler, 'clang-15') }}
timeout-minutes: 10
shell: bash
run: |
cd projects/rocprofiler-register
CMAKE_PREFIX_PATH=/opt/rocm cmake -B build-tests-deb
cmake --build build-tests-deb --target all --parallel 16
export PATH=${{ env.PACKAGING_INSTALL_PREFIX }}/bin:$PATH
export LD_LIBRARY_PATH=${{ env.PACKAGING_INSTALL_PREFIX }}/lib:$LD_LIBRARY_PATH
ctest --test-dir build-tests-deb --output-on-failure
- name: Test Install Modulefile
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module use ${{ env.INSTALL_PREFIX }}/share/modulefiles
module avail
module load rocprofiler-register
pushd tests
BUILD_DIR=${PWD}/build-rocp-reg-modulefile
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}
- name: Test Install Setup Env
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source ${{ env.INSTALL_PREFIX }}/share/rocprofiler-register/setup-env.sh
pushd samples/library-implementation
BUILD_DIR=${PWD}/build-rocp-reg-setup-env
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}
- name: Test Install CPack Modulefile
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module use ${{ env.PACKAGING_INSTALL_PREFIX }}/share/modulefiles
module avail
module load rocprofiler-register
pushd tests
BUILD_DIR=${PWD}/build-rocp-reg-modulefile-cpack
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}
- name: Test Install CPack Setup Env
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source ${{ env.PACKAGING_INSTALL_PREFIX }}/share/rocprofiler-register/setup-env.sh
pushd samples/library-implementation
BUILD_DIR=${PWD}/build-rocp-reg-setup-env-cpack
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}