Files
rocm-systems/.github/workflows/continuous_integration.yml
T
Jonathan R. Madsen 8be4ca1a04 Fix rocprofiler installation (#73)
- install rocprofiler library
- define AMD_INTERNAL_BUILD when including hsa/hsa.h
- install include/rocprofiler/registration.h header
- fix samples/pc_sampling cmake via installed rocprofiler
- fix samples/api_callback_tracing cmake via installed rocprofiler
- fix samples/api_buffered_tracing cmake via installed rocprofiler
- set cmake_minimum_required in samples/CMakeLists.txt
- find dependent packages in rocprofiler-config.cmake.in
  - AMDDeviceLibs
  - amd_comgr
  - hsa-runtime64
  - hip
- export rocprofiler-hip and rocprofiler-hsa-runtime libraries
- add Test Install Build step to CI workflow
2023-09-21 10:07:07 -05:00

204 строки
6.5 KiB
YAML

name: Continuous Integration
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths-ignore:
- '.github/workflows/pull_*.yml'
- '.github/workflows/linting.yml'
- '.github/workflows/markdown_lint.yml'
- '*.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- '.github/workflows/pull_*.yml'
- '.github/workflows/linting.yml'
- '.github/workflows/markdown_lint.yml'
- '*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# TODO(jrmadsen): replace LD_RUNPATH_FLAG, GPU_LIST, etc. with internal handling in cmake
ROCM_PATH: "/opt/rocm"
GPU_LIST: "gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102"
PATH: "/usr/bin:$PATH"
jobs:
get_latest_mainline_build_number:
runs-on: mi200
outputs:
LATEST_BUILD_NUMBER: ${{ steps.get_build_number.outputs.LATEST_BUILD_NUMBER }}
steps:
- id: get_build_number
run: echo "LATEST_BUILD_NUMBER=$(wget -qO- 'http://rocm-ci.amd.com/job/compute-rocm-dkms-no-npi-hipclang/lastSuccessfulBuild/buildNumber')" >> $GITHUB_OUTPUT
mi200-ubuntu:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
strategy:
fail-fast: true
max-parallel: 4
matrix:
include:
- os: 'ubuntu-22.04'
runner: 'renderD131'
device: '/renderD131'
build-type: 'RelWithDebInfo'
ci-flags: ''
name-tag: ''
- os: 'ubuntu-22.04'
runner: 'renderD131'
device: '/renderD131'
build-type: 'Release'
ci-flags: '--coverage'
name-tag: '-codecov'
runs-on: ${{ matrix.runner }}
# define this for containers
env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
container:
image: compute-artifactory.amd.com:5000/rocm-plus-docker/compute-rocm-dkms-no-npi-hipclang:${{ needs.get_latest_mainline_build_number.outputs.LATEST_BUILD_NUMBER }}-${{ matrix.os }}-stg1
options: --memory=128g --cpus=32 --ipc=host --device=/dev/kfd --device=/dev/dri${{ matrix.device }} --group-add video --cap-add=SYS_PTRACE --cap-add CAP_SYS_PTRACE --cap-add CAP_SYS_ADMIN --security-opt seccomp=unconfined
if: ${{ always() }}
needs: get_latest_mainline_build_number
steps:
- uses: actions/checkout@v4
- name: List Files
shell: bash
run: |
which-realpath() { echo "$1 resolves to $(realpath $(which $1))"; }
for i in python python3 git cmake ctest; do which-realpath $i; done
ls -la
- name: Install requirements
shell: bash
run: |
pip3 install -r requirements.txt
apt install -y cmake libgtest-dev
git config --global --add safe.directory '*'
- name: Configure, Build, and Test
timeout-minutes: 30
shell: bash
run:
python3 ./source/scripts/run-ci.py -B build
--name ${{ github.repository }}-${{ github.ref_name }}-mi200-${{ matrix.os }}${{ matrix.name-tag }}
--build-jobs 8
--site mi200
--gpu-targets ${{ env.GPU_LIST }}
${{ matrix.ci-flags }}
--
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
-DCMAKE_INSTALL_PREFIX=/opt/rocprofiler/v2
-DCPACK_GENERATOR='DEB;RPM;TGZ'
-DPython3_EXECUTABLE=$(which python3)
- name: Install
timeout-minutes: 10
run:
cmake --build build --target install --parallel 8
- name: Test Install Build
timeout-minutes: 10
shell: bash
run: |
CMAKE_PREFIX_PATH=/opt/rocprofiler/v2 cmake -B build-samples samples
cmake --build build-samples --target all --parallel 8
- name: Build Packaging
timeout-minutes: 10
run:
cmake --build build --target package --parallel 8
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
${{github.workspace}}/build/*.deb
${{github.workspace}}/build/*.rpm
${{github.workspace}}/build/*.tgz
sanitizers:
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-22.04'
runner: 'renderD131'
device: '/renderD131'
build-type: 'RelWithDebInfo'
ci-flags: ''
sanitizer: 'ThreadSanitizer'
- os: 'ubuntu-22.04'
runner: 'renderD131'
device: '/renderD131'
build-type: 'RelWithDebInfo'
ci-flags: ''
sanitizer: 'LeakSanitizer'
- os: 'ubuntu-22.04'
runner: 'renderD131'
device: '/renderD131'
build-type: 'RelWithDebInfo'
ci-flags: ''
sanitizer: 'AddressSanitizer'
runs-on: ${{ matrix.runner }}
# define this for containers
env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
container:
image: compute-artifactory.amd.com:5000/rocm-plus-docker/compute-rocm-dkms-no-npi-hipclang:${{ needs.get_latest_mainline_build_number.outputs.LATEST_BUILD_NUMBER }}-${{ matrix.os }}-stg1
options: --privileged --ipc=host --device=/dev/kfd --device=/dev/dri${{ matrix.device }} --group-add video --cap-add=SYS_PTRACE --cap-add CAP_SYS_PTRACE --cap-add CAP_SYS_ADMIN --security-opt seccomp=unconfined
if: ${{ always() }}
needs: get_latest_mainline_build_number
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: List Files
shell: bash
run: |
which-realpath() { echo "$1 resolves to $(realpath $(which $1))"; }
for i in python python3 git cmake ctest; do which-realpath $i; done
ls -la
- name: Install requirements
shell: bash
run: |
pip3 install -r requirements.txt
apt install -y cmake libgtest-dev libasan8 libtsan2
git config --global --add safe.directory '*'
- name: Configure, Build, and Test
timeout-minutes: 30
shell: bash
run:
python3 ./source/scripts/run-ci.py -B build
--name ${{ github.repository }}-${{ github.ref_name }}-mi200-${{ matrix.sanitizer }}
--build-jobs 8
--site mi200
--gpu-targets ${{ env.GPU_LIST }}
--memcheck=${{ matrix.sanitizer }}
${{ matrix.ci-flags }}
--
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
-DCMAKE_INSTALL_PREFIX="${{ env.ROCM_PATH }}"
-DPython3_EXECUTABLE=$(which python3)