From edbaed38c70d8111af60a5d79aa5046f8f7775e8 Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Tue, 24 Sep 2024 16:54:46 -0500 Subject: [PATCH] Generate STGZ Packages on dispatch (#1093) --- .github/workflows/generate_afar.yml | 81 +++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/generate_afar.yml diff --git a/.github/workflows/generate_afar.yml b/.github/workflows/generate_afar.yml new file mode 100644 index 0000000000..b249117cbc --- /dev/null +++ b/.github/workflows/generate_afar.yml @@ -0,0 +1,81 @@ +name: Generate AFAR + +on: + workflow_dispatch: + inputs: + rocm-release: + description: 'ROCm Release Version' + required: true + type: string + build-number: + description: 'ROCm CI Build Number' + required: true + type: string + build-job-name: + description: 'ROCm CI Build Job Name' + required: true + type: string + aqlprofile-change: + description: 'If AQLProfile Needs to be changed' + required: false + type: boolean + aqlprofile-revision: + description: 'AQLProfile Commit Hash' + required: false + type: string + rocprofiler-sdk-revision: + description: 'ROCProfiler-SDK Commit Hash' + required: true + type: string + +jobs: + generate-packages: + runs-on: gpuless-runner-set + + steps: + + - uses: actions/checkout@v4 + if: ${{ inputs.aqlprofile-change }} + with: + ref: '${{ inputs.aqlprofile-revision }}' + path: 'aqlprofile' + + - uses: actions/checkout@v4 + with: + ref: '${{ inputs.rocprofiler-sdk-revision }}' + path: 'rocprofiler-sdk' + + - name: Install Requirements + timeout-minutes: 10 + shell: bash + run: | + git config --global --add safe.directory '${{github.workspace}}/*' + apt-get update + amdgpu-repo --rocm-build=${{ inputs.build-job-name }}/${{ inputs.build-number }} + apt-get upgrade -y + apt-get install -y build-essential cmake rocm-llvm-dev python3-pip libdw-dev + python3 -m pip install -r ${{github.workspace}}/rocprofiler-sdk/requirements.txt + + - name: Building AQLProfile Packages + if: ${{ inputs.aqlprofile-change }} + shell: bash + run: | + cmake -B build-aqlprofile -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_GENERATOR="STGZ" ${{github.workspace}}/aqlprofile + cmake --build build-aqlprofile --parallel 16 + cmake --build build-aqlprofile --target install --parallel 16 + cmake --build build-aqlprofile --target package --parallel 16 + + - name: Building ROCProfiler-SDK Packages + shell: bash + run: | + cmake -B build-rocprofiler-sdk -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCPACK_GENERATOR="STGZ" -DROCPROFILER_BUILD_{TESTS,SAMPLES}=ON ${{github.workspace}}/rocprofiler-sdk + cmake --build build-rocprofiler-sdk --parallel 16 + cmake --build build-rocprofiler-sdk --target package --parallel 16 + + - name: Archive Packages + uses: actions/upload-artifact@v4 + with: + name: Packages-${{ inputs.rocm-release }} + path: | + ${{github.workspace}}/build-*/*.sh +