Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/amd-aie-distro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
LLVM_AIE_PROJECT_COMMIT="${{ inputs.LLVM_AIE_COMMIT }}"
fi
echo "LLVM_AIE_PROJECT_COMMIT=${LLVM_AIE_PROJECT_COMMIT}" | tee -a $GITHUB_OUTPUT
DATETIME=$(date +"%Y%m%d%H")
DATETIME=$(date +"%Y%m%d%H%M")
echo "DATETIME=${DATETIME}" | tee -a $GITHUB_OUTPUT

settings:
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
run: |
pip install pkginfo
WHL=$(ls wheelhouse/llvm_aie-*whl)
echo "LLVM_AIE_WHEEL_VERSION=$(python -c "import pkginfo; w = pkginfo.Wheel('$WHL'); print(w.version.split('+')[0] + '+' + w.version.split('+')[1].rsplit('.', 1)[-1])")" | tee -a $GITHUB_OUTPUT
echo "LLVM_AIE_WHEEL_VERSION=$(python -c "import pkginfo; print(pkginfo.Wheel('$WHL').version)")" | tee -a $GITHUB_OUTPUT

- name: Download cache from container ubuntu
if: contains(matrix.OS, 'ubuntu') && contains(matrix.ARCH, 'x86_64') && (success() || failure())
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/amd_aie_releases/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ def build_extension(self, ext: CMakeExtension) -> None:
)
shutil.rmtree(install_dir / "python_packages", ignore_errors=True)

# Record the source commit inside the wheel. PEP 440 forbids local
# version segments (`+sha`) on PyPI, so the SHA can no longer ride
# along in the version string; pin it here instead.
(install_dir / "commit.txt").write_text(
f"commit={commit_hash}\n"
f"datetime={llvm_datetime}\n"
f"version={version}\n"
)

subprocess.run(
[
"find",
Expand Down Expand Up @@ -223,10 +232,10 @@ def build_extension(self, ext: CMakeExtension) -> None:

now = datetime.now()
llvm_datetime = os.getenv(
"DATETIME", f"{now.year}{now.month:02}{now.day:02}{now.hour:02}"
"DATETIME", f"{now.year}{now.month:02}{now.day:02}{now.hour:02}{now.minute:02}"
)

version = f"{llvm_version[0]}.{llvm_version[1]}.{llvm_version[2]}.{llvm_datetime}+{commit_hash}"
version = f"{llvm_version[0]}.{llvm_version[1]}.{llvm_version[2]}.{llvm_datetime}"
llvm_url = f"https://github.com/Xilinx/llvm-aie/commit/{commit_hash}"

build_temp = Path.cwd() / "build" / "temp"
Expand Down
Loading