From 18893a4c49d89001cfa559149fd522db151a91ed Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 13:32:04 +0200 Subject: [PATCH 01/26] wip: build with rattler-build --- .github/workflows/rattler-build.yml | 32 +++++ .github/workflows/rust-compile.yml | 2 +- .gitignore | 3 + pixi.lock | 191 ++++++++++++++++++++++++++++ pixi.toml | 6 +- recipe.yaml | 38 ++++++ 6 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/rattler-build.yml create mode 100644 recipe.yaml diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml new file mode 100644 index 0000000..5286897 --- /dev/null +++ b/.github/workflows/rattler-build.yml @@ -0,0 +1,32 @@ +on: + push: + branches: + - "main" + pull_request: + +name: "Build Conda Package" + +jobs: + rattler-build: + strategy: + matrix: + include: + - { target: linux-64, os: ubuntu-20.04 } + - { target: win-64, os: windows-latest } + # force older macos-13 to get x86_64 runners + - { target: osx-64, os: macos-13 } + - { target: osx-arm64, os: macos-14 } + fail-fast: false + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: prefix-dev/setup-pixi@v0.5.1 + with: + pixi-version: v0.32.1 + cache: true + - name: Run rattler-build + env: + TARGET_PLATFORM: ${{ matrix.target }} + run: | + pixi -e build-self rattler-build build --output ${{ env.RUNNER_TEMP }} --target-platform ${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental diff --git a/.github/workflows/rust-compile.yml b/.github/workflows/rust-compile.yml index 8a3746a..5e5d536 100644 --- a/.github/workflows/rust-compile.yml +++ b/.github/workflows/rust-compile.yml @@ -4,7 +4,7 @@ on: - "main" pull_request: -name: Rust +name: Rust Test concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.gitignore b/.gitignore index a77a3f7..651267a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ debug/ target/ +# If running rattler-build locally +output/ + # These are backup files generated by rustfmt **/*.rs.bk diff --git a/pixi.lock b/pixi.lock index d9fdce0..96fc0bc 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1,5 +1,26 @@ version: 5 environments: + build-self: + channels: + - url: https://conda.anaconda.org/conda-forge/ + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.1.0-h77fa898_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.1.0-h77fa898_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.25.0-h51b9b6e_0.conda + osx-64: + - conda: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.25.0-hf141a1a_0.conda + osx-arm64: + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.25.0-h481ae1d_0.conda + win-64: + - conda: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.25.0-h49672d7_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-ha32ba9b_22.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.40.33810-hcc2c482_22.conda default: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -484,6 +505,17 @@ packages: license: ISC size: 154517 timestamp: 1720077468981 +- kind: conda + name: ca-certificates + version: 2024.8.30 + build: hbcca054_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + sha256: afee721baa6d988e27fef1832f68d6f32ac8cc99cdf6015732224c2841a09cea + md5: c27d1c142233b5bc9ca570c6e2e0c244 + license: ISC + size: 159003 + timestamp: 1725018903918 - kind: conda name: colorama version: 0.4.6 @@ -726,6 +758,25 @@ packages: license_family: MIT size: 42063 timestamp: 1636489106777 +- kind: conda + name: libgcc + version: 14.1.0 + build: h77fa898_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.1.0-h77fa898_1.conda + sha256: 10fa74b69266a2be7b96db881e18fa62cfa03082b65231e8d652e897c4b335a3 + md5: 002ef4463dd1e2b44a94a4ace468f5d2 + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.1.0 h77fa898_1 + - libgcc-ng ==14.1.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 846380 + timestamp: 1724801836552 - kind: conda name: libgcc-devel_linux-64 version: 14.1.0 @@ -773,6 +824,21 @@ packages: license_family: GPL size: 456925 timestamp: 1719538796073 +- kind: conda + name: libgomp + version: 14.1.0 + build: h77fa898_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.1.0-h77fa898_1.conda + sha256: c96724c8ae4ee61af7674c5d9e5a3fbcf6cd887a40ad5a52c99aa36f1d4f9680 + md5: 23c255b008c4f2ae008f81edcabaca89 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460218 + timestamp: 1724801743478 - kind: conda name: libnsl version: 2.0.1 @@ -1081,6 +1147,22 @@ packages: license_family: Apache size: 2899682 timestamp: 1721194599446 +- kind: conda + name: openssl + version: 3.3.2 + build: hb9d3cd8_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda + sha256: cee91036686419f6dd6086902acf7142b4916e1c4ba042e9ca23e151da012b6d + md5: 4d638782050ab6faa27275bed57e9b4e + depends: + - __glibc >=2.17,<3.0.a0 + - ca-certificates + - libgcc >=13 + license: Apache-2.0 + license_family: Apache + size: 2891789 + timestamp: 1725410790053 - kind: conda name: packaging version: '24.1' @@ -1507,6 +1589,67 @@ packages: license_family: BSD size: 6785 timestamp: 1695147430513 +- kind: conda + name: rattler-build + version: 0.25.0 + build: h481ae1d_0 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.25.0-h481ae1d_0.conda + sha256: 5a74123ea7b1aa47dc05da2630a7ae276e4443b5bffe0955b3184c5c6706e1df + md5: 9060951c13c9d94bbc64a3dc16c90127 + depends: + - __osx >=11.0 + constrains: + - __osx >=11.0 + license: BSD-3-Clause + size: 8494918 + timestamp: 1728541224954 +- kind: conda + name: rattler-build + version: 0.25.0 + build: h49672d7_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.25.0-h49672d7_0.conda + sha256: fa7d29c34207ac22b502d4e2ef7eba46f7dd6beed5b39003fd185c8c2b42849e + md5: 39602de643f80ace40e4187dfe46bdbc + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.40.33810 + license: BSD-3-Clause + size: 8362824 + timestamp: 1728542153630 +- kind: conda + name: rattler-build + version: 0.25.0 + build: h51b9b6e_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.25.0-h51b9b6e_0.conda + sha256: b21730300242e8239f473e3b82ac4da56acf18039ef6b92f3da17d9f49eedd1f + md5: 31b6897a8da32e8d833a843cc4915c5b + depends: + - __glibc >=2.17,<3.0.a0 + - openssl >=3.3.2,<4.0a0 + constrains: + - __glibc >=2.17 + license: BSD-3-Clause + size: 10515299 + timestamp: 1728541104058 +- kind: conda + name: rattler-build + version: 0.25.0 + build: hf141a1a_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.25.0-hf141a1a_0.conda + sha256: 2d76032a416201db074925f204e3208f99cc1598de4aeee9d798cfc4fbec0b33 + md5: f52899f7fb0660dcf74bfa941652cfae + depends: + - __osx >=10.13 + constrains: + - __osx >=10.13 + license: BSD-3-Clause + size: 8858758 + timestamp: 1728541030042 - kind: conda name: readline version: '8.2' @@ -1911,6 +2054,20 @@ packages: license_family: PROPRIETARY size: 1283972 timestamp: 1666630199266 +- kind: conda + name: ucrt + version: 10.0.22621.0 + build: h57928b3_1 + build_number: 1 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda + sha256: db8dead3dd30fb1a032737554ce91e2819b43496a0db09927edf01c32b577450 + md5: 6797b005cd0f439c4c5c9ac565783700 + constrains: + - vs2015_runtime >=14.29.30037 + license: LicenseRef-MicrosoftWindowsSDK10 + size: 559710 + timestamp: 1728377334097 - kind: conda name: vc version: '14.3' @@ -1928,6 +2085,23 @@ packages: license_family: BSD size: 17391 timestamp: 1717709040616 +- kind: conda + name: vc + version: '14.3' + build: ha32ba9b_22 + build_number: 22 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-ha32ba9b_22.conda + sha256: 2a47c5bd8bec045959afada7063feacd074ad66b170c1ea92dd139b389fcf8fd + md5: 311c9ba1dfdd2895a8cb08346ff26259 + depends: + - vc14_runtime >=14.38.33135 + track_features: + - vc14 + license: BSD-3-Clause + license_family: BSD + size: 17447 + timestamp: 1728400826998 - kind: conda name: vc14_runtime version: 14.40.33810 @@ -1945,6 +2119,23 @@ packages: license_family: Proprietary size: 751934 timestamp: 1717709031266 +- kind: conda + name: vc14_runtime + version: 14.40.33810 + build: hcc2c482_22 + build_number: 22 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.40.33810-hcc2c482_22.conda + sha256: 4c669c65007f88a7cdd560192f7e6d5679d191ac71610db724e18b2410964d64 + md5: ce23a4b980ee0556a118ed96550ff3f3 + depends: + - ucrt >=10.0.20348.0 + constrains: + - vs2015_runtime 14.40.33810.* *_22 + license: LicenseRef-MicrosoftVisualCpp2015-2022Runtime + license_family: Proprietary + size: 750719 + timestamp: 1728401055788 - kind: conda name: vs2015_runtime version: 14.40.33810 diff --git a/pixi.toml b/pixi.toml index 27a10da..c66a3a6 100644 --- a/pixi.toml +++ b/pixi.toml @@ -46,10 +46,13 @@ pytest = ">=8.3.2,<9" [feature.test.tasks] integration-test = { cmd = "pytest tests", depends-on = "build" } -[feature.schema.dependencies] +[feature.schema.dependencies] pydantic = ">=2.8.2,<3" ruff = ">=0.5.7,<0.6" +[feature.build-self.dependencies] +rattler-build = ">=0.25.0,<1" + [feature.schema.tasks] generate-schema = "python schema/model.py > schema/schema.json" fmt-schema = "ruff format schema" @@ -58,3 +61,4 @@ lint-schema = "ruff check schema --fix" [environments] test = ["test"] schema = { no-default-feature = true, features = ["schema"] } +build-self = { no-default-feature = true, features = ["build-self"] } diff --git a/recipe.yaml b/recipe.yaml new file mode 100644 index 0000000..1952953 --- /dev/null +++ b/recipe.yaml @@ -0,0 +1,38 @@ +recipe: + name: pixi-build + version: "0.0.1" + +source: + path: . + +cache: + requirements: + build: + - ${{ compiler("rust") }} + host: + - xz >=5.0, <6.0 + build: + script: + - if: unix + then: + - cargo install --locked --root $PREFIX --path crates/pixi-build --no-track --bins + else: + - cargo install --locked --root %PREFIX% --path crates/pixi-build --no-track --bins + +outputs: + - package: + name: pixi-build-python + build: + files: + - bin/pixi-build-python + tests: + - script: + - pixi-build-python --help + - package: + name: pixi-build-cmake + build: + files: + - bin/pixi-build-cmake + tests: + - script: + - pixi-build-cmake --help From bf49758700686fd998cc1ad45d1392bb6d0bb21d Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 13:38:36 +0200 Subject: [PATCH 02/26] fix: update ci --- .github/workflows/rattler-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 5286897..cfe10c4 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -25,8 +25,9 @@ jobs: with: pixi-version: v0.32.1 cache: true + environments: build-self - name: Run rattler-build env: TARGET_PLATFORM: ${{ matrix.target }} run: | - pixi -e build-self rattler-build build --output ${{ env.RUNNER_TEMP }} --target-platform ${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental + pixi --env build-self rattler-build build --output ${{ env.RUNNER_TEMP }} --target-platform ${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental From 9ccf628d9361103e3d9c4dc7b03d070697df671a Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 13:47:18 +0200 Subject: [PATCH 03/26] fix: rattler build --- .github/workflows/rattler-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index cfe10c4..16edd5a 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -27,7 +27,8 @@ jobs: cache: true environments: build-self - name: Run rattler-build + shell: bash env: TARGET_PLATFORM: ${{ matrix.target }} run: | - pixi --env build-self rattler-build build --output ${{ env.RUNNER_TEMP }} --target-platform ${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental + pixi r -e build-self rattler-build build --output=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental From c0986773c7e87fb9414665f0f3a6cdad2cc46658 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 13:52:41 +0200 Subject: [PATCH 04/26] fix: should be dir --- .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 16edd5a..1d5a4f7 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -31,4 +31,4 @@ jobs: env: TARGET_PLATFORM: ${{ matrix.target }} run: | - pixi r -e build-self rattler-build build --output=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental + pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental From 3e9ef793aa78a756428402fc9acf1396f39ed454 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 14:02:38 +0200 Subject: [PATCH 05/26] feat: add openssl --- recipe.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe.yaml b/recipe.yaml index 1952953..4445d86 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -11,6 +11,9 @@ cache: - ${{ compiler("rust") }} host: - xz >=5.0, <6.0 + - if: unix + then: openssl + build: script: - if: unix From e5a809563c6a6ef2384fb8fce3503a7e4f83716a Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 14:28:22 +0200 Subject: [PATCH 06/26] fix: long windows paths --- .github/workflows/rattler-build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 1d5a4f7..cf7e4bb 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -14,7 +14,7 @@ jobs: - { target: linux-64, os: ubuntu-20.04 } - { target: win-64, os: windows-latest } # force older macos-13 to get x86_64 runners - - { target: osx-64, os: macos-13 } + # - { target: osx-64, os: macos-13 } - { target: osx-arm64, os: macos-14 } fail-fast: false @@ -26,6 +26,12 @@ jobs: pixi-version: v0.32.1 cache: true environments: build-self + - name: Enable long paths + if: ${{ matrix.os == 'windows-latest' }} + run: | + New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -PropertyType DWord -Value 1 -Force + Write-Host "Long paths enabled" + shell: pwsh - name: Run rattler-build shell: bash env: From e2450fbd96a19b72841777edbfe5ca87d7fd5453 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 15:53:05 +0200 Subject: [PATCH 07/26] feat: git windows long paths --- .github/workflows/rattler-build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index cf7e4bb..42490e2 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -29,9 +29,8 @@ jobs: - name: Enable long paths if: ${{ matrix.os == 'windows-latest' }} run: | - New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -PropertyType DWord -Value 1 -Force - Write-Host "Long paths enabled" - shell: pwsh + git config --global core.longpaths true + shell: bash - name: Run rattler-build shell: bash env: From d725f934e4c7dad525b54947ba953e0f6cdac57c Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 16:09:26 +0200 Subject: [PATCH 08/26] fix: more windows specifics --- recipe.yaml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/recipe.yaml b/recipe.yaml index 4445d86..db7ba51 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -13,7 +13,7 @@ cache: - xz >=5.0, <6.0 - if: unix then: openssl - + build: script: - if: unix @@ -27,15 +27,31 @@ outputs: name: pixi-build-python build: files: - - bin/pixi-build-python + if: unix + then: + - bin/pixi-build-python + else: + - bin/pixi-build-python.exe tests: - script: - - pixi-build-python --help + if: unix + then: + - pixi-build-python --help + else: + - pixi-build-python.exe --help - package: name: pixi-build-cmake build: files: - - bin/pixi-build-cmake + if: unix + then: + - bin/pixi-build-cmake + else: + - bin/pixi-build-cmake.exe tests: - script: - - pixi-build-cmake --help + if: unix + then: + - pixi-build-cmake --help + else: + - pixi-build-cmake.exe --help From 26e6d3b27b7c718d225ee1624062fb43146cc22a Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 10 Oct 2024 20:13:38 +0200 Subject: [PATCH 09/26] fix: recipe --- recipe.yaml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/recipe.yaml b/recipe.yaml index db7ba51..871f0cf 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -27,31 +27,27 @@ outputs: name: pixi-build-python build: files: - if: unix - then: - - bin/pixi-build-python - else: - - bin/pixi-build-python.exe + - bin/pixi-build-python + - bin/pixi-build-python.exe tests: - - script: - if: unix - then: + - if: unix + then: + script: - pixi-build-python --help - else: + else: + script: - pixi-build-python.exe --help - package: name: pixi-build-cmake build: files: - if: unix - then: - - bin/pixi-build-cmake - else: - - bin/pixi-build-cmake.exe + - bin/pixi-build-cmake + - bin/pixi-build-cmake.exe tests: - - script: - if: unix - then: + - if: unix + then: + script: - pixi-build-cmake --help - else: + else: + script: - pixi-build-cmake.exe --help From 6d4e51690f0e59405719b2c158a1fde0b5833aff Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Mon, 14 Oct 2024 19:34:39 +0200 Subject: [PATCH 10/26] wip: uploading --- .github/workflows/rattler-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 42490e2..d0b8038 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -37,3 +37,14 @@ jobs: TARGET_PLATFORM: ${{ matrix.target }} run: | pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental + - name: Upload all packages + shell: bash + # do not upload on PR + if: github.event_name == 'push' + env: + PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }} + run: | + # ignore errors because we want to ignore duplicate packages + for file in $RUNNTER_TEMP/**/*.conda; do + rattler-build upload prefix -c pixi-build-backends "$file" + done From e55c7f673a2e4e100c8b6fc72339033061fdcbdd Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 15:36:14 +0100 Subject: [PATCH 11/26] feat: add oidc stuf --- .github/workflows/rattler-build.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index d0b8038..59acb09 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -31,6 +31,23 @@ jobs: run: | git config --global core.longpaths true shell: bash + - name: Get GitHub App Token + id: get_token + uses: actions/github-script@v6 + with: + script: | + const token = await core.getIDToken('prefix.dev') + core.setOutput('token', token) + - name: Validate JWT + run: | + TOKEN="${{ steps.get_token.outputs.token }}" + RESPONSE=$(curl -s -X POST \ + https://prefix.dev/api/oidc/mint_token \ + -H "Content-Type: application/json" \ + --data "{\"token\": \"$TOKEN\"}") + # mask the response + echo "::add-mask::$RESPONSE" + echo "PREFIX_API_KEY=$RESPONSE" >> $GITHUB_ENV - name: Run rattler-build shell: bash env: @@ -41,10 +58,9 @@ jobs: shell: bash # do not upload on PR if: github.event_name == 'push' - env: - PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }} run: | # ignore errors because we want to ignore duplicate packages - for file in $RUNNTER_TEMP/**/*.conda; do + for file in $RUNNER_TEMP/**/*.conda; do + echo "Uploading ${file}" rattler-build upload prefix -c pixi-build-backends "$file" done From 0a70043a5ebd1a4b238a73b3aff87506d6e01e9c Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 15:42:49 +0100 Subject: [PATCH 12/26] feat: add correct permissions --- .github/workflows/rattler-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 59acb09..a8d66eb 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -19,6 +19,9 @@ jobs: fail-fast: false runs-on: ${{ matrix.os }} + permissions: + id-token: write + contents: read steps: - uses: actions/checkout@v4 - uses: prefix-dev/setup-pixi@v0.5.1 From 72e67ca8410fae86e0447dc3fd73e7eb4aa489b3 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 15:52:19 +0100 Subject: [PATCH 13/26] fix: try again --- .github/workflows/rattler-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index a8d66eb..dcd567b 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -39,6 +39,7 @@ jobs: uses: actions/github-script@v6 with: script: | + const core = require('@actions/core') const token = await core.getIDToken('prefix.dev') core.setOutput('token', token) - name: Validate JWT From ce843d1b7c35a836a902016ae251135d2bfc8ff2 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 15:54:01 +0100 Subject: [PATCH 14/26] fix: .. --- .github/workflows/rattler-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index dcd567b..a8d66eb 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -39,7 +39,6 @@ jobs: uses: actions/github-script@v6 with: script: | - const core = require('@actions/core') const token = await core.getIDToken('prefix.dev') core.setOutput('token', token) - name: Validate JWT From abdf8f23006cb7ac0af1b46f297029e20b190428 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 15:58:21 +0100 Subject: [PATCH 15/26] fix: permissions per workflow --- .github/workflows/rattler-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index a8d66eb..875c06a 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -6,6 +6,10 @@ on: name: "Build Conda Package" +permissions: + id-token: write + contents: read + jobs: rattler-build: strategy: @@ -19,9 +23,6 @@ jobs: fail-fast: false runs-on: ${{ matrix.os }} - permissions: - id-token: write - contents: read steps: - uses: actions/checkout@v4 - uses: prefix-dev/setup-pixi@v0.5.1 From 1b426a20900961e065bbdf9b96a4bd19467423c2 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 16:04:47 +0100 Subject: [PATCH 16/26] feat: try without audience --- .github/workflows/rattler-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 875c06a..c45ad7b 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -35,12 +35,12 @@ jobs: run: | git config --global core.longpaths true shell: bash - - name: Get GitHub App Token + - name: Get GitHub ID Token id: get_token uses: actions/github-script@v6 with: script: | - const token = await core.getIDToken('prefix.dev') + const token = await core.getIDToken() core.setOutput('token', token) - name: Validate JWT run: | From 26a42019f54d1bc951da33b7718c2e3782fa1715 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 16:06:43 +0100 Subject: [PATCH 17/26] fix: remove token for now --- .github/workflows/rattler-build.yml | 36 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index c45ad7b..e6aa1da 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -35,23 +35,23 @@ jobs: run: | git config --global core.longpaths true shell: bash - - name: Get GitHub ID Token - id: get_token - uses: actions/github-script@v6 - with: - script: | - const token = await core.getIDToken() - core.setOutput('token', token) - - name: Validate JWT - run: | - TOKEN="${{ steps.get_token.outputs.token }}" - RESPONSE=$(curl -s -X POST \ - https://prefix.dev/api/oidc/mint_token \ - -H "Content-Type: application/json" \ - --data "{\"token\": \"$TOKEN\"}") - # mask the response - echo "::add-mask::$RESPONSE" - echo "PREFIX_API_KEY=$RESPONSE" >> $GITHUB_ENV + # - name: Get GitHub ID Token + # id: get_token + # uses: actions/github-script@v6 + # with: + # script: | + # const token = await core.getIDToken() + # core.setOutput('token', token) + # - name: Validate JWT + # run: | + # TOKEN="${{ steps.get_token.outputs.token }}" + # RESPONSE=$(curl -s -X POST \ + # https://prefix.dev/api/oidc/mint_token \ + # -H "Content-Type: application/json" \ + # --data "{\"token\": \"$TOKEN\"}") + # # mask the response + # echo "::add-mask::$RESPONSE" + # echo "PREFIX_API_KEY=$RESPONSE" >> $GITHUB_ENV - name: Run rattler-build shell: bash env: @@ -62,6 +62,8 @@ jobs: shell: bash # do not upload on PR if: github.event_name == 'push' + env: + PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }} run: | # ignore errors because we want to ignore duplicate packages for file in $RUNNER_TEMP/**/*.conda; do From 6e7111158b04dd103ff7a2fa4e85820c45f483e1 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 16:30:21 +0100 Subject: [PATCH 18/26] feat: create version on the flow and use oidc --- .github/workflows/rattler-build.yml | 56 ++++++++++++++++++----------- recipe.yaml | 2 +- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index e6aa1da..8388b52 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -9,9 +9,24 @@ name: "Build Conda Package" permissions: id-token: write contents: read - jobs: + generate_version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.set_version.outputs.version }} + steps: + - name: Set up datetime + id: datetime + run: echo "datetime=$(date -u +'%Y%m%d%H%M%S')" >> $GITHUB_ENV + - name: Set version + id: set_version + run: | + VERSION="0.1.0dev${{ env.datetime }}" + echo "Generated version: $VERSION" + echo "::set-output name=version::$VERSION" + rattler-build: + needs: generate_version strategy: matrix: include: @@ -35,35 +50,36 @@ jobs: run: | git config --global core.longpaths true shell: bash - # - name: Get GitHub ID Token - # id: get_token - # uses: actions/github-script@v6 - # with: - # script: | - # const token = await core.getIDToken() - # core.setOutput('token', token) - # - name: Validate JWT - # run: | - # TOKEN="${{ steps.get_token.outputs.token }}" - # RESPONSE=$(curl -s -X POST \ - # https://prefix.dev/api/oidc/mint_token \ - # -H "Content-Type: application/json" \ - # --data "{\"token\": \"$TOKEN\"}") - # # mask the response - # echo "::add-mask::$RESPONSE" - # echo "PREFIX_API_KEY=$RESPONSE" >> $GITHUB_ENV + - name: Get GitHub App Token + if: github.event_name == 'push' + id: get_token + uses: actions/github-script@v6 + with: + script: | + const token = await core.getIDToken('prefix.dev') + core.setOutput('token', token) + - name: Validate JWT + if: github.event_name == 'push' + run: | + TOKEN="${{ steps.get_token.outputs.token }}" + RESPONSE=$(curl -s -X POST \ + https://prefix.dev/api/oidc/mint_token \ + -H "Content-Type: application/json" \ + --data "{\"token\": \"$TOKEN\"}") + # mask the response + echo "::add-mask::$RESPONSE" + echo "PREFIX_API_KEY=$RESPONSE" >> $GITHUB_ENV - name: Run rattler-build shell: bash env: TARGET_PLATFORM: ${{ matrix.target }} + RECIPE_VERSION: ${{ needs.generate_version.outputs.version }} run: | pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental - name: Upload all packages shell: bash # do not upload on PR if: github.event_name == 'push' - env: - PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }} run: | # ignore errors because we want to ignore duplicate packages for file in $RUNNER_TEMP/**/*.conda; do diff --git a/recipe.yaml b/recipe.yaml index 871f0cf..b5096da 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -1,6 +1,6 @@ recipe: name: pixi-build - version: "0.0.1" + version: "${{ env.get('RECIPE_VERSION', default='0.1.0dev') }}" source: path: . From 73324418d5dcc5f85d50930daed7adde48a2109a Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 16:35:47 +0100 Subject: [PATCH 19/26] fix: modernize setting of output --- .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 8388b52..53c7ba6 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -23,7 +23,7 @@ jobs: run: | VERSION="0.1.0dev${{ env.datetime }}" echo "Generated version: $VERSION" - echo "::set-output name=version::$VERSION" + echo "version=$VERSION" >> $GITHUB_OUTPUT rattler-build: needs: generate_version From f504986794edbd62715f7e2ba4d27f43258654a3 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 16:48:12 +0100 Subject: [PATCH 20/26] fix: latest rattler-build --- pixi.lock | 84 ++++++++++++++++++++++++++++++------------------------- pixi.toml | 2 +- 2 files changed, 47 insertions(+), 39 deletions(-) diff --git a/pixi.lock b/pixi.lock index 96fc0bc..79759e7 100644 --- a/pixi.lock +++ b/pixi.lock @@ -11,13 +11,13 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.1.0-h77fa898_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.1.0-h77fa898_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.25.0-h51b9b6e_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.29.0-h51b9b6e_1.conda osx-64: - - conda: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.25.0-hf141a1a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.29.0-h0f13631_1.conda osx-arm64: - - conda: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.25.0-h481ae1d_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.29.0-hcbb27f7_1.conda win-64: - - conda: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.25.0-h49672d7_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.29.0-h49672d7_1.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda - conda: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-ha32ba9b_22.conda - conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.40.33810-hcc2c482_22.conda @@ -1591,65 +1591,73 @@ packages: timestamp: 1695147430513 - kind: conda name: rattler-build - version: 0.25.0 - build: h481ae1d_0 - subdir: osx-arm64 - url: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.25.0-h481ae1d_0.conda - sha256: 5a74123ea7b1aa47dc05da2630a7ae276e4443b5bffe0955b3184c5c6706e1df - md5: 9060951c13c9d94bbc64a3dc16c90127 + version: 0.29.0 + build: h0f13631_1 + build_number: 1 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.29.0-h0f13631_1.conda + sha256: 6875685f716aba0359cc4bbb019094f4579d271c466471ab255b6d37e0948824 + md5: 83972ed46e475924db21df623f45ce1f depends: - - __osx >=11.0 + - __osx >=10.13 constrains: - - __osx >=11.0 + - __osx >=10.13 license: BSD-3-Clause - size: 8494918 - timestamp: 1728541224954 + license_family: BSD + size: 8775271 + timestamp: 1731020686511 - kind: conda name: rattler-build - version: 0.25.0 - build: h49672d7_0 + version: 0.29.0 + build: h49672d7_1 + build_number: 1 subdir: win-64 - url: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.25.0-h49672d7_0.conda - sha256: fa7d29c34207ac22b502d4e2ef7eba46f7dd6beed5b39003fd185c8c2b42849e - md5: 39602de643f80ace40e4187dfe46bdbc + url: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.29.0-h49672d7_1.conda + sha256: 90ef9b3a51bb8fef0ef481b4a710c3c5042d3dd3240e62613dc7a35bf5c4712b + md5: 20da1ed142dd2c94bacb123e7559384b depends: - ucrt >=10.0.20348.0 - vc >=14.3,<15 - vc14_runtime >=14.40.33810 license: BSD-3-Clause - size: 8362824 - timestamp: 1728542153630 + license_family: BSD + size: 8155169 + timestamp: 1731020976885 - kind: conda name: rattler-build - version: 0.25.0 - build: h51b9b6e_0 + version: 0.29.0 + build: h51b9b6e_1 + build_number: 1 subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.25.0-h51b9b6e_0.conda - sha256: b21730300242e8239f473e3b82ac4da56acf18039ef6b92f3da17d9f49eedd1f - md5: 31b6897a8da32e8d833a843cc4915c5b + url: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.29.0-h51b9b6e_1.conda + sha256: d1025ea35941d4c1f9dfd22f5bf1020df7fe9820952497dee589dbc7354743b5 + md5: 4a766dca206aa313dced0cdd09ac5986 depends: - __glibc >=2.17,<3.0.a0 - openssl >=3.3.2,<4.0a0 constrains: - __glibc >=2.17 license: BSD-3-Clause - size: 10515299 - timestamp: 1728541104058 + license_family: BSD + size: 10501872 + timestamp: 1731020232270 - kind: conda name: rattler-build - version: 0.25.0 - build: hf141a1a_0 - subdir: osx-64 - url: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.25.0-hf141a1a_0.conda - sha256: 2d76032a416201db074925f204e3208f99cc1598de4aeee9d798cfc4fbec0b33 - md5: f52899f7fb0660dcf74bfa941652cfae + version: 0.29.0 + build: hcbb27f7_1 + build_number: 1 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.29.0-hcbb27f7_1.conda + sha256: 40112184f5e80197905a845379043bfa99ee0f7a8c1f0a499bb7d098cee525dc + md5: 1a77e43b5c4eb9f8deb5c92f99eefbb1 depends: - - __osx >=10.13 + - __osx >=11.0 constrains: - - __osx >=10.13 + - __osx >=11.0 license: BSD-3-Clause - size: 8858758 - timestamp: 1728541030042 + license_family: BSD + size: 8435879 + timestamp: 1731020528776 - kind: conda name: readline version: '8.2' diff --git a/pixi.toml b/pixi.toml index c66a3a6..c5666c3 100644 --- a/pixi.toml +++ b/pixi.toml @@ -51,7 +51,7 @@ pydantic = ">=2.8.2,<3" ruff = ">=0.5.7,<0.6" [feature.build-self.dependencies] -rattler-build = ">=0.25.0,<1" +rattler-build = ">=0.29.0,<1" [feature.schema.tasks] generate-schema = "python schema/model.py > schema/schema.json" From 7fb329d48831a777102e1d68f37266c398951a08 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Tue, 12 Nov 2024 16:49:42 +0100 Subject: [PATCH 21/26] fix: can include recipe now --- .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 53c7ba6..7d3b637 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -75,7 +75,7 @@ jobs: TARGET_PLATFORM: ${{ matrix.target }} RECIPE_VERSION: ${{ needs.generate_version.outputs.version }} run: | - pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --no-include-recipe --experimental + pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --experimental - name: Upload all packages shell: bash # do not upload on PR From e4b5146c5737b8a172f9b7b678f14fea5f855b7d Mon Sep 17 00:00:00 2001 From: nichmor Date: Wed, 13 Nov 2024 18:27:38 +0200 Subject: [PATCH 22/26] misc: make recipe smaller --- recipe.yaml | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 recipe.yaml diff --git a/recipe.yaml b/recipe.yaml deleted file mode 100644 index b5096da..0000000 --- a/recipe.yaml +++ /dev/null @@ -1,53 +0,0 @@ -recipe: - name: pixi-build - version: "${{ env.get('RECIPE_VERSION', default='0.1.0dev') }}" - -source: - path: . - -cache: - requirements: - build: - - ${{ compiler("rust") }} - host: - - xz >=5.0, <6.0 - - if: unix - then: openssl - - build: - script: - - if: unix - then: - - cargo install --locked --root $PREFIX --path crates/pixi-build --no-track --bins - else: - - cargo install --locked --root %PREFIX% --path crates/pixi-build --no-track --bins - -outputs: - - package: - name: pixi-build-python - build: - files: - - bin/pixi-build-python - - bin/pixi-build-python.exe - tests: - - if: unix - then: - script: - - pixi-build-python --help - else: - script: - - pixi-build-python.exe --help - - package: - name: pixi-build-cmake - build: - files: - - bin/pixi-build-cmake - - bin/pixi-build-cmake.exe - tests: - - if: unix - then: - script: - - pixi-build-cmake --help - else: - script: - - pixi-build-cmake.exe --help From 0e9eefb5390c408542fbdcab598312ed25493121 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 14 Nov 2024 09:28:20 +0100 Subject: [PATCH 23/26] Revert "misc: make recipe smaller" This reverts commit e4b5146c5737b8a172f9b7b678f14fea5f855b7d. --- recipe.yaml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 recipe.yaml diff --git a/recipe.yaml b/recipe.yaml new file mode 100644 index 0000000..b5096da --- /dev/null +++ b/recipe.yaml @@ -0,0 +1,53 @@ +recipe: + name: pixi-build + version: "${{ env.get('RECIPE_VERSION', default='0.1.0dev') }}" + +source: + path: . + +cache: + requirements: + build: + - ${{ compiler("rust") }} + host: + - xz >=5.0, <6.0 + - if: unix + then: openssl + + build: + script: + - if: unix + then: + - cargo install --locked --root $PREFIX --path crates/pixi-build --no-track --bins + else: + - cargo install --locked --root %PREFIX% --path crates/pixi-build --no-track --bins + +outputs: + - package: + name: pixi-build-python + build: + files: + - bin/pixi-build-python + - bin/pixi-build-python.exe + tests: + - if: unix + then: + script: + - pixi-build-python --help + else: + script: + - pixi-build-python.exe --help + - package: + name: pixi-build-cmake + build: + files: + - bin/pixi-build-cmake + - bin/pixi-build-cmake.exe + tests: + - if: unix + then: + script: + - pixi-build-cmake --help + else: + script: + - pixi-build-cmake.exe --help From 2547f42c04d706e332d58c222e329870710c1e18 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 14 Nov 2024 09:48:00 +0100 Subject: [PATCH 24/26] feat: don't inlcude recipe again and use latest rattler-build with trusted publishing --- .github/workflows/rattler-build.yml | 21 +------ pixi.lock | 88 +++++++++++++---------------- pixi.toml | 2 +- 3 files changed, 42 insertions(+), 69 deletions(-) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index 7d3b637..f5853f6 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -50,32 +50,13 @@ jobs: run: | git config --global core.longpaths true shell: bash - - name: Get GitHub App Token - if: github.event_name == 'push' - id: get_token - uses: actions/github-script@v6 - with: - script: | - const token = await core.getIDToken('prefix.dev') - core.setOutput('token', token) - - name: Validate JWT - if: github.event_name == 'push' - run: | - TOKEN="${{ steps.get_token.outputs.token }}" - RESPONSE=$(curl -s -X POST \ - https://prefix.dev/api/oidc/mint_token \ - -H "Content-Type: application/json" \ - --data "{\"token\": \"$TOKEN\"}") - # mask the response - echo "::add-mask::$RESPONSE" - echo "PREFIX_API_KEY=$RESPONSE" >> $GITHUB_ENV - name: Run rattler-build shell: bash env: TARGET_PLATFORM: ${{ matrix.target }} RECIPE_VERSION: ${{ needs.generate_version.outputs.version }} run: | - pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --experimental + pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --experimental --no-include-recipe - name: Upload all packages shell: bash # do not upload on PR diff --git a/pixi.lock b/pixi.lock index 79759e7..f9b81ef 100644 --- a/pixi.lock +++ b/pixi.lock @@ -10,14 +10,14 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.1.0-h77fa898_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.1.0-h77fa898_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.29.0-h51b9b6e_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.4.0-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.30.0-h51b9b6e_0.conda osx-64: - - conda: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.29.0-h0f13631_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.30.0-h0f13631_0.conda osx-arm64: - - conda: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.29.0-hcbb27f7_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.30.0-hcbb27f7_0.conda win-64: - - conda: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.29.0-h49672d7_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.30.0-h49672d7_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda - conda: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-ha32ba9b_22.conda - conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.40.33810-hcc2c482_22.conda @@ -1149,20 +1149,20 @@ packages: timestamp: 1721194599446 - kind: conda name: openssl - version: 3.3.2 + version: 3.4.0 build: hb9d3cd8_0 subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda - sha256: cee91036686419f6dd6086902acf7142b4916e1c4ba042e9ca23e151da012b6d - md5: 4d638782050ab6faa27275bed57e9b4e + url: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.4.0-hb9d3cd8_0.conda + sha256: 814b9dff1847b132c676ee6cc1a8cb2d427320779b93e1b6d76552275c128705 + md5: 23cc74f77eb99315c0360ec3533147a9 depends: - __glibc >=2.17,<3.0.a0 - ca-certificates - libgcc >=13 license: Apache-2.0 license_family: Apache - size: 2891789 - timestamp: 1725410790053 + size: 2947466 + timestamp: 1731377666602 - kind: conda name: packaging version: '24.1' @@ -1591,73 +1591,65 @@ packages: timestamp: 1695147430513 - kind: conda name: rattler-build - version: 0.29.0 - build: h0f13631_1 - build_number: 1 + version: 0.30.0 + build: h0f13631_0 subdir: osx-64 - url: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.29.0-h0f13631_1.conda - sha256: 6875685f716aba0359cc4bbb019094f4579d271c466471ab255b6d37e0948824 - md5: 83972ed46e475924db21df623f45ce1f + url: https://conda.anaconda.org/conda-forge/osx-64/rattler-build-0.30.0-h0f13631_0.conda + sha256: 7464dbb5fab6379fa31eee92eedf89f416c89eb1126da7c1ba0388dfb7e001e7 + md5: 95052326bbc60b7ab594f20f8270d6c4 depends: - __osx >=10.13 constrains: - __osx >=10.13 license: BSD-3-Clause - license_family: BSD - size: 8775271 - timestamp: 1731020686511 + size: 9407893 + timestamp: 1731526205579 - kind: conda name: rattler-build - version: 0.29.0 - build: h49672d7_1 - build_number: 1 + version: 0.30.0 + build: h49672d7_0 subdir: win-64 - url: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.29.0-h49672d7_1.conda - sha256: 90ef9b3a51bb8fef0ef481b4a710c3c5042d3dd3240e62613dc7a35bf5c4712b - md5: 20da1ed142dd2c94bacb123e7559384b + url: https://conda.anaconda.org/conda-forge/win-64/rattler-build-0.30.0-h49672d7_0.conda + sha256: 8062545bdb8bfbb2f9fcad50ed351dd9d7e8ffd6d1f0f9b780470e75b7fe7453 + md5: a9a787b7bbca5dc616d9d7a6107e19c3 depends: - ucrt >=10.0.20348.0 - vc >=14.3,<15 - vc14_runtime >=14.40.33810 license: BSD-3-Clause - license_family: BSD - size: 8155169 - timestamp: 1731020976885 + size: 8763513 + timestamp: 1731526824710 - kind: conda name: rattler-build - version: 0.29.0 - build: h51b9b6e_1 - build_number: 1 + version: 0.30.0 + build: h51b9b6e_0 subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.29.0-h51b9b6e_1.conda - sha256: d1025ea35941d4c1f9dfd22f5bf1020df7fe9820952497dee589dbc7354743b5 - md5: 4a766dca206aa313dced0cdd09ac5986 + url: https://conda.anaconda.org/conda-forge/linux-64/rattler-build-0.30.0-h51b9b6e_0.conda + sha256: fb471e1a48ccabf3a02bf0fa55e5244f7ac24d7389c0e0c3a789a9281f38a9ca + md5: 8539ad5b9b7110dc2ae71fde6fc2cbfa depends: - __glibc >=2.17,<3.0.a0 - - openssl >=3.3.2,<4.0a0 + - openssl >=3.4.0,<4.0a0 constrains: - __glibc >=2.17 license: BSD-3-Clause - license_family: BSD - size: 10501872 - timestamp: 1731020232270 + size: 11095892 + timestamp: 1731526073863 - kind: conda name: rattler-build - version: 0.29.0 - build: hcbb27f7_1 - build_number: 1 + version: 0.30.0 + build: hcbb27f7_0 subdir: osx-arm64 - url: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.29.0-hcbb27f7_1.conda - sha256: 40112184f5e80197905a845379043bfa99ee0f7a8c1f0a499bb7d098cee525dc - md5: 1a77e43b5c4eb9f8deb5c92f99eefbb1 + url: https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.30.0-hcbb27f7_0.conda + sha256: c82164b88fbd170a43677162e9ac05e1abd27baa9ed183521f4aebc9fe3e750b + md5: 3663fabf851630e7b69701ec24e82fc3 depends: - __osx >=11.0 constrains: - __osx >=11.0 license: BSD-3-Clause - license_family: BSD - size: 8435879 - timestamp: 1731020528776 + size: 9016081 + timestamp: 1731526590561 - kind: conda name: readline version: '8.2' diff --git a/pixi.toml b/pixi.toml index c5666c3..b903b34 100644 --- a/pixi.toml +++ b/pixi.toml @@ -51,7 +51,7 @@ pydantic = ">=2.8.2,<3" ruff = ">=0.5.7,<0.6" [feature.build-self.dependencies] -rattler-build = ">=0.29.0,<1" +rattler-build = ">=0.30.0,<1" [feature.schema.tasks] generate-schema = "python schema/model.py > schema/schema.json" From 4d84f7048bb98b1eecdfe8f362d6c630915c2855 Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Thu, 14 Nov 2024 10:17:26 +0100 Subject: [PATCH 25/26] feat: recipe in different sub-folder --- .github/workflows/rattler-build.yml | 2 +- recipe.yaml => recipe/recipe.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename recipe.yaml => recipe/recipe.yaml (99%) diff --git a/.github/workflows/rattler-build.yml b/.github/workflows/rattler-build.yml index f5853f6..5a6cfb1 100644 --- a/.github/workflows/rattler-build.yml +++ b/.github/workflows/rattler-build.yml @@ -56,7 +56,7 @@ jobs: TARGET_PLATFORM: ${{ matrix.target }} RECIPE_VERSION: ${{ needs.generate_version.outputs.version }} run: | - pixi r -e build-self rattler-build build --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --experimental --no-include-recipe + pixi r -e build-self rattler-build build --recipe recipe/recipe.yaml --output-dir=$RUNNER_TEMP --target-platform=${{ env.TARGET_PLATFORM }} --experimental - name: Upload all packages shell: bash # do not upload on PR diff --git a/recipe.yaml b/recipe/recipe.yaml similarity index 99% rename from recipe.yaml rename to recipe/recipe.yaml index b5096da..50d2223 100644 --- a/recipe.yaml +++ b/recipe/recipe.yaml @@ -3,7 +3,7 @@ recipe: version: "${{ env.get('RECIPE_VERSION', default='0.1.0dev') }}" source: - path: . + path: .. cache: requirements: From ac5a4a48224a978a72b3bf4a434c8c6fc1374668 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Thu, 14 Nov 2024 10:52:38 +0100 Subject: [PATCH 26/26] fix: remove special windows handling --- recipe/recipe.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 50d2223..d01f8a0 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -30,13 +30,7 @@ outputs: - bin/pixi-build-python - bin/pixi-build-python.exe tests: - - if: unix - then: - script: - - pixi-build-python --help - else: - script: - - pixi-build-python.exe --help + - script: pixi-build-python --help - package: name: pixi-build-cmake build: @@ -44,10 +38,4 @@ outputs: - bin/pixi-build-cmake - bin/pixi-build-cmake.exe tests: - - if: unix - then: - script: - - pixi-build-cmake --help - else: - script: - - pixi-build-cmake.exe --help + - script: pixi-build-cmake --help