-
Notifications
You must be signed in to change notification settings - Fork 6
ci: move fio steps into separate job #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
c1a403d
1ba8f49
63cfd65
ebd9df7
5af116e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,6 +8,15 @@ env: | |||||||||||||||||||||||||||||||||
| AIS_INPUT_PLATFORM: ${{ inputs.platform }} | ||||||||||||||||||||||||||||||||||
| AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }} | ||||||||||||||||||||||||||||||||||
| AIS_MOUNT_PATH: /mnt/ais/ext4 | ||||||||||||||||||||||||||||||||||
| AIS_PKG_INSTALL_CMD: >- | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| case( | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'rocky', 'dnf install -y', | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'suse', 'zypper install -y --allow-unsigned-rpm', | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'ubuntu', 'apt update; apt install -y', | ||||||||||||||||||||||||||||||||||
| '' | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
| AIS_PKG_MGR: >- | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'rocky' && 'dnf' || | ||||||||||||||||||||||||||||||||||
|
|
@@ -49,12 +58,6 @@ jobs: | |||||||||||||||||||||||||||||||||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| path: hipFile | ||||||||||||||||||||||||||||||||||
| - name: Fetching fio repository... | ||||||||||||||||||||||||||||||||||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| repository: ROCm/fio | ||||||||||||||||||||||||||||||||||
| ref: hipFile | ||||||||||||||||||||||||||||||||||
| path: fio | ||||||||||||||||||||||||||||||||||
| - name: Download hipFile runtime package | ||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
|
|
@@ -101,7 +104,6 @@ jobs: | |||||||||||||||||||||||||||||||||
| /bin/bash -c ' | ||||||||||||||||||||||||||||||||||
| cp -R /mnt/ais /ais | ||||||||||||||||||||||||||||||||||
| mkdir /ais/hipFile/build | ||||||||||||||||||||||||||||||||||
| mkdir /ais/fio/build | ||||||||||||||||||||||||||||||||||
| ' | ||||||||||||||||||||||||||||||||||
| - name: Copy the hipFile packages into the container | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
|
|
@@ -182,29 +184,184 @@ jobs: | |||||||||||||||||||||||||||||||||
| /ais/hipFile/util/ci-aiscp-test.sh \ | ||||||||||||||||||||||||||||||||||
| /ais/hipFile/build/examples/aiscp/aiscp | ||||||||||||||||||||||||||||||||||
| ' | ||||||||||||||||||||||||||||||||||
| - name: Configure fio | ||||||||||||||||||||||||||||||||||
| - name: Destroy hipfile IO test directory | ||||||||||||||||||||||||||||||||||
| if: ${{ always() }} | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker exec -t "${AIS_CONTAINER_NAME}" /bin/bash -c "rm -fr /mnt/ais-fs/${AIS_CONTAINER_NAME}" | ||||||||||||||||||||||||||||||||||
| - name: Cleanup & Stop the Docker container | ||||||||||||||||||||||||||||||||||
| if: ${{ always() }} | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker stop "${AIS_CONTAINER_NAME}" | ||||||||||||||||||||||||||||||||||
| - name: Cleanup self-hosted runner workspace | ||||||||||||||||||||||||||||||||||
| if: ${{ always() }} | ||||||||||||||||||||||||||||||||||
| run: rm -rf ${GITHUB_WORKSPACE}/* ${GITHUB_WORKSPACE}/.[!.]* ${GITHUB_WORKSPACE}/..?* | ||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be simpler to set dotglob here? Then I think |
||||||||||||||||||||||||||||||||||
| build_FIO: | ||||||||||||||||||||||||||||||||||
| uses: ROCm/fio/.github/workflows/build-fio.yml@rildixon/ci-hook-for-hipfile | ||||||||||||||||||||||||||||||||||
riley-dixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| ais_hipfile_pkg_filename: ${{ inputs.ais_hipfile_pkg_filename }} | ||||||||||||||||||||||||||||||||||
| ais_hipfile_pkg_dev_filename: ${{ inputs.ais_hipfile_pkg_dev_filename }} | ||||||||||||||||||||||||||||||||||
| platform: ${{ inputs.platform }} | ||||||||||||||||||||||||||||||||||
riley-dixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| run_FIO_tests: | ||||||||||||||||||||||||||||||||||
| runs-on: [linux, AIS] | ||||||||||||||||||||||||||||||||||
riley-dixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| needs: [build_FIO] | ||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||
| - name: Set early AIS CI environment variables | ||||||||||||||||||||||||||||||||||
| run: echo "AIS_PR_NUMBER=$(echo ${{ github.ref }} | sed 's|[^0-9]||g')" >> "${GITHUB_ENV}" | ||||||||||||||||||||||||||||||||||
| - name: Set AIS CI container name | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER}_${{ github.job }}_${AIS_INPUT_PLATFORM}_${AIS_INPUT_ROCM_VERSION}" >> "${GITHUB_ENV}" | ||||||||||||||||||||||||||||||||||
| # hipFile repo needed for //util directory | ||||||||||||||||||||||||||||||||||
| - name: Fetching hipFile repository... | ||||||||||||||||||||||||||||||||||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| path: hipFile | ||||||||||||||||||||||||||||||||||
| - name: Download hipFile runtime package | ||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| name: ${{ inputs.ais_hipfile_pkg_filename }} | ||||||||||||||||||||||||||||||||||
| - name: Download hipFile development package | ||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| name: ${{ inputs.ais_hipfile_pkg_dev_filename }} | ||||||||||||||||||||||||||||||||||
riley-dixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| - name: Download FIO runtime package | ||||||||||||||||||||||||||||||||||
| # Fedora-based distro's need to download multiple packages as the FIO IO engines | ||||||||||||||||||||||||||||||||||
| # are dynamically linked instead of built into the FIO executable. | ||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| artifact-ids: >- | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| case( | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'rocky', | ||||||||||||||||||||||||||||||||||
| format( | ||||||||||||||||||||||||||||||||||
| '{0},{1}', | ||||||||||||||||||||||||||||||||||
| needs.build_FIO.outputs.fio_pkg_fedora_artifact_id, | ||||||||||||||||||||||||||||||||||
| needs.build_FIO.outputs.fio_pkg_fedora_hipfile_engine_artifact_id | ||||||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'suse', needs.build_FIO.outputs.fio_pkg_suse_artifact_id, | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'ubuntu', needs.build_FIO.outputs.fio_pkg_debian_artifact_id, | ||||||||||||||||||||||||||||||||||
| format('Platform "{0}" is not supported by build_FIO.', inputs.platform) | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
| merge-multiple: true | ||||||||||||||||||||||||||||||||||
riley-dixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| - name: Authenticating to GitHub Container Registry | ||||||||||||||||||||||||||||||||||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 #v3.7.0 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| registry: ghcr.io | ||||||||||||||||||||||||||||||||||
| username: ${{ github.actor }} | ||||||||||||||||||||||||||||||||||
| password: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||
| - name: Starting Docker Container | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker run \ | ||||||||||||||||||||||||||||||||||
| -dt \ | ||||||||||||||||||||||||||||||||||
| --rm \ | ||||||||||||||||||||||||||||||||||
| --device=/dev/kfd \ | ||||||||||||||||||||||||||||||||||
| --device=/dev/dri \ | ||||||||||||||||||||||||||||||||||
| --security-opt seccomp=unconfined \ | ||||||||||||||||||||||||||||||||||
| --pull always \ | ||||||||||||||||||||||||||||||||||
| -v ${GITHUB_WORKSPACE}:/mnt/ais:ro \ | ||||||||||||||||||||||||||||||||||
| -v "${AIS_MOUNT_PATH}:/mnt/ais-fs" \ | ||||||||||||||||||||||||||||||||||
| --name "${AIS_CONTAINER_NAME}" \ | ||||||||||||||||||||||||||||||||||
| "${AIS_INPUT_CI_IMAGE}" | ||||||||||||||||||||||||||||||||||
| - name: Create hipfile IO test directory | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker exec -t "${AIS_CONTAINER_NAME}" /bin/bash -c "mkdir -p /mnt/ais-fs/${AIS_CONTAINER_NAME}" | ||||||||||||||||||||||||||||||||||
| - name: Copy the hipFile packages into the container | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker cp \ | ||||||||||||||||||||||||||||||||||
| "${GITHUB_WORKSPACE}/${AIS_INPUT_HIPFILE_PKG_FILENAME}" \ | ||||||||||||||||||||||||||||||||||
| "${AIS_CONTAINER_NAME}:/root" | ||||||||||||||||||||||||||||||||||
| docker cp \ | ||||||||||||||||||||||||||||||||||
| "${GITHUB_WORKSPACE}/${AIS_INPUT_HIPFILE_PKG_DEV_FILENAME}" \ | ||||||||||||||||||||||||||||||||||
| "${AIS_CONTAINER_NAME}:/root" | ||||||||||||||||||||||||||||||||||
| - name: Install the hipFile packages | ||||||||||||||||||||||||||||||||||
| # Note: We need to re-run the `ldconfig` post-install step. | ||||||||||||||||||||||||||||||||||
| # This really should just be done automatically by the ROCm package. | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker exec \ | ||||||||||||||||||||||||||||||||||
| -t \ | ||||||||||||||||||||||||||||||||||
| -w /ais/fio/build \ | ||||||||||||||||||||||||||||||||||
| -w /root \ | ||||||||||||||||||||||||||||||||||
| "${AIS_CONTAINER_NAME}" \ | ||||||||||||||||||||||||||||||||||
| /bin/bash -c ' | ||||||||||||||||||||||||||||||||||
| ROCM=/opt/rocm-${ROCM_VERSION} \ | ||||||||||||||||||||||||||||||||||
| HIPFILE=/ais/hipFile \ | ||||||||||||||||||||||||||||||||||
| HIPFILELIB=${HIPFILE}/build/src/amd_detail/ \ | ||||||||||||||||||||||||||||||||||
| HIP_PLATFORM=amd \ | ||||||||||||||||||||||||||||||||||
| CFLAGS="-I${ROCM}/include" \ | ||||||||||||||||||||||||||||||||||
| LDFLAGS="-L${ROCM}/lib -Wl,-rpath,${ROCM}/lib" \ | ||||||||||||||||||||||||||||||||||
| ../configure --enable-libhipfile | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| format( | ||||||||||||||||||||||||||||||||||
| env.AIS_PKG_MGR == 'apt' && 'apt update; apt install -y "./{0}" "./{1}"' || | ||||||||||||||||||||||||||||||||||
| env.AIS_PKG_MGR == 'dnf' && 'dnf install -y --cacheonly "./{0}" "./{1}"' || | ||||||||||||||||||||||||||||||||||
| env.AIS_PKG_MGR == 'zypper' && 'zypper --no-refresh install -y --allow-unsigned-rpm "./{0}" "./{1}"' || | ||||||||||||||||||||||||||||||||||
| 'echo "Unknown platform."; exit 1', | ||||||||||||||||||||||||||||||||||
| inputs.ais_hipfile_pkg_filename, | ||||||||||||||||||||||||||||||||||
| inputs.ais_hipfile_pkg_dev_filename | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
| ldconfig | ||||||||||||||||||||||||||||||||||
| ' | ||||||||||||||||||||||||||||||||||
| - name: Build fio | ||||||||||||||||||||||||||||||||||
| - name: Copy the FIO packages into the container | ||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||
| FIO_RUNTIME_PKG_FILENAME: >- | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| case( | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'rocky', needs.build_FIO.outputs.fio_pkg_fedora_filename, | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'suse', needs.build_FIO.outputs.fio_pkg_suse_filename, | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'ubuntu', needs.build_FIO.outputs.fio_pkg_debian_filename, | ||||||||||||||||||||||||||||||||||
| '' | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
| FIO_HIPFILE_ENGINE_PKG_FILENAME: >- | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| case( | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'rocky', needs.build_FIO.outputs.fio_pkg_fedora_hipfile_engine_filename, | ||||||||||||||||||||||||||||||||||
| '' | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
riley-dixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| docker cp \ | ||||||||||||||||||||||||||||||||||
| "${GITHUB_WORKSPACE}/${FIO_RUNTIME_PKG_FILENAME}" \ | ||||||||||||||||||||||||||||||||||
| "${AIS_CONTAINER_NAME}:/root" | ||||||||||||||||||||||||||||||||||
| ${{ | ||||||||||||||||||||||||||||||||||
| case( | ||||||||||||||||||||||||||||||||||
| inputs.platform == 'rocky', | ||||||||||||||||||||||||||||||||||
| 'docker cp \ | ||||||||||||||||||||||||||||||||||
| "${GITHUB_WORKSPACE}/${FIO_HIPFILE_ENGINE_PKG_FILENAME}" \ | ||||||||||||||||||||||||||||||||||
| "${AIS_CONTAINER_NAME}:/root" | ||||||||||||||||||||||||||||||||||
| ', | ||||||||||||||||||||||||||||||||||
| '' | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+319
to
+328
|
||||||||||||||||||||||||||||||||||
| ${{ | |
| case( | |
| inputs.platform == 'rocky', | |
| 'docker cp \ | |
| "${GITHUB_WORKSPACE}/${FIO_HIPFILE_ENGINE_PKG_FILENAME}" \ | |
| "${AIS_CONTAINER_NAME}:/root" | |
| ', | |
| '' | |
| ) | |
| }} | |
| - name: Copy the FIO hipFile engine package into the container (rocky only) | |
| if: inputs.platform == 'rocky' | |
| run: | | |
| docker cp \ | |
| "${GITHUB_WORKSPACE}/${{ needs.build_FIO.outputs.fio_pkg_fedora_hipfile_engine_filename }}" \ | |
| "${AIS_CONTAINER_NAME}:/root" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this if any humans agree with this take. I think running this copy in a single step looks better from a CI summary perspective.
Uh oh!
There was an error while loading. Please reload this page.