From b7fd8479d579ca7b8dbfd8f6c0c68d15304b311b Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 19 Mar 2025 10:58:02 +0100 Subject: [PATCH 1/4] try depot --- .github/workflows/rattler-build.yml | 3 +++ recipe/pixi_build_cmake.yaml | 19 +++++++++++++------ recipe/pixi_build_python.yaml | 2 ++ recipe/pixi_build_rattler_build.yaml | 2 ++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 91009ba..47df971 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -70,6 +70,9 @@ jobs: TARGET_PLATFORM: ${{ matrix.bins.target }} RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true" RATTLER_BUILD_COLOR: "always" + SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }} + SCCACHE_WEBDAV_ENDPOINT: "https://cache.depot.dev" + run: | pixi run build-recipe --recipe recipe/${{ matrix.bins.recipe_name }}.yaml --target-platform=${{ env.TARGET_PLATFORM }} - name: Upload OSX or Linux packages diff --git a/recipe/pixi_build_cmake.yaml b/recipe/pixi_build_cmake.yaml index 98d9d35..7477285 100644 --- a/recipe/pixi_build_cmake.yaml +++ b/recipe/pixi_build_cmake.yaml @@ -18,6 +18,7 @@ source: requirements: build: + - sccache - ${{ compiler("rust") }} host: - xz >=5.0, <6.0 @@ -27,12 +28,18 @@ requirements: build: script: - - if: unix - then: - - export OPENSSL_DIR="$PREFIX" - - cargo install --locked --root $PREFIX --path crates/pixi-build-cmake --no-track - else: - - cargo install --locked --root %PREFIX% --path crates/pixi-build-cmake --no-track + secrets: + - SCCACHE_WEBDAV_TOKEN + + content: + - if: unix + then: + # configure sccache for cargo + - export RUSTC_WRAPPER=sccache + - export OPENSSL_DIR="$PREFIX" + - cargo install --locked --root $PREFIX --path crates/pixi-build-cmake --no-track + else: + - cargo install --locked --root %PREFIX% --path crates/pixi-build-cmake --no-track files: - bin/pixi-build-cmake - bin/pixi-build-cmake.exe diff --git a/recipe/pixi_build_python.yaml b/recipe/pixi_build_python.yaml index f0f7e32..ad69caa 100644 --- a/recipe/pixi_build_python.yaml +++ b/recipe/pixi_build_python.yaml @@ -18,6 +18,7 @@ source: requirements: build: + - sccache - ${{ compiler("rust") }} host: - xz >=5.0, <6.0 @@ -28,6 +29,7 @@ build: script: - if: unix then: + - export RUSTC_WRAPPER=sccache - export OPENSSL_DIR="$PREFIX" - cargo install --locked --root $PREFIX --path crates/pixi-build-python --no-track else: diff --git a/recipe/pixi_build_rattler_build.yaml b/recipe/pixi_build_rattler_build.yaml index 3e797f6..6f3fc50 100644 --- a/recipe/pixi_build_rattler_build.yaml +++ b/recipe/pixi_build_rattler_build.yaml @@ -18,6 +18,7 @@ source: requirements: build: + - sccache - ${{ compiler("rust") }} host: - xz >=5.0, <6.0 @@ -28,6 +29,7 @@ build: script: - if: unix then: + - export RUSTC_WRAPPER=sccache - export OPENSSL_DIR="$PREFIX" - cargo install --locked --root $PREFIX --path crates/pixi-build-rattler-build --no-track else: From f314b4bfba48c6a8625e593bb0fff5cc1de52320 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 19 Mar 2025 11:17:56 +0100 Subject: [PATCH 2/4] show stats --- recipe/pixi_build_cmake.yaml | 1 + recipe/pixi_build_python.yaml | 1 + recipe/pixi_build_rattler_build.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/recipe/pixi_build_cmake.yaml b/recipe/pixi_build_cmake.yaml index 7477285..7204270 100644 --- a/recipe/pixi_build_cmake.yaml +++ b/recipe/pixi_build_cmake.yaml @@ -38,6 +38,7 @@ build: - export RUSTC_WRAPPER=sccache - export OPENSSL_DIR="$PREFIX" - cargo install --locked --root $PREFIX --path crates/pixi-build-cmake --no-track + - sccache --show-stats else: - cargo install --locked --root %PREFIX% --path crates/pixi-build-cmake --no-track files: diff --git a/recipe/pixi_build_python.yaml b/recipe/pixi_build_python.yaml index ad69caa..a25505b 100644 --- a/recipe/pixi_build_python.yaml +++ b/recipe/pixi_build_python.yaml @@ -32,6 +32,7 @@ build: - export RUSTC_WRAPPER=sccache - export OPENSSL_DIR="$PREFIX" - cargo install --locked --root $PREFIX --path crates/pixi-build-python --no-track + - sccache --show-stats else: - cargo install --locked --root %PREFIX% --path crates/pixi-build-python --no-track files: diff --git a/recipe/pixi_build_rattler_build.yaml b/recipe/pixi_build_rattler_build.yaml index 6f3fc50..f23342f 100644 --- a/recipe/pixi_build_rattler_build.yaml +++ b/recipe/pixi_build_rattler_build.yaml @@ -32,6 +32,7 @@ build: - export RUSTC_WRAPPER=sccache - export OPENSSL_DIR="$PREFIX" - cargo install --locked --root $PREFIX --path crates/pixi-build-rattler-build --no-track + - sccache --show-stats else: - cargo install --locked --root %PREFIX% --path crates/pixi-build-rattler-build --no-track files: From 18f7a8080f3ff5d95ac408e2348c80bc7f7c3b47 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 19 Mar 2025 11:33:10 +0100 Subject: [PATCH 3/4] no-build-id --- .github/workflows/rattler-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 47df971..158dfe8 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -74,7 +74,7 @@ jobs: SCCACHE_WEBDAV_ENDPOINT: "https://cache.depot.dev" run: | - pixi run build-recipe --recipe recipe/${{ matrix.bins.recipe_name }}.yaml --target-platform=${{ env.TARGET_PLATFORM }} + pixi run build-recipe --recipe recipe/${{ matrix.bins.recipe_name }}.yaml --target-platform=${{ env.TARGET_PLATFORM }} --no-build-id - name: Upload OSX or Linux packages shell: bash if: ${{ github.event_name == 'push' && matrix.bins.os != 'windows-latest' && github.repository == env.REPO_NAME }} From 4232d6ffb3c54069adaeadc2d2fd75e8ab4f0551 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 19 Mar 2025 11:45:58 +0100 Subject: [PATCH 4/4] use fewer resources during debugging --- recipe/pixi_build_python.yaml | 43 ---------------------------- recipe/pixi_build_rattler_build.yaml | 43 ---------------------------- scripts/generate_version_matrix.py | 10 +++---- 3 files changed, 5 insertions(+), 91 deletions(-) delete mode 100644 recipe/pixi_build_python.yaml delete mode 100644 recipe/pixi_build_rattler_build.yaml diff --git a/recipe/pixi_build_python.yaml b/recipe/pixi_build_python.yaml deleted file mode 100644 index a25505b..0000000 --- a/recipe/pixi_build_python.yaml +++ /dev/null @@ -1,43 +0,0 @@ -package: - name: pixi-build-python - version: "${{ env.get('PIXI_BUILD_PYTHON_VERSION', default='0.1.0dev') }}" - -# cache: -# source: -# path: .. -# requirements: -# build: -# - ${{ compiler("rust") }} -# host: -# - xz >=5.0, <6.0 -# - if: unix -# then: openssl - -source: - path: .. - -requirements: - build: - - sccache - - ${{ compiler("rust") }} - host: - - xz >=5.0, <6.0 - - if: unix - then: openssl - -build: - script: - - if: unix - then: - - export RUSTC_WRAPPER=sccache - - export OPENSSL_DIR="$PREFIX" - - cargo install --locked --root $PREFIX --path crates/pixi-build-python --no-track - - sccache --show-stats - else: - - cargo install --locked --root %PREFIX% --path crates/pixi-build-python --no-track - files: - - bin/pixi-build-python - - bin/pixi-build-python.exe - -tests: - - script: pixi-build-python --help diff --git a/recipe/pixi_build_rattler_build.yaml b/recipe/pixi_build_rattler_build.yaml deleted file mode 100644 index f23342f..0000000 --- a/recipe/pixi_build_rattler_build.yaml +++ /dev/null @@ -1,43 +0,0 @@ -package: - name: pixi-build-rattler-build - version: "${{ env.get('PIXI_BUILD_RATTLER_BUILD_VERSION', default='0.1.0dev') }}" - -# cache: -# source: -# path: .. -# requirements: -# build: -# - ${{ compiler("rust") }} -# host: -# - xz >=5.0, <6.0 -# - if: unix -# then: openssl - -source: - path: .. - -requirements: - build: - - sccache - - ${{ compiler("rust") }} - host: - - xz >=5.0, <6.0 - - if: unix - then: openssl - -build: - script: - - if: unix - then: - - export RUSTC_WRAPPER=sccache - - export OPENSSL_DIR="$PREFIX" - - cargo install --locked --root $PREFIX --path crates/pixi-build-rattler-build --no-track - - sccache --show-stats - else: - - cargo install --locked --root %PREFIX% --path crates/pixi-build-rattler-build --no-track - files: - - bin/pixi-build-rattler-build - - bin/pixi-build-rattler-build.exe - -tests: - - script: pixi-build-rattler-build --help diff --git a/scripts/generate_version_matrix.py b/scripts/generate_version_matrix.py index 7606008..3ea796d 100644 --- a/scripts/generate_version_matrix.py +++ b/scripts/generate_version_matrix.py @@ -33,11 +33,11 @@ def generate_matrix(): # https://github.com/orgs/community/discussions/67591 targets = [ {"target": "linux-64", "os": "ubuntu-20.04"}, - {"target": "linux-aarch64", "os": "ubuntu-latest"}, - {"target": "linux-ppc64le", "os": "ubuntu-latest"}, - {"target": "win-64", "os": "windows-latest"}, - {"target": "osx-64", "os": "macos-13"}, - {"target": "osx-arm64", "os": "macos-14"} + # {"target": "linux-aarch64", "os": "ubuntu-latest"}, + # {"target": "linux-ppc64le", "os": "ubuntu-latest"}, + # {"target": "win-64", "os": "windows-latest"}, + # {"target": "osx-64", "os": "macos-13"}, + # {"target": "osx-arm64", "os": "macos-14"} ] git_tags = get_git_tags()