-
Notifications
You must be signed in to change notification settings - Fork 297
[TheRock CI] Adding windows build for TheRock CI #315
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
Changes from all commits
4f91694
3e64933
6a142e8
3b56d07
27e0c7f
bbfec6a
d96fab4
1680c00
b360d4a
f7a59b5
2bb29d9
d879f26
bb686c5
e45dc7a
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 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,182 @@ | ||||||||||||||||
| name: TheRock CI Windows | ||||||||||||||||
|
|
||||||||||||||||
| on: | ||||||||||||||||
| workflow_call: | ||||||||||||||||
| inputs: | ||||||||||||||||
| cmake_options: | ||||||||||||||||
| type: string | ||||||||||||||||
| project_to_test: | ||||||||||||||||
| type: string | ||||||||||||||||
| subtree_checkout: | ||||||||||||||||
| type: string | ||||||||||||||||
|
|
||||||||||||||||
| permissions: | ||||||||||||||||
| contents: read | ||||||||||||||||
|
|
||||||||||||||||
| jobs: | ||||||||||||||||
| therock-build-windows: | ||||||||||||||||
| name: Build Windows Packages | ||||||||||||||||
| runs-on: azure-windows-scale-rocm | ||||||||||||||||
| outputs: | ||||||||||||||||
| AMDGPU_FAMILIES: ${{ env.AMDGPU_FAMILIES }} | ||||||||||||||||
| permissions: | ||||||||||||||||
| contents: read | ||||||||||||||||
| id-token: write | ||||||||||||||||
| defaults: | ||||||||||||||||
| run: | ||||||||||||||||
| shell: bash | ||||||||||||||||
| env: | ||||||||||||||||
| BUILD_DIR: B:\build | ||||||||||||||||
| CCACHE_DIR: "${{ github.workspace }}/.container-cache/ccache" | ||||||||||||||||
| CCACHE_MAXSIZE: "700M" | ||||||||||||||||
| # TODO(geomin12): Add matrix of families | ||||||||||||||||
| # To get a fast signal of windows building for TheRock, adding gfx110X | ||||||||||||||||
| AMDGPU_FAMILIES: "gfx110X-dgpu" | ||||||||||||||||
|
geomin12 marked this conversation as resolved.
|
||||||||||||||||
| steps: | ||||||||||||||||
| - name: Generate a token for rocm-libraries | ||||||||||||||||
| id: generate-token | ||||||||||||||||
| uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 | ||||||||||||||||
| with: | ||||||||||||||||
| app-id: ${{ secrets.APP_ID }} | ||||||||||||||||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||||||||||||||||
| owner: ${{ github.repository_owner }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: "Checking out repository for rocm-libraries" | ||||||||||||||||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||||||||||||||
| with: | ||||||||||||||||
| repository: ${{ github.repository }} | ||||||||||||||||
| ref: refs/pull/${{ github.event.pull_request.number }}/merge | ||||||||||||||||
|
geomin12 marked this conversation as resolved.
|
||||||||||||||||
| sparse-checkout: | | ||||||||||||||||
| .github | ||||||||||||||||
| ${{ inputs.subtree_checkout }} | ||||||||||||||||
| fetch-depth: 0 # Needed for subtree splitting | ||||||||||||||||
| token: ${{ steps.generate-token.outputs.token }} | ||||||||||||||||
|
Comment on lines
+44
to
+53
Member
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. This PR broke postsubmit and was reverted: #467. See logs at https://github.com/ROCm/rocm-libraries/actions/runs/15988190629/job/45096452132#step:3:55 The checkout code here should instead match what is on Linux: rocm-libraries/.github/workflows/therock-ci-linux.yml Lines 42 to 48 in a672446
Without the |
||||||||||||||||
|
|
||||||||||||||||
| - name: Checkout TheRock repository | ||||||||||||||||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||||||||||||||
| with: | ||||||||||||||||
| repository: "ROCm/TheRock" | ||||||||||||||||
| path: "TheRock" | ||||||||||||||||
| ref: "users/geomin12/issue-664" | ||||||||||||||||
|
|
||||||||||||||||
| - name: Set up Python | ||||||||||||||||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||||||||||||||||
| with: | ||||||||||||||||
| python-version: '3.12' | ||||||||||||||||
|
|
||||||||||||||||
| - name: Install python deps | ||||||||||||||||
| run: | | ||||||||||||||||
| pip install -r TheRock/requirements.txt | ||||||||||||||||
|
|
||||||||||||||||
| - name: Install requirements | ||||||||||||||||
| run: | | ||||||||||||||||
| choco install --no-progress -y ccache | ||||||||||||||||
| choco install --no-progress -y ninja | ||||||||||||||||
| choco install --no-progress -y strawberryperl | ||||||||||||||||
| echo "$PATH;C:\Strawberry\c\bin" >> $GITHUB_PATH | ||||||||||||||||
| choco install --no-progress -y awscli | ||||||||||||||||
| echo "$PATH;C:\Program Files\Amazon\AWSCLIV2" >> $GITHUB_PATH | ||||||||||||||||
|
|
||||||||||||||||
| # After other installs, so MSVC get priority in the PATH. | ||||||||||||||||
| - name: Configure MSVC | ||||||||||||||||
| uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Fetch sources | ||||||||||||||||
| run: | | ||||||||||||||||
| git config --global core.longpaths true | ||||||||||||||||
| python ./TheRock/build_tools/fetch_sources.py --jobs 96 --no-include-math-libs | ||||||||||||||||
|
|
||||||||||||||||
| - name: Checkout closed source AMDGPU/ROCm interop library folder | ||||||||||||||||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||||||||||||||
| with: | ||||||||||||||||
| repository: nod-ai/amdgpu-windows-interop | ||||||||||||||||
| path: amdgpu-windows-interop | ||||||||||||||||
| lfs: true | ||||||||||||||||
|
geomin12 marked this conversation as resolved.
|
||||||||||||||||
|
|
||||||||||||||||
| - name: Configure Projects | ||||||||||||||||
| env: | ||||||||||||||||
| amdgpu_families: ${{ env.AMDGPU_FAMILIES }} | ||||||||||||||||
| package_version: "ADHOCBUILD" | ||||||||||||||||
| extra_cmake_options: "-DBUILD_TESTING=OFF -DTHEROCK_USE_EXTERNAL_ROCM_LIBRARIES=ON -DTHEROCK_ROCM_LIBRARIES_SOURCE_DIR=${{ github.workspace }} ${{ inputs.cmake_options }}" | ||||||||||||||||
| run: | | ||||||||||||||||
| # clear cache before build and after download | ||||||||||||||||
| ccache -z | ||||||||||||||||
| python3 TheRock/build_tools/github_actions/build_configure.py | ||||||||||||||||
|
|
||||||||||||||||
| - name: Build therock-dist | ||||||||||||||||
| run: cmake --build "${{ env.BUILD_DIR }}" --target therock-dist | ||||||||||||||||
|
|
||||||||||||||||
| - name: Build therock-archives | ||||||||||||||||
| run: cmake --build "${{ env.BUILD_DIR }}" --target therock-archives | ||||||||||||||||
|
|
||||||||||||||||
| - name: Report | ||||||||||||||||
| if: ${{ !cancelled() }} | ||||||||||||||||
| run: | | ||||||||||||||||
| echo "Build dir:" | ||||||||||||||||
| echo "------------" | ||||||||||||||||
| ls -lh "${{ env.BUILD_DIR }}" | ||||||||||||||||
| echo "Artifact Archives:" | ||||||||||||||||
| echo "------------------" | ||||||||||||||||
| ls -lh "${{ env.BUILD_DIR }}"/artifacts/*.tar.xz | ||||||||||||||||
| echo "Artifacts:" | ||||||||||||||||
| echo "----------" | ||||||||||||||||
| du -h -d 1 "${{ env.BUILD_DIR }}"/artifacts | ||||||||||||||||
| echo "CCache Stats:" | ||||||||||||||||
| echo "-------------" | ||||||||||||||||
| ccache -s | ||||||||||||||||
|
|
||||||||||||||||
| - name: "Build size report" | ||||||||||||||||
| if: always() | ||||||||||||||||
| shell: powershell | ||||||||||||||||
| run: | | ||||||||||||||||
| $fs = Get-PSDrive -PSProvider "FileSystem" | ||||||||||||||||
| $fsout = $fs | Select-Object -Property Name,Used,Free,Root | ||||||||||||||||
| $fsout | % {$_.Used/=1GB;$_.Free/=1GB;$_} | Write-Host | ||||||||||||||||
| get-disk | Select-object @{Name="Size(GB)";Expression={$_.Size/1GB}} | Write-Host | ||||||||||||||||
|
|
||||||||||||||||
| - name: Configure AWS Credentials | ||||||||||||||||
| if: always() | ||||||||||||||||
| uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 | ||||||||||||||||
| with: | ||||||||||||||||
| aws-region: us-east-2 | ||||||||||||||||
| role-to-assume: arn:aws:iam::692859939525:role/therock-artifacts-external | ||||||||||||||||
|
|
||||||||||||||||
| - name: Create Logs index Files | ||||||||||||||||
| if: always() | ||||||||||||||||
| run: | | ||||||||||||||||
| python3 TheRock/build_tools/github_actions/create_log_index.py \ | ||||||||||||||||
| --build-dir=${{ env.BUILD_DIR }} \ | ||||||||||||||||
| --amdgpu-family=${{ env.AMDGPU_FAMILIES }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Upload artifacts | ||||||||||||||||
| run: | | ||||||||||||||||
| python TheRock/build_tools/github_actions/upload_build_artifacts.py \ | ||||||||||||||||
| --run-id ${{ github.run_id }} \ | ||||||||||||||||
| --amdgpu-family ${{ env.AMDGPU_FAMILIES }} \ | ||||||||||||||||
| --build-dir ${{ env.BUILD_DIR }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Upload Logs | ||||||||||||||||
| if: always() | ||||||||||||||||
| run: | | ||||||||||||||||
| python3 TheRock/build_tools/github_actions/upload_build_logs_to_s3.py \ | ||||||||||||||||
| --build-dir=${{ env.BUILD_DIR }} \ | ||||||||||||||||
| --run-id ${{ github.run_id }} \ | ||||||||||||||||
| --amdgpu-family ${{ env.AMDGPU_FAMILIES }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Add Links to Job Summary | ||||||||||||||||
| if: always() | ||||||||||||||||
| run: | | ||||||||||||||||
| python TheRock/build_tools/github_actions/upload_build_summary.py \ | ||||||||||||||||
| --run-id ${{ github.run_id }} \ | ||||||||||||||||
| --amdgpu-family ${{ env.AMDGPU_FAMILIES }} \ | ||||||||||||||||
| --build-dir ${{ env.BUILD_DIR }} | ||||||||||||||||
|
|
||||||||||||||||
| therock-test-windows: | ||||||||||||||||
| name: "Test" | ||||||||||||||||
| needs: [therock-build-windows] | ||||||||||||||||
| uses: ./.github/workflows/therock-test-packages.yml | ||||||||||||||||
| with: | ||||||||||||||||
| project_to_test: ${{ inputs.project_to_test }} | ||||||||||||||||
| amdgpu_families: ${{ needs.therock-build-windows.outputs.AMDGPU_FAMILIES }} | ||||||||||||||||
| test_runs_on: "" | ||||||||||||||||
| platform: "windows" | ||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.