From 4173efd41187bbe40a043536c94bf3c07ee558b4 Mon Sep 17 00:00:00 2001 From: John Demme Date: Fri, 17 May 2024 23:22:16 +0000 Subject: [PATCH] pipeline debug --- .github/workflows/pycdePublish.yml | 4 +++- frontends/PyCDE/pyproject.toml | 2 +- frontends/PyCDE/setup.py | 20 +++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pycdePublish.yml b/.github/workflows/pycdePublish.yml index 6afb91594b57..3c0fbe6d1602 100644 --- a/.github/workflows/pycdePublish.yml +++ b/.github/workflows/pycdePublish.yml @@ -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 }} @@ -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 diff --git a/frontends/PyCDE/pyproject.toml b/frontends/PyCDE/pyproject.toml index 29ae1d6d147d..5203af06035c 100644 --- a/frontends/PyCDE/pyproject.toml +++ b/frontends/PyCDE/pyproject.toml @@ -39,7 +39,7 @@ environment-pass = [ "SETUPTOOLS_SCM_DEBUG", "BUILD_TYPE", "RUN_TESTS", - "COMPILER_PREFIX" + "COMPILER_LAUNCHER" ] [project] diff --git a/frontends/PyCDE/setup.py b/frontends/PyCDE/setup.py index c0ebd3944420..c5561fbe22b5 100644 --- a/frontends/PyCDE/setup.py +++ b/frontends/PyCDE/setup.py @@ -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(" ") @@ -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",