diff --git a/.github/workflows/aqlprofile-continuous_integration.yml b/.github/workflows/aqlprofile-continuous_integration.yml index ca6e9de165..fe7c8ddde9 100644 --- a/.github/workflows/aqlprofile-continuous_integration.yml +++ b/.github/workflows/aqlprofile-continuous_integration.yml @@ -50,7 +50,6 @@ jobs: build-type: ['RelWithDebInfo'] runs-on: rocprofiler-${{ matrix.runner }} - if: github.event.pull_request.head.repo.full_name == 'AMD-ROCm-Internal/aqlprofile' permissions: contents: read @@ -59,19 +58,17 @@ jobs: # define this for containers env: GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 - CORE_EXT_RUNNER: mi300a steps: - uses: actions/checkout@v4 with: sparse-checkout: projects/aqlprofile - + set-safe-directory: true - name: Install requirements timeout-minutes: 10 shell: bash run: | - cd projects/aqlprofile git config --global --add safe.directory '*' apt-get update apt-get install -y build-essential cmake g++-11 g++-12 python3-pip libgtest-dev libgmock-dev @@ -81,7 +78,6 @@ jobs: - name: List Files shell: bash run: | - cd projects/aqlprofile echo "PATH: ${PATH}" echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" which-realpath() { echo -e "\n$1 resolves to $(realpath $(which $1))"; echo "$($(which $1) --version &> /dev/stdout | head -n 1)"; } @@ -93,24 +89,22 @@ jobs: - name: Configure, Build, and Test timeout-minutes: 30 shell: bash - working-directory: projects/aqlprofile run: - LD_LIBRARY_PATH=$(pwd)/build:$LD_LIBRARY_PATH ctest --output-on-failure -V -DCTEST_SOURCE_DIRECTORY="$(pwd)" + LD_LIBRARY_PATH=$(pwd)/build:$LD_LIBRARY_PATH /usr/bin/ctest --output-on-failure -VV -DCTEST_SOURCE_DIRECTORY="$(pwd)" -DCTEST_BINARY_DIRECTORY="$(pwd)/build" -DAQLPROFILE_BUILD_NUM_JOBS="16" -DCTEST_SITE="${RUNNER_HOSTNAME}" -DCTEST_BUILD_NAME=PR_${{ github.ref_name }}_${{ github.repository }}-${{ matrix.os }}-${{ matrix.runner }}-core -DCMAKE_CTEST_ARGUMENTS="" -DAQLPROFILE_BUILD_TESTS=ON -DAQLPROFILE_EXTRA_CONFIGURE_ARGS="" - -S ./dashboard.cmake + -S $(pwd)/projects/aqlprofile/dashboard.cmake core-rpm: - if: github.ref != 'refs/heads/amd-npi' && github.event.pull_request.head.repo.full_name == 'AMD-ROCm-Internal/aqlprofile' # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix strategy: fail-fast: false matrix: runner: ['mi300'] - os: ['rhel', 'sles'] + os: ['rhel-8', 'sles-15'] build-type: ['RelWithDebInfo'] ci-flags: ['--linter clang-tidy'] @@ -123,24 +117,21 @@ jobs: # define this for containers env: GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 - CORE_EXT_RUNNER: mi300 steps: - uses: actions/checkout@v4 with: sparse-checkout: projects/aqlprofile + set-safe-directory: true - name: Install requirements timeout-minutes: 10 shell: bash - run: | - cd projects/aqlprofile - git config --global --add safe.directory '*' + run: git config --global --add safe.directory '*' - name: List Files shell: bash run: | - cd projects/aqlprofile echo "PATH: ${PATH}" echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" which-realpath() { echo -e "\n$1 resolves to $(realpath $(which $1))"; echo "$($(which $1) --version &> /dev/stdout | head -n 1)"; } @@ -152,12 +143,11 @@ jobs: - name: Configure, Build, and Test timeout-minutes: 30 shell: bash - working-directory: projects/aqlprofile run: - LD_LIBRARY_PATH=$(pwd)/build:$LD_LIBRARY_PATH ctest --output-on-failure -V -DCTEST_SOURCE_DIRECTORY="$(pwd)" + LD_LIBRARY_PATH=$(pwd)/build:$LD_LIBRARY_PATH ctest --output-on-failure -VV -DCTEST_SOURCE_DIRECTORY="$(pwd)" -DCTEST_BINARY_DIRECTORY="$(pwd)/build" -DAQLPROFILE_BUILD_NUM_JOBS="16" -DCTEST_SITE="${RUNNER_HOSTNAME}" -DCTEST_BUILD_NAME=PR_${{ github.ref_name }}_${{ github.repository }}-${{ matrix.os }}-${{ matrix.runner }}-core -DCMAKE_CTEST_ARGUMENTS="" -DAQLPROFILE_BUILD_TESTS=ON -DAQLPROFILE_EXTRA_CONFIGURE_ARGS="" - -S ./dashboard.cmake + -S $(pwd)/projects/aqlprofile/dashboard.cmake diff --git a/.github/workflows/rocprofiler-sdk-code_coverage.yml b/.github/workflows/rocprofiler-sdk-code_coverage.yml index 5ffb8cc9b3..288db2798d 100644 --- a/.github/workflows/rocprofiler-sdk-code_coverage.yml +++ b/.github/workflows/rocprofiler-sdk-code_coverage.yml @@ -140,8 +140,9 @@ jobs: - name: Configure, Build, and Test (Total Code Coverage) timeout-minutes: 30 shell: bash + working-directory: projects/rocprofiler-sdk run: - python3 projects/rocprofiler-sdk/source/scripts/run-ci.py -B build + python3 ./source/scripts/run-ci.py -B build --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov --build-jobs 16 --site ${RUNNER_HOSTNAME} @@ -159,9 +160,10 @@ jobs: - name: Configure, Build, and Test (Tests Code Coverage) timeout-minutes: 30 shell: bash + working-directory: projects/rocprofiler-sdk run: find build -type f | egrep '\.gcda$' | xargs rm && - python3 projects/rocprofiler-sdk/source/scripts/run-ci.py -B build + python3 ./source/scripts/run-ci.py -B build --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov-tests --build-jobs 16 --site ${RUNNER_HOSTNAME} @@ -178,10 +180,11 @@ jobs: - name: Configure, Build, and Test (Samples Code Coverage) timeout-minutes: 30 + working-directory: projects/rocprofiler-sdk shell: bash run: find build -type f | egrep '\.gcda$' | xargs rm && - python3 projects/rocprofiler-sdk/source/scripts/run-ci.py -B build + python3 ./source/scripts/run-ci.py -B build --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov-samples --build-jobs 16 --site ${RUNNER_HOSTNAME} @@ -202,15 +205,15 @@ jobs: with: key: ${{ github.sha }}-codecov path: | - .codecov/*.xml + projects/rocprofiler-sdk/.codecov/*.xml - id: generatereport name: Generate Code Coverage Comment if: github.event_name == 'pull_request' timeout-minutes: 5 + working-directory: projects/rocprofiler-sdk shell: bash run: | - cd projects/rocprofiler-sdk echo "PWD: ${PWD}" ls -la @@ -221,7 +224,7 @@ jobs: which -a git git --version - ./source/scripts/upload-image-to-github.py --bot --token ${{ secrets.TOKEN }} --files .codecov/{all,tests,samples}.png --output-dir .codecov --name pr-${{ github.event.pull_request.number }} + ./source/scripts/upload-image-to-github.py --bot --token ${{ secrets.ROCPROFILER_TOKEN }} --files .codecov/{all,tests,samples}.png --output-dir .codecov --name pr-${{ github.event.pull_request.number }} echo -e "\n${PWD}:" ls -la . @@ -263,7 +266,7 @@ jobs: ${{ steps.generatereport.outputs.CODECOVERAGE_REPORT }} with: - github-token: ${{ secrets.TOKEN }} + github-token: ${{ secrets.ROCPROFILER_TOKEN }} script: | const commentIdentifier = ''; // Used to identify codecov comment const commentBody = process.env.COMMENT_BODY; @@ -304,7 +307,7 @@ jobs: with: name: code-coverage-details path: | - ${{github.workspace}}/.codecov/* + ${{github.workspace}}/projects/rocprofiler-sdk/.codecov/* - name: Verify Test Labels timeout-minutes: 5 diff --git a/.github/workflows/rocprofiler-sdk-continuous_integration.yml b/.github/workflows/rocprofiler-sdk-continuous_integration.yml index 0c1e6a6fc7..be5210d12a 100644 --- a/.github/workflows/rocprofiler-sdk-continuous_integration.yml +++ b/.github/workflows/rocprofiler-sdk-continuous_integration.yml @@ -3,6 +3,8 @@ name: rocprofiler-sdk Continuous Integration on: workflow_dispatch: push: + branches: + - develop paths: - 'projects/rocprofiler-sdk/**' - '!projects/rocprofiler-sdk/*.md' @@ -198,7 +200,7 @@ jobs: fail-fast: false matrix: runner: ['mi300'] - os: ['rhel', 'sles'] + os: ['rhel-8', 'sles-15'] build-type: ['RelWithDebInfo'] ci-flags: [''] @@ -301,7 +303,7 @@ jobs: timeout-minutes: 10 shell: bash working-directory: projects/rocprofiler-sdk - run: + run: | git config --global --add safe.directory '*' apt-get update apt-get install -y build-essential cmake python3-pip libasan8 libtsan2 software-properties-common clang-15 libdw-dev libsqlite3-dev @@ -326,8 +328,7 @@ jobs: if: ${{ contains(matrix.runner, 'mi200') || contains(matrix.runner, 'mi300a') }} shell: bash working-directory: projects/rocprofiler-sdk - run: - echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV + run: echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV - name: Configure, Build, and Test timeout-minutes: 45 diff --git a/projects/aqlprofile/dashboard.cmake b/projects/aqlprofile/dashboard.cmake index 05716f1de4..d04f05d0f4 100644 --- a/projects/aqlprofile/dashboard.cmake +++ b/projects/aqlprofile/dashboard.cmake @@ -2,7 +2,7 @@ macro(dashboard_submit) ctest_submit() endmacro() -set(CTEST_PROJECT_NAME "aqlprofile-emu") +set(CTEST_PROJECT_NAME "aqlprofile") set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "cdash.rocprofiler.amd.com") @@ -42,7 +42,7 @@ if(NOT DEFINED AQLPROFILE_BUILD_NUM_JOBS) set(AQLPROFILE_BUILD_NUM_JOBS "16") endif() -set(CTEST_CONFIGURE_COMMAND "cmake -B ${CTEST_BINARY_DIRECTORY} -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DCMAKE_PREFIX_PATH=/opt/rocm -DAQLPROFILE_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm -DCPACK_GENERATOR='DEB;RPM;STGZ' -DGPU_TARGETS='gfx906,gfx90a,gfx942,gfx1101,gfx1201' ${AQLPROFILE_EXTRA_CONFIGURE_ARGS} ${CTEST_SOURCE_DIRECTORY}") +set(CTEST_CONFIGURE_COMMAND "cmake -B ${CTEST_BINARY_DIRECTORY} -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DCMAKE_PREFIX_PATH=/opt/rocm -DAQLPROFILE_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm -DCPACK_GENERATOR='DEB;RPM;STGZ' -DGPU_TARGETS='gfx906,gfx90a,gfx942,gfx1101,gfx1201' ${AQLPROFILE_EXTRA_CONFIGURE_ARGS} ${CTEST_SOURCE_DIRECTORY}/projects/aqlprofile") set(CTEST_BUILD_COMMAND "cmake --build \"${CTEST_BINARY_DIRECTORY}\" -- -j ${AQLPROFILE_BUILD_NUM_JOBS} all mytest") if(NOT DEFINED CTEST_SITE) @@ -61,8 +61,10 @@ macro(handle_error _message _ret) endmacro() ctest_start(Continuous) + ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _update_ret) -handle_error("Configure" _update_ret) +handle_error("Update" _update_ret) + ctest_configure(SOURCE "${CTEST_SOURCE_DIRECTORY}" BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _configure_ret) dashboard_submit(PARTS Start Update Configure RETURN_VALUE _submit_ret) @@ -79,3 +81,8 @@ dashboard_submit(PARTS Test RETURN_VALUE _submit_ret) handle_error("Testing" _test_ret) dashboard_submit(PARTS Done RETURN_VALUE _submit_ret) +if(_submit_ret EQUAL 0) + message(STATUS "Dashboard submission successful.") +else() + message(WARNING "Dashboard submission failed with code ${_submit_ret}.") +endif() diff --git a/projects/rocprofiler-sdk/source/scripts/run-ci.py b/projects/rocprofiler-sdk/source/scripts/run-ci.py index 575dd5f4f4..3c9b78b5b6 100755 --- a/projects/rocprofiler-sdk/source/scripts/run-ci.py +++ b/projects/rocprofiler-sdk/source/scripts/run-ci.py @@ -14,7 +14,7 @@ import multiprocessing # and default value for CTEST_SUBMIT_URL # _PROJECT_NAME = "rocprofiler-v2-internal" # _BASE_URL = "10.194.116.31/cdash" -_PROJECT_NAME = "rocprofiler-sdk-emu" +_PROJECT_NAME = "rocprofiler-sdk" _BASE_URL = "cdash.rocprofiler.amd.com" _GCOVR_GENERATE_CMD = None diff --git a/projects/rocprofiler-sdk/source/scripts/upload-image-to-github.py b/projects/rocprofiler-sdk/source/scripts/upload-image-to-github.py index 0d449a5319..482781fe70 100755 --- a/projects/rocprofiler-sdk/source/scripts/upload-image-to-github.py +++ b/projects/rocprofiler-sdk/source/scripts/upload-image-to-github.py @@ -48,7 +48,7 @@ if __name__ == "__main__": "--repo-url", help="Base GitHub repo URL", type=str, - default="https://github.com/AMD-ROCm-Internal/rocprofiler-sdk-internal", + default="https://github.com/ROCm/rocm-systems", ) parser.add_argument( "-o",