Build Docker and Create Release #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker and Create Release | |
on: | |
workflow_dispatch: | |
inputs: | |
slurm_version: | |
description: 'Slurm version' | |
required: true | |
default: '24.05.2' | |
pmix_version: | |
description: 'Pmix version' | |
required: true | |
default: '5.0.3' | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build Docker image | |
run: docker build --no-cache --build-arg SLURM_VERSION=${{ github.event.inputs.slurm_version }} --build-arg PMIX_VERSION=${{ github.event.inputs.pmix_version }} -t slurm_deb_packages . | |
- name: Create slurm_build_output directory | |
run: mkdir -p slurm_build_output | |
- name: Run Docker container and copy files | |
run: | | |
container_id=$(docker create slurm_deb_packages) | |
docker start $container_id | |
docker cp $container_id:/usr/src/debs/ ./slurm_build_output/ | |
docker cp $container_id:/usr/src/nccl-tests/build/nccl-tests-perf.tar.gz ./slurm_build_output/ | |
docker rm $container_id | |
- name: Create GitHub Release and Upload DEB packages | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.event.inputs.slurm_version }} | |
name: Slurm v${{ github.event.inputs.slurm_version }} | |
body: "Release for Slurm v${{ github.event.inputs.slurm_version }} with OpenPMIx v${{ github.event.inputs.pmix_version }}, libnccl packages and NCCL-test binaries" | |
release_name: Slurm-${{ github.event.inputs.slurm_version }} | |
draft: false | |
prerelease: false | |
files: | | |
slurm_build_output/debs/*.deb | |
slurm_build_output/nccl-tests-perf.tar.gz | |
- name: Cleanup | |
run: rm -rf slurm_build_output |