From 9b800c028b7017072bbe69e5b3b1a34ca391ad3f Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Wed, 29 Jun 2022 11:06:52 -0500 Subject: [PATCH] Use concurrency in GitHub Actions + remove cancelling (#77) * Use concurrency + remove cancelling * Combined ubuntu-focal-external with ubuntu-focal-external-rocm * Update workflow names and README * Update ubuntu-focal name * More tweaks to the name * Change names in formatting workflow --- .github/workflows/cancelling.yml | 20 --- .github/workflows/cpack-opensuse.yml | 4 + .github/workflows/cpack-ubuntu.yml | 4 + .github/workflows/formatting.yml | 12 +- .github/workflows/opensuse.yml | 6 +- .github/workflows/ubuntu-bionic.yml | 6 +- .../workflows/ubuntu-focal-external-rocm.yml | 136 ------------------ .github/workflows/ubuntu-focal-external.yml | 132 ++++++++++++++++- .github/workflows/ubuntu-focal.yml | 6 +- README.md | 8 +- 10 files changed, 165 insertions(+), 169 deletions(-) delete mode 100644 .github/workflows/cancelling.yml delete mode 100644 .github/workflows/ubuntu-focal-external-rocm.yml diff --git a/.github/workflows/cancelling.yml b/.github/workflows/cancelling.yml deleted file mode 100644 index e199170613..0000000000 --- a/.github/workflows/cancelling.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: cancel-builds-on-update -on: - workflow_run: - workflows: ['formatting', 'ubuntu-bionic', 'ubuntu-focal-external-rocm', 'ubuntu-focal-external', 'ubuntu-focal', 'opensuse', 'cpack-ubuntu', 'cpack-opensuse'] - types: ['requested'] - -jobs: - cancel-duplicate-workflow-runs: - name: "Cancel duplicate ${{ github.event.workflow_run.id }} workflow runs" - runs-on: ubuntu-latest - steps: - - uses: potiuk/cancel-workflow-runs@master - name: "Cancel duplicate ${{ github.event.workflow_run.id }} workflow runs" - with: - cancelMode: duplicates - cancelFutureDuplicates: true - token: ${{ secrets.GITHUB_TOKEN }} - sourceRunId: ${{ github.event.workflow_run.id }} - notifyPRCancel: false - skipEventTypes: '["schedule"]' diff --git a/.github/workflows/cpack-opensuse.yml b/.github/workflows/cpack-opensuse.yml index 4288e2a61a..f97f701270 100644 --- a/.github/workflows/cpack-opensuse.yml +++ b/.github/workflows/cpack-opensuse.yml @@ -5,6 +5,10 @@ on: branches: [releases/**] tags: [] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 diff --git a/.github/workflows/cpack-ubuntu.yml b/.github/workflows/cpack-ubuntu.yml index 817876bac1..bb0831f1dc 100644 --- a/.github/workflows/cpack-ubuntu.yml +++ b/.github/workflows/cpack-ubuntu.yml @@ -5,6 +5,10 @@ on: branches: [releases/**] tags: [] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 23a88f6312..e16f796a77 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -1,5 +1,3 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: formatting @@ -9,8 +7,12 @@ on: pull_request: branches: [ main, develop ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - python-formatting: + python: runs-on: ubuntu-20.04 strategy: matrix: @@ -31,7 +33,7 @@ jobs: run: | black --diff --check . - cmake-format: + cmake: runs-on: ubuntu-20.04 steps: @@ -54,7 +56,7 @@ jobs: exit 1 fi - clang-format: + source: runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index 7e309a4df1..38aad17ca9 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -1,4 +1,4 @@ -name: opensuse +name: OpenSUSE 15.2, 15.3 (Python) on: push: @@ -6,6 +6,10 @@ on: pull_request: branches: [ main, develop ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: BUILD_TYPE: Release OMNITRACE_VERBOSE: 1 diff --git a/.github/workflows/ubuntu-bionic.yml b/.github/workflows/ubuntu-bionic.yml index 76c11dfe62..4c69f62f9d 100644 --- a/.github/workflows/ubuntu-bionic.yml +++ b/.github/workflows/ubuntu-bionic.yml @@ -1,4 +1,4 @@ -name: ubuntu-bionic +name: Ubuntu 18.04 (GCC, MPICH, Python) on: push: @@ -6,6 +6,10 @@ on: pull_request: branches: [ main, develop ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: BUILD_TYPE: Release ELFUTILS_DOWNLOAD_VERSION: 0.183 diff --git a/.github/workflows/ubuntu-focal-external-rocm.yml b/.github/workflows/ubuntu-focal-external-rocm.yml deleted file mode 100644 index f82499f073..0000000000 --- a/.github/workflows/ubuntu-focal-external-rocm.yml +++ /dev/null @@ -1,136 +0,0 @@ -name: ubuntu-focal-external-rocm - -on: - push: - branches: [ main, develop ] - pull_request: - branches: [ main, develop ] - -env: - BUILD_TYPE: MinSizeRel - OMNITRACE_VERBOSE: 1 - OMNITRACE_CI: ON - OMNITRACE_OUTPUT_PATH: omnitrace-tests-output - OMNITRACE_OUTPUT_PREFIX: "%argt%/" - -jobs: - ubuntu-focal-external-rocm: - runs-on: ubuntu-20.04 - container: - image: jrmadsen/omnitrace-ci:ubuntu-20.04 - strategy: - matrix: - compiler: ['g++'] - rocm_version: ['4.3', '4.5', 'debian'] - - steps: - - uses: actions/checkout@v2 - - - name: Install Packages - timeout-minutes: 5 - run: - apt-get update && - apt-get install -y software-properties-common wget gnupg2 && - wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - && - echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${{ matrix.rocm_version }}/ ubuntu main" | tee /etc/apt/sources.list.d/rocm.list && - apt-get update && - apt-get install -y build-essential m4 autoconf libtool python3-pip clang libomp-dev ${{ matrix.compiler }} libudev-dev libnuma-dev rocm-dev rocm-utils roctracer-dev rocprofiler-dev hip-base hsa-amd-aqlprofile hsa-rocr-dev hsakmt-roct-dev libpapi-dev libopenmpi-dev curl && - python3 -m pip install --upgrade pip && - python3 -m pip install 'cmake==3.16.3' && - for i in 6 7 8 9; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done - - - name: Configure Env - run: - echo "CC=$(echo '${{ matrix.compiler }}' | sed 's/+/c/g')" >> $GITHUB_ENV && - echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV && - echo "CMAKE_PREFIX_PATH=/opt/dyninst:/opt/elfutils:${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV && - echo "/opt/omnitrace/bin:/opt/dyninst/bin:/opt/elfutils/bin:${HOME}/.local/bin" >> $GITHUB_PATH && - echo "LD_LIBRARY_PATH=/opt/omnitrace/lib:/opt/dyninst/lib:/opt/elfutils/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV - - - name: Configure CMake - timeout-minutes: 10 - run: - git config --global --add safe.directory ${PWD} && - cmake --version && - cmake -B build - -DCMAKE_C_COMPILER=${CC} - -DCMAKE_CXX_COMPILER=${CXX} - -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} - -DCMAKE_INSTALL_PREFIX=/opt/omnitrace - -DOMNITRACE_BUILD_TESTING=OFF - -DOMNITRACE_BUILD_DEVELOPER=ON - -DOMNITRACE_BUILD_EXTRA_OPTIMIZATIONS=OFF - -DOMNITRACE_BUILD_LTO=OFF - -DOMNITRACE_USE_MPI=OFF - -DOMNITRACE_USE_MPI_HEADERS=ON - -DOMNITRACE_USE_HIP=ON - -DOMNITRACE_MAX_THREADS=64 - -DOMNITRACE_USE_SANITIZER=OFF - -DOMNITRACE_USE_PAPI=OFF - -DOMNITRACE_INSTALL_PERFETTO_TOOLS=ON - - - name: Build - timeout-minutes: 45 - run: - cmake --build build --target all --parallel 2 -- VERBOSE=1 - - - name: Install - run: - cmake --build build --target install --parallel 2 - - - name: Test - timeout-minutes: 45 - run: - cd build && - ldd ./omnitrace && - ./omnitrace --help && - ctest -V -N -O omnitrace-ctest-${{ github.job }}-commands.log && - ctest -V --output-log omnitrace-ctest-${{ github.job }}.log --stop-on-failure - - - name: Test Install - timeout-minutes: 10 - run: | - set -v - traced --background - export OMNITRACE_DEBUG=ON - export OMNITRACE_PERFETTO_BACKEND=system - which omnitrace-avail - ldd $(which omnitrace-avail) - omnitrace-avail --help - omnitrace-avail -a - which omnitrace-critical-trace - ldd $(which omnitrace-critical-trace) - which omnitrace - ldd $(which omnitrace) - omnitrace --help - omnitrace -e -v 1 -o ls.inst --simulate -- ls - omnitrace -e -v 1 --simulate -- ls - omnitrace -e -v 1 -o ls.inst -- ls - perfetto --out ls-perfetto-trace.proto --txt -c omnitrace.cfg - ./ls.inst - omnitrace -e -v 1 -- ls - du -m ls-perfetto-trace.proto - - - name: Test User API - timeout-minutes: 10 - run: | - set -v - ./scripts/test-find-package.sh --install-dir /opt/omnitrace - - - name: CTest Artifacts - if: success() || failure() - uses: actions/upload-artifact@v2 - with: - name: ctest-${{ github.job }}-log - path: | - build/*.log - - - name: Data Artifacts - if: success() || failure() - uses: actions/upload-artifact@v2 - with: - name: data-${{ github.job }}-files - path: | - omnitrace-tests-output/**/*.txt - build/omnitrace-tests-output/**/*.txt - build/omnitrace-tests-output/**/*-instr*.json diff --git a/.github/workflows/ubuntu-focal-external.yml b/.github/workflows/ubuntu-focal-external.yml index 89d72a145f..f2ef677068 100644 --- a/.github/workflows/ubuntu-focal-external.yml +++ b/.github/workflows/ubuntu-focal-external.yml @@ -1,4 +1,4 @@ -name: ubuntu-focal-external +name: Ubuntu 20.04 (GCC, Python, ROCm) on: push: @@ -6,6 +6,10 @@ on: pull_request: branches: [ main, develop ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: OMNITRACE_VERBOSE: 1 OMNITRACE_CI: ON @@ -163,3 +167,129 @@ jobs: path: | build/omnitrace-tests-output/**/*.txt build/omnitrace-tests-output/**/*-instr*.json + + ubuntu-focal-external-rocm: + runs-on: ubuntu-20.04 + container: + image: jrmadsen/omnitrace-ci:ubuntu-20.04 + strategy: + matrix: + compiler: ['g++'] + rocm_version: ['4.3', '4.5', 'debian'] + + env: + BUILD_TYPE: MinSizeRel + OMNITRACE_OUTPUT_PATH: omnitrace-tests-output + OMNITRACE_OUTPUT_PREFIX: "%argt%/" + + steps: + - uses: actions/checkout@v2 + + - name: Install Packages + timeout-minutes: 5 + run: + apt-get update && + apt-get install -y software-properties-common wget gnupg2 && + wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - && + echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${{ matrix.rocm_version }}/ ubuntu main" | tee /etc/apt/sources.list.d/rocm.list && + apt-get update && + apt-get install -y build-essential m4 autoconf libtool python3-pip clang libomp-dev ${{ matrix.compiler }} libudev-dev libnuma-dev rocm-dev rocm-utils roctracer-dev rocprofiler-dev hip-base hsa-amd-aqlprofile hsa-rocr-dev hsakmt-roct-dev libpapi-dev libopenmpi-dev curl && + python3 -m pip install --upgrade pip && + python3 -m pip install 'cmake==3.16.3' && + for i in 6 7 8 9; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done + + - name: Configure Env + run: + echo "CC=$(echo '${{ matrix.compiler }}' | sed 's/+/c/g')" >> $GITHUB_ENV && + echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV && + echo "CMAKE_PREFIX_PATH=/opt/dyninst:/opt/elfutils:${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV && + echo "/opt/omnitrace/bin:/opt/dyninst/bin:/opt/elfutils/bin:${HOME}/.local/bin" >> $GITHUB_PATH && + echo "LD_LIBRARY_PATH=/opt/omnitrace/lib:/opt/dyninst/lib:/opt/elfutils/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - name: Configure CMake + timeout-minutes: 10 + run: + git config --global --add safe.directory ${PWD} && + cmake --version && + cmake -B build + -DCMAKE_C_COMPILER=${CC} + -DCMAKE_CXX_COMPILER=${CXX} + -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} + -DCMAKE_INSTALL_PREFIX=/opt/omnitrace + -DOMNITRACE_BUILD_TESTING=OFF + -DOMNITRACE_BUILD_DEVELOPER=ON + -DOMNITRACE_BUILD_EXTRA_OPTIMIZATIONS=OFF + -DOMNITRACE_BUILD_LTO=OFF + -DOMNITRACE_USE_MPI=OFF + -DOMNITRACE_USE_MPI_HEADERS=ON + -DOMNITRACE_USE_HIP=ON + -DOMNITRACE_MAX_THREADS=64 + -DOMNITRACE_USE_SANITIZER=OFF + -DOMNITRACE_USE_PAPI=OFF + -DOMNITRACE_INSTALL_PERFETTO_TOOLS=ON + + - name: Build + timeout-minutes: 45 + run: + cmake --build build --target all --parallel 2 -- VERBOSE=1 + + - name: Install + run: + cmake --build build --target install --parallel 2 + + - name: Test + timeout-minutes: 45 + run: + cd build && + ldd ./omnitrace && + ./omnitrace --help && + ctest -V -N -O omnitrace-ctest-${{ github.job }}-commands.log && + ctest -V --output-log omnitrace-ctest-${{ github.job }}.log --stop-on-failure + + - name: Test Install + timeout-minutes: 10 + run: | + set -v + traced --background + export OMNITRACE_DEBUG=ON + export OMNITRACE_PERFETTO_BACKEND=system + which omnitrace-avail + ldd $(which omnitrace-avail) + omnitrace-avail --help + omnitrace-avail -a + which omnitrace-critical-trace + ldd $(which omnitrace-critical-trace) + which omnitrace + ldd $(which omnitrace) + omnitrace --help + omnitrace -e -v 1 -o ls.inst --simulate -- ls + omnitrace -e -v 1 --simulate -- ls + omnitrace -e -v 1 -o ls.inst -- ls + perfetto --out ls-perfetto-trace.proto --txt -c omnitrace.cfg + ./ls.inst + omnitrace -e -v 1 -- ls + du -m ls-perfetto-trace.proto + + - name: Test User API + timeout-minutes: 10 + run: | + set -v + ./scripts/test-find-package.sh --install-dir /opt/omnitrace + + - name: CTest Artifacts + if: success() || failure() + uses: actions/upload-artifact@v2 + with: + name: ctest-${{ github.job }}-log + path: | + build/*.log + + - name: Data Artifacts + if: success() || failure() + uses: actions/upload-artifact@v2 + with: + name: data-${{ github.job }}-files + path: | + omnitrace-tests-output/**/*.txt + build/omnitrace-tests-output/**/*.txt + build/omnitrace-tests-output/**/*-instr*.json diff --git a/.github/workflows/ubuntu-focal.yml b/.github/workflows/ubuntu-focal.yml index aaeb7467d8..2c98ea21ab 100644 --- a/.github/workflows/ubuntu-focal.yml +++ b/.github/workflows/ubuntu-focal.yml @@ -1,4 +1,4 @@ -name: ubuntu-focal +name: Ubuntu 20.04 (GCC, MPICH, OpenMPI) on: push: @@ -6,6 +6,10 @@ on: pull_request: branches: [ main, develop ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: ELFUTILS_DOWNLOAD_VERSION: 0.186 OMNITRACE_VERBOSE: 1 diff --git a/README.md b/README.md index db1b9b7263..150f36bf11 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Omnitrace: Application Profiling, Tracing, and Analysis -[![Ubuntu 18.04 (GCC 7, 8, MPICH)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-bionic.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-bionic.yml) -[![Ubuntu 20.04 (GCC 7, 8, 9, 10)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal-external.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal-external.yml) -[![Ubuntu 20.04 (GCC 9, MPICH, OpenMPI)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal.yml) -[![Ubuntu 20.04 (GCC 9, MPICH, OpenMPI, ROCm 4.3, 4.5, 5.0)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal-external-rocm.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal-external-rocm.yml) +[![Ubuntu 18.04 with GCC and MPICH](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-bionic.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-bionic.yml) +[![Ubuntu 20.04 with GCC and ROCm](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal-external.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal-external.yml) +[![Ubuntu 20.04 with GCC and MPI](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/ubuntu-focal.yml) +[![OpenSUSE 15.x with GCC](https://github.com/AMDResearch/omnitrace/actions/workflows/opensuse.yml/badge.svg)](https://github.com/AMDResearch/omnitrace/actions/workflows/opensuse.yml) > ***[Omnitrace](https://github.com/AMDResearch/omnitrace) is an AMD open source research project and is not supported as part of the ROCm software stack.***