-
Notifications
You must be signed in to change notification settings - Fork 5
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
Setup initial workflow for building on Windows. #73
Merged
+108
−2
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
08eb507
Preliminary support for the base component on Windows.
ScottTodd 1b8089b
Patch rocm-core to be more compatible with Windows/MSVC.
ScottTodd 9d8a471
Add workflow for building on Windows.
ScottTodd ef79594
Merge remote-tracking branch 'upstream/main' into windows-ci-setup-2
ScottTodd 3781ec0
Merge branch 'main' into windows-ci-setup-2
ScottTodd 0cbe39c
Update python version to 3.12 for follow_symlinks parameter.
ScottTodd cf22750
Merge remote-tracking branch 'upstream/main' into windows-ci-setup-2
ScottTodd d98a712
Rebase on main.
ScottTodd 9618e0c
Merge remote-tracking branch 'upstream/main' into windows-ci-setup-2
ScottTodd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build Windows Packages | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
package_version: | ||
type: string | ||
default: ADHOCBUILD | ||
|
||
workflow_call: | ||
inputs: | ||
package_version: | ||
type: string | ||
default: ADHOCBUILD | ||
|
||
jobs: | ||
build_windows_packages: | ||
name: Build Windows Packages | ||
runs-on: windows-2022 # TODO(#36): move to cluster of CPU builders like `azure-windows-scale-nod-ai` | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- name: Enabling git symlinks | ||
run: git config --global core.symlinks true | ||
- name: "Checking out repository" | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install ninja | ||
run: choco install ninja --yes | ||
|
||
- name: Fetch sources | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Nobody" | ||
python ./build_tools/fetch_sources.py --depth 1 | ||
# TODO(scotttodd): Get symlinks working on CI runners instead of this | ||
- name: Replace symlinks with copies | ||
run: ./build_tools/patch_symlinks_for_windows_ci.sh | ||
|
||
- name: Configure MSVC | ||
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 | ||
|
||
# TODO: We shouldn't be using a cache on actual release branches, but it | ||
# really helps for iteration time. | ||
- name: Setup ccache | ||
uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16 | ||
with: | ||
key: windows-build-packages-v1 | ||
|
||
- name: Configure Projects | ||
run: | | ||
# Generate a new build id. | ||
package_version="${{ inputs.package_version }}" | ||
echo "Building package ${package_version}" | ||
|
||
# Build. | ||
cmake -B build -GNinja . \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DTHEROCK_AMDGPU_FAMILIES=gfx110X-dgpu \ | ||
-DTHEROCK_PACKAGE_VERSION="${package_version}" \ | ||
-DTHEROCK_ENABLE_RCCL=OFF \ | ||
-DTHEROCK_ENABLE_MATH_LIBS=OFF \ | ||
-DTHEROCK_ENABLE_ML_LIBS=OFF | ||
|
||
- name: Build Projects | ||
run: cmake --build build | ||
|
||
- name: Report | ||
if: ${{ !cancelled() }} | ||
run: | | ||
ls -lh build |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# Replaces symlinks for source folders with direct copies of files. | ||
# This helps set up files for Windows CI runners that do not have symlinks | ||
# fully configured. This should usually *NOT* be run on development machines | ||
# since it makes destructive changes. | ||
|
||
this_dir="$(cd $(dirname $0) && pwd)" | ||
root_dir="$(cd $this_dir/.. && pwd)" | ||
|
||
cd ${root_dir} | ||
|
||
# Remove the original symlinks. | ||
rm base/half | ||
rm base/rocm-cmake | ||
rm base/rocm-core | ||
|
||
# Delete .git folders which are symlinks too. CI doesn't need them. | ||
rm -rf sources/half/.git | ||
rm -rf sources/rocm-cmake/.git | ||
rm -rf sources/rocm-core/.git | ||
|
||
# Copy from sources/ to where the symlinks were. | ||
cp -r sources/half base | ||
cp -r sources/rocm-cmake base | ||
cp -r sources/rocm-core base |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Argh, more download flakes: https://github.com/nod-ai/TheRock/actions/runs/13190519640/job/36822474141?pr=73#step:11:765