diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index cfd53c58..86259772 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -14,6 +14,7 @@ env: inputs.platform == 'ubuntu' && 'apt' }} AIS_PKG_TYPE: ${{ inputs.platform == 'ubuntu' && 'DEB' || 'RPM' }} + AIS_ROCM_VERSION: 6.4.2 # Code coverage report only vetted to work for amdclang++ on Ubuntu AIS_USE_CODE_COVERAGE: ${{ inputs.cxx_compiler == 'amdclang++' && inputs.platform == 'ubuntu' }} on: @@ -105,6 +106,7 @@ jobs: run: | docker exec \ -e "_AIS_INPUT_CXX_COMPILER=${AIS_INPUT_CXX_COMPILER}" \ + -e "_AIS_ROCM_VERSION=${AIS_ROCM_VERSION}" \ -t \ -w /ais/hipFile/build \ "${AIS_CONTAINER_NAME}" \ @@ -115,6 +117,7 @@ jobs: -DCMAKE_HIP_PLATFORM=amd \ -DAIS_BUILD_DOCS=ON \ -DAIS_USE_CODE_COVERAGE=${{ env.AIS_USE_CODE_COVERAGE == 'true' && 'ON' || 'OFF' }} \ + -DROCM_PATH="/opt/rocm-${_AIS_ROCM_VERSION}" \ .. ' - name: Build hipFile for the AMD platform (${{ inputs.cxx_compiler }}) diff --git a/.github/workflows/nightly-build-ais.yml b/.github/workflows/nightly-build-ais.yml new file mode 100644 index 00000000..9f1bc46f --- /dev/null +++ b/.github/workflows/nightly-build-ais.yml @@ -0,0 +1,34 @@ +name: AIS_nightly_build +run-name: Create a nightly build of hipFile +on: + workflow_call: + inputs: + platform: + required: true + type: string + outputs: + ais_hipfile_pkg_dev_filename: + description: "Filename for the hipFile development DEB/RPM package." + value: ${{ jobs.build_hipFile.outputs.ais_hipfile_pkg_dev_filename }} + ais_hipfile_pkg_filename: + description: "Filename for the hipFile runtime DEB/RPM package." + value: ${{ jobs.build_hipFile.outputs.ais_hipfile_pkg_filename }} +permissions: + contents: read + packages: write +jobs: + get_AIS_CI_image: + # This runs on develop so will always use latest. + uses: ./.github/workflows/build-ais-ci-image.yml + with: + dockerfile_changed: false + platform: ${{ inputs.platform }} + build_hipFile: + if: ${{ !cancelled() && needs.get_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }} + needs: [get_AIS_CI_image] + uses: ./.github/workflows/build-ais.yml + with: + ci_image: ${{ needs.get_AIS_CI_image.outputs.ci_image }} + cxx_compiler: amdclang++ + platform: ${{ inputs.platform }} + upload_artifacts: true diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml new file mode 100644 index 00000000..46a188ba --- /dev/null +++ b/.github/workflows/nightly-release.yml @@ -0,0 +1,76 @@ +name: nightly-release +run-name: Create a nightly release of hipFile + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: +permissions: + contents: read + packages: write +jobs: + # We can use a matrix job if we don't need to reference the outputs + # of each individual job within the matrix. + # This relies on using a glob pattern to reference the build artifacts. + build_nightly_hipFile: + strategy: + fail-fast: false + matrix: + platform: + - rocky + - suse + - ubuntu + uses: ./.github/workflows/nightly-build-ais.yml + with: + platform: ${{ matrix.platform }} + publish_release: + needs: [build_nightly_hipFile] + runs-on: [ubuntu-24.04] + permissions: + contents: write + steps: + - name: Fetch hipFile Repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 + - name: Download hipFile packages + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 + with: + merge-multiple: true + # Currently only vetted for ubuntu, suse, and rocky. + # Best effort to only match runtime and development packages while + # avoiding any extras/testing packages. + pattern: hipfile{[-_][0-9],-dev_[0-9],-devel-[0-9]}*.{deb,rpm} + - name: List Releases + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release list + - name: Test if 'nightly' already exists. + id: nightly-exists + continue-on-error: true + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release view nightly + - name: Delete 'nightly' if it already exists. + if: ${{ steps.nightly-exists.outcome == 'success' }} + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release delete nightly --yes + - name: Create a release + env: + GH_TOKEN: ${{ github.token }} + run: | + shopt -s nullglob + gh release create \ + --notes " + Nightly Build as of: $(date) + + The packages contained here are not suitable for production workloads. + These packages are currently tied to the current version of our CI (6.4.2). + " \ + --prerelease \ + --target develop \ + --title Nightly \ + nightly \ + hipfile{[-_][0-9],-dev_[0-9],-devel-[0-9]}*.{deb,rpm}