Files
rocm-systems/.github/workflows/cpack.yml
T
Jonathan R. Madsen 83f9ed8696 Python 3.11 support + update RedHat CPack (#254)
* Fixes for Python 3.11

* Add python 3.11 to scripts

- also tweak to to{upper,lower} bash functions

* Fix PAPI RPM packaging in RedHat

- fix error from #!/usr/bin/python in papi_hl_output_writer.py
  - requires either python2 or python3 instead of python

* cpack updates

- only generate STGZ for RedHat
- support `--generators` arg in build-release.sh
- support 7z, zip, and other zip generators
- fix build-release.sh with `--mpi`
- support setting CONDA_ROOT

* Support rhel/fedora/centos in omnitrace-install.py

* RedHat status badge

* Fix support for Python 3.11 + tweak ubuntu ci

- Remove installing clang and mpich in Ubuntu CI container
- Fallback on conda-forge for Python 3.11
- Enable entrypoint-rhel.sh for RHEL CI
- Pull latest container by default

* Update ElfUtils and PAPI builds

- quieter build output
- disable-nls for ElfUtils
- use -s flag for make

* Development Guide Docs
2023-03-08 00:19:29 -06:00

285 rader
8.9 KiB
YAML

name: Installer Packaging (CPack)
run-name: cpack
on:
workflow_dispatch:
push:
branches: [main, releases/**]
tags:
- v*
paths-ignore:
- '*.md'
- 'source/docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
jobs:
installers:
if: github.repository == 'AMDResearch/omnitrace'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
# ubuntu 18.04
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "4.5"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "5.0"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "5.1"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "5.2"
# ubuntu 20.04
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "4.5"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.0"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.1"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.2"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.3"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.4"
# ubuntu 22.04
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "5.3"
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "5.4"
# opensuse 15.3
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "0.0"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "4.5"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.0"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.1"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.2"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.3"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.4"
# opensuse 15.4
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "0.0"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.0"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.1"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.2"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.3"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.4"
# RHEL 8.7
- os-distro: "rhel"
os-version: "8.7"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "8.7"
rocm-version: "5.3"
- os-distro: "rhel"
os-version: "8.7"
rocm-version: "5.4"
# RHEL 9.0
- os-distro: "rhel"
os-version: "9.0"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "9.0"
rocm-version: "5.3"
- os-distro: "rhel"
os-version: "9.0"
rocm-version: "5.4"
# RHEL 9.1
- os-distro: "rhel"
os-version: "9.1"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "9.1"
rocm-version: "5.3"
- os-distro: "rhel"
os-version: "9.1"
rocm-version: "5.4"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure ROCm Version
if: ${{ matrix.rocm-version == 0 }}
run: |
echo "CI_SCRIPT_ARGS=--core +python" >> $GITHUB_ENV
- name: Configure ROCm Version
if: ${{ matrix.rocm-version > 0 }}
run: |
echo "CI_SCRIPT_ARGS=--rocm +python" >> $GITHUB_ENV
- name: Configure Ubuntu Generators
if: ${{ matrix.os-distro == 'ubuntu' }}
run: |
echo "CI_GENERATOR_ARGS=--generators STGZ DEB" >> $GITHUB_ENV
- name: Configure OpenSUSE Generators
if: ${{ matrix.os-distro == 'opensuse' }}
run: |
echo "CI_GENERATOR_ARGS=--generators STGZ RPM" >> $GITHUB_ENV
- name: Configure RedHat Generators
if: ${{ matrix.os-distro == 'rhel' }}
run: |
echo "CI_GENERATOR_ARGS=--generators STGZ" >> $GITHUB_ENV
- name: Build Base Container
timeout-minutes: 30
run: |
pushd docker
./build-docker.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }}
popd
- name: Build Release
timeout-minutes: 150
run: |
pushd docker
./build-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- ${CI_SCRIPT_ARGS} ${CI_GENERATOR_ARGS}
popd
- name: List Files
timeout-minutes: 10
run: |
find build-release -type f | egrep '\.(sh|deb|rpm)$'
- name: STGZ Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v3
with:
name: omnitrace-stgz-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/stgz/*.sh
- name: DEB Artifacts
timeout-minutes: 10
if: ${{ matrix.os-distro == 'ubuntu' }}
uses: actions/upload-artifact@v3
with:
name: omnitrace-deb-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/deb/*.deb
- name: RPM Artifacts
timeout-minutes: 10
if: ${{ matrix.os-distro == 'opensuse' }}
uses: actions/upload-artifact@v3
with:
name: omnitrace-rpm-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/rpm/*.rpm
# before testing remove any artifacts of the build
- name: Remove Build
timeout-minutes: 10
run: |
shopt -s nullglob
for i in $(find build-release -type f | egrep '/(stgz|deb|rpm)/.*\.(sh|deb|rpm)$'); do mv ${i} ./; done
sudo rm -rf build-release
sudo rm -rf /opt/omnitrace
- name: Test STGZ Install
timeout-minutes: 20
run: |
set -v
for i in omnitrace-*.sh
do
./docker/test-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --stgz ${i}
done
- name: Upload STGZ Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
with:
fail_on_unmatched_files: True
files: |
omnitrace-*.sh
- name: Test DEB Install
timeout-minutes: 20
if: ${{ matrix.os-distro == 'ubuntu' }}
run: |
set -v
for i in omnitrace_*.deb
do
./docker/test-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --deb ${i}
done
- name: Upload DEB Release Assets
uses: softprops/action-gh-release@v1
if: matrix.os-distro == 'ubuntu' && startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
with:
fail_on_unmatched_files: True
files: |
omnitrace_*.deb
- name: Test RPM Install
timeout-minutes: 20
if: ${{ matrix.os-distro == 'opensuse' }}
run: |
set -v
for i in omnitrace-*.rpm
do
./docker/test-docker-release.sh --distro opensuse --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --rpm ${i}
done
- name: Upload RPM Release Assets
uses: softprops/action-gh-release@v1
if: matrix.os-distro == 'opensuse' && startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
with:
fail_on_unmatched_files: True
files: |
omnitrace-*.rpm