From f41508b2559c4faeea14d70c87d5c855df68ea62 Mon Sep 17 00:00:00 2001 From: Alice Date: Mon, 12 Oct 2026 16:34:53 +0200 Subject: [PATCH] Revert "Dev/sccache (#415)" This reverts commit 4a8e07c2484421632ea8a8cb6ed98267c1ad3ade. --- .github/workflows/build_wheel.yml | 50 ++++----------------------- .github/workflows/build_windows.yml | 25 +++----------- .github/workflows/build_with_docs.yml | 23 +++--------- conda-recipe/meta.yaml | 2 +- pyproject.toml | 10 ++---- 5 files changed, 19 insertions(+), 91 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index d27abd6a..bc4f6683 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -19,51 +19,13 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - env: - # Job level so that the build and the statistics step talk to the same - # sccache server configured for the GitHub Actions cache - SCCACHE_GHA_ENABLED: "true" - steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v4 - - uses: mozilla-actions/sccache-action@v0.0.11 - with: - version: "v0.18.0" - - # Without an MSVC environment scikit-build-core falls back to the Visual - # Studio generator on Windows, and MSBuild ignores the compiler launcher - - uses: TheMrMilchmann/setup-msvc-dev@v4.1.0 - if: runner.os == 'Windows' - with: - arch: x64 - - # Linux wheels build inside a manylinux container, which needs its own - # sccache binary and the cache credentials the action exported; its - # statistics are printed after each wheel since the host cannot see them. - name: Build wheels - env: - CIBW_ENVIRONMENT_WINDOWS: CMAKE_GENERATOR=Ninja - CIBW_REPAIR_WHEEL_COMMAND_LINUX: >- - auditwheel repair -w {dest_dir} {wheel} && sccache --show-stats - CIBW_CONFIG_SETTINGS: >- - cmake.define.CMAKE_C_COMPILER_LAUNCHER=sccache - cmake.define.CMAKE_CXX_COMPILER_LAUNCHER=sccache - cmake.define.CMAKE_DISABLE_PRECOMPILE_HEADERS=ON - CIBW_ENVIRONMENT_PASS_LINUX: >- - SCCACHE_GHA_ENABLED ACTIONS_RESULTS_URL ACTIONS_RUNTIME_TOKEN - ACTIONS_CACHE_SERVICE_V2 - CIBW_BEFORE_ALL_LINUX: >- - curl -sSL https://github.com/mozilla/sccache/releases/download/v0.18.0/sccache-v0.18.0-x86_64-unknown-linux-musl.tar.gz - | tar -xz -C /usr/local/bin --strip-components=1 --wildcards '*/sccache' - && chmod +x /usr/local/bin/sccache - run: pipx run cibuildwheel==4.3.0 + run: pipx run cibuildwheel==3.4.0 - - name: Compiler cache statistics - if: runner.os != 'Linux' - run: sccache --show-stats - - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl @@ -72,12 +34,12 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v4 - name: Build sdist run: pipx run build --sdist - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: name: cibw-sdist path: dist/*.tar.gz @@ -92,7 +54,7 @@ jobs: # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: - - uses: actions/download-artifact@v8 + - uses: actions/download-artifact@v4 with: # unpacks all CIBW artifacts into dist/ pattern: cibw-* diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 1a562f39..5078cf5e 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -9,42 +9,25 @@ jobs: build: runs-on: windows-latest - env: - # sccache keeps compiled objects in the GitHub Actions cache, so later - # runs only recompile the translation units a change affects - SCCACHE_GHA_ENABLED: "true" - steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v7 + - uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install Python dependencies run: python -m pip install ninja numpy matplotlib pytest pytest-check boost-histogram - # Puts cl.exe on the path so that CMake can use the Ninja generator. - # Pinned to a release tag: the v4 ref of this action is a branch. - - uses: TheMrMilchmann/setup-msvc-dev@v4.1.0 - with: - arch: x64 + # Puts cl.exe on the path so that CMake can use the Ninja generator + - uses: ilammy/msvc-dev-cmd@v1 - - uses: mozilla-actions/sccache-action@v0.0.11 - with: - version: "v0.18.0" - - # Precompiled headers are disabled: sccache cannot cache MSVC - # compilations that use one - name: Configure - run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DAARE_TESTS=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_WARNINGS_AS_ERRORS=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DAARE_TESTS=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_WARNINGS_AS_ERRORS=ON - name: Build run: cmake --build build - - name: Compiler cache statistics - run: sccache --show-stats - - name: C++ unit tests run: ctest --test-dir build --output-on-failure -j4 diff --git a/.github/workflows/build_with_docs.yml b/.github/workflows/build_with_docs.yml index 9e2dc872..bbae4f9b 100644 --- a/.github/workflows/build_with_docs.yml +++ b/.github/workflows/build_with_docs.yml @@ -27,19 +27,15 @@ jobs: runs-on: ${{ matrix.platform }} - env: - # sccache keeps compiled objects in the GitHub Actions cache - SCCACHE_GHA_ENABLED: "true" - defaults: run: shell: "bash -l {0}" steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v4 - name: Get conda - uses: conda-incubator/setup-miniconda@v4 + uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{ matrix.python-version }} environment-file: etc/dev-env.yml @@ -47,23 +43,14 @@ jobs: channels: conda-forge conda-remove-defaults: "true" - - uses: mozilla-actions/sccache-action@v0.0.11 - with: - version: "v0.18.0" - - # Precompiled headers are disabled because sccache does not cache - # compilations that use one - name: Build library and docs run: | mkdir build cd build - cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON -DAARE_TESTS=ON -DAARE_WARNINGS_AS_ERRORS=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON -DAARE_TESTS=ON -DAARE_WARNINGS_AS_ERRORS=ON make -j 4 make docs - - name: Compiler cache statistics - run: sccache --show-stats - - name: C++ unit tests working-directory: ${{github.workspace}}/build run: ctest -C ${{env.BUILD_TYPE}} -j4 @@ -76,7 +63,7 @@ jobs: - name: Upload static files as artifact if: matrix.platform == 'ubuntu-latest' id: deployment - uses: actions/upload-pages-artifact@v5 + uses: actions/upload-pages-artifact@v3 with: path: build/docs/html/ deploy: @@ -89,7 +76,7 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@v4 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 2e2264af..d2d39b53 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -26,7 +26,7 @@ requirements: - python - pip - numpy >=2.1 - - scikit-build-core >=1.0 + - scikit-build-core >=0.11 - pybind11 >=3.0.3 - matplotlib # needed in host to solve the environment for run diff --git a/pyproject.toml b/pyproject.toml index e1176dcd..16636a01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,11 @@ -[[tool.dynamic-metadata]] -field = "version" +[tool.scikit-build.metadata.version] provider = "scikit_build_core.metadata.regex" input = "VERSION" regex = '^(?P\d+(?:\.\d+)*(?:[\.\+\w]+)?)$' -result = "{version}" +result = "{version}" [build-system] -requires = ["scikit-build-core>=1.0", "pybind11", "numpy"] +requires = ["scikit-build-core>=0.11", "pybind11", "numpy"] build-backend = "scikit_build_core.build" [project] @@ -35,9 +34,6 @@ build = "cp{312,313,314}-win_amd64" [tool.scikit-build] build.verbose = true -# A fixed build directory keeps the absolute paths of the compiled sources -# stable between runs, which sccache needs for a cache hit -build-dir = "build/{wheel_tag}" cmake.build-type = "Release" install.components = ["python"]