Skip to content

Commit

Permalink
pipeline debug
Browse files Browse the repository at this point in the history
  • Loading branch information
teqdruid committed May 17, 2024
1 parent 1ef3884 commit 4173efd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pycdePublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ jobs:
run: |
python3 -m pip install --upgrade pip
python3 -m pip install cibuildwheel twine
choco install ninja sccache
- name: Build wheel
env:
CIBW_BUILD: ${{ matrix.python-env }}
Expand All @@ -126,7 +128,7 @@ jobs:
BUILD_TYPE: Release
# PyCDE integration tests are not yet implemented on Windows.
RUN_TESTS: False
COMPILER_PREFIX: sccache
COMPILER_LAUNCHER: sccache
run: |
echo "Building wheel"
python3 -m cibuildwheel --output-dir wheelhouse frontends/PyCDE
Expand Down
2 changes: 1 addition & 1 deletion frontends/PyCDE/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ environment-pass = [
"SETUPTOOLS_SCM_DEBUG",
"BUILD_TYPE",
"RUN_TESTS",
"COMPILER_PREFIX"
"COMPILER_LAUNCHER"
]

[project]
Expand Down
20 changes: 9 additions & 11 deletions frontends/PyCDE/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@ def run(self):
"-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR={}".format(circt_dir),
"-DESI_RUNTIME=ON",
]
prefix = os.getenv("COMPILER_PREFIX", "")
if prefix != "":
prefix += " "
cc = "gcc"
if "COMPILER_LAUNCHER" in os.environ:
cmake_args += [
f"-DCMAKE_C_COMPILER_LAUNCHER={os.environ['COMPILER_LAUNCHER']}",
f"-DCMAKE_CXX_COMPILER_LAUNCHER={os.environ['COMPILER_LAUNCHER']}"
]
if "CC" in os.environ:
cc = os.environ["CC"]
cmake_args += [f"-DCMAKE_C_COMPILER={prefix}{cc}"]
cxx = "g++"
cmake_args += [f"-DCMAKE_C_COMPILER={os.environ['CC']}"]
if "CXX" in os.environ:
cxx = os.environ["CXX"]
cmake_args += [f"-DCMAKE_CXX_COMPILER={prefix}{cxx}"]
cmake_args += [f"-DCMAKE_CXX_COMPILER={os.environ['CXX']}"]

if "CIRCT_EXTRA_CMAKE_ARGS" in os.environ:
cmake_args += os.environ["CIRCT_EXTRA_CMAKE_ARGS"].split(" ")
Expand All @@ -95,8 +93,8 @@ def run(self):
cmake_cache_file = os.path.join(cmake_build_dir, "CMakeCache.txt")
if os.path.exists(cmake_cache_file):
os.remove(cmake_cache_file)
subprocess.check_call(["echo", "cmake", src_dir] + cmake_args,
cwd=cmake_build_dir)
print(f"Running cmake with args: {cmake_args}", file=sys.stderr)
subprocess.check_call(["echo", "Running: cmake", src_dir] + cmake_args)
subprocess.check_call(["cmake", src_dir] + cmake_args, cwd=cmake_build_dir)
subprocess.check_call([
"cmake",
Expand Down

0 comments on commit 4173efd

Please sign in to comment.