Skip to content

Commit 51ee6d9

Browse files
committed
fix: unset linker on osx-64 and move to rattler-build recipes
- unset linker on osx-64 because of rust-lang/rust#140686 - move to recipes, since we can't unset env vars
1 parent 629b5ac commit 51ee6d9

File tree

10 files changed

+145
-103
lines changed

10 files changed

+145
-103
lines changed

.github/workflows/rattler-build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,30 +63,31 @@ jobs:
6363
run: |
6464
git config --global core.longpaths true
6565
shell: bash
66+
- name: Set environment variable for recipe version
67+
shell: bash
68+
run: |
69+
echo "${{ matrix.bins.env_name }}=${{ matrix.bins.version }}" >> $GITHUB_ENV
6670
- name: Build ${{ matrix.bins.bin }}
6771
shell: bash
6872
env:
6973
TARGET_PLATFORM: ${{ matrix.bins.target }}
7074
RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true"
7175
RATTLER_BUILD_COLOR: "always"
72-
# set the secret for the sccache depot
73-
SCCACHE_WEBDAV_ENDPOINT: ${{ secrets.SCCACHE_WEBDAV_ENDPOINT }}
74-
SCCACHE_WEBDAV_TOKEN: ${{ secrets.SCCACHE_WEBDAV_TOKEN }}
7576
run: |
76-
pixi run build-package --manifest-path crates/${{ matrix.bins.crate_name }} --target-platform=${{ env.TARGET_PLATFORM }}
77+
pixi run build-recipe --recipe recipe/${{ matrix.bins.bin }}.yaml --target-platform=${{ env.TARGET_PLATFORM }}
7778
- name: Upload OSX or Linux packages
7879
shell: bash
7980
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.bins.os != 'windows-latest' && github.repository == env.REPO_NAME }}
8081
run: |
81-
for file in "$RUNNER_TEMP"/*.conda; do
82+
for file in "$RUNNER_TEMP"/**/*.conda; do
8283
echo "Uploading ${file}"
8384
pixi run -e build rattler-build upload prefix -c pixi-build-backends "$file"
8485
done
8586
- name: Upload Windows packages
8687
shell: pwsh
8788
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.bins.os == 'windows-latest' && github.repository == env.REPO_NAME }}
8889
run: |
89-
Get-ChildItem -Path $env:RUNNER_TEMP -Filter *.conda | ForEach-Object {
90+
Get-ChildItem -Path $env:RUNNER_TEMP -Filter *.conda -Recurse | ForEach-Object {
9091
Write-Host "Uploading $($_.FullName)"
9192
pixi run -e build rattler-build upload prefix -c pixi-build-backends "$($_.FullName)"
9293
}

crates/pixi-build-cmake/pixi.toml

Lines changed: 0 additions & 24 deletions
This file was deleted.

crates/pixi-build-python/pixi.toml

Lines changed: 0 additions & 24 deletions
This file was deleted.

crates/pixi-build-rattler-build/pixi.toml

Lines changed: 0 additions & 24 deletions
This file was deleted.

crates/pixi-build-rust/pixi.toml

Lines changed: 0 additions & 24 deletions
This file was deleted.

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ruff = ">=0.5.7,<0.6"
7070
rattler-build = ">=0.30.0,<1"
7171

7272
[feature.build.tasks]
73-
build-package = "pixi build --output-dir=$RUNNER_TEMP --build-dir=$RUNNER_TEMP"
73+
build-recipe = "rattler-build build --output-dir=$RUNNER_TEMP --experimental --test native"
7474

7575
[feature.schema.tasks]
7676
generate-schema = "python schema/model.py > schema/schema.json"

recipe/pixi-build-cmake.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package:
2+
name: pixi-build-cmake
3+
version: "${{ env.get('PIXI_BUILD_CMAKE_VERSION', default='0.1.0dev') }}"
4+
5+
source:
6+
path: ..
7+
8+
requirements:
9+
build:
10+
- ${{ compiler("rust") }}
11+
host:
12+
- xz >=5.0, <6.0
13+
- if: unix
14+
then: openssl
15+
16+
build:
17+
script:
18+
- if: osx and x86_64
19+
then:
20+
# use the default linker for osx-64 as we are hitting a bug with the conda-forge linker
21+
- unset CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER
22+
23+
- if: unix
24+
then:
25+
- export OPENSSL_DIR="$PREFIX"
26+
- cargo install --locked --root $PREFIX --path crates/pixi-build-cmake --no-track
27+
else:
28+
- cargo install --locked --root %PREFIX% --path crates/pixi-build-cmake --no-track
29+
files:
30+
- bin/pixi-build-cmake
31+
- bin/pixi-build-cmake.exe
32+
33+
tests:
34+
- script: pixi-build-cmake --help

recipe/pixi-build-python.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package:
2+
name: pixi-build-python
3+
version: "${{ env.get('PIXI_BUILD_PYTHON_VERSION', default='0.1.0dev') }}"
4+
5+
source:
6+
path: ..
7+
8+
requirements:
9+
build:
10+
- ${{ compiler("rust") }}
11+
host:
12+
- xz >=5.0, <6.0
13+
- if: unix
14+
then: openssl
15+
16+
build:
17+
script:
18+
- if: osx and x86_64
19+
then:
20+
# use the default linker for osx-64 as we are hitting a bug with the conda-forge linker
21+
- unset CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER
22+
23+
- if: unix
24+
then:
25+
- export OPENSSL_DIR="$PREFIX"
26+
- cargo install --locked --root $PREFIX --path crates/pixi-build-python --no-track
27+
else:
28+
- cargo install --locked --root %PREFIX% --path crates/pixi-build-python --no-track
29+
files:
30+
- bin/pixi-build-python
31+
- bin/pixi-build-python.exe
32+
33+
tests:
34+
- script: pixi-build-python --help

recipe/pixi-build-rattler-build.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package:
2+
name: pixi-build-rattler-build
3+
version: "${{ env.get('PIXI_BUILD_RATTLER_BUILD_VERSION', default='0.1.0dev') }}"
4+
5+
source:
6+
path: ..
7+
8+
requirements:
9+
build:
10+
- ${{ compiler("rust") }}
11+
host:
12+
- xz >=5.0, <6.0
13+
- if: unix
14+
then: openssl
15+
16+
build:
17+
script:
18+
- if: osx and x86_64
19+
then:
20+
# use the default linker for osx-64 as we are hitting a bug with the conda-forge linker
21+
- unset CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER
22+
23+
- if: unix
24+
then:
25+
- export OPENSSL_DIR="$PREFIX"
26+
- cargo install --locked --root $PREFIX --path crates/pixi-build-rattler-build --no-track
27+
else:
28+
- cargo install --locked --root %PREFIX% --path crates/pixi-build-rattler-build --no-track
29+
files:
30+
- bin/pixi-build-rattler-build
31+
- bin/pixi-build-rattler-build.exe
32+
33+
tests:
34+
- script: pixi-build-rattler-build --help

recipe/pixi-build-rust.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package:
2+
name: pixi-build-rust
3+
version: "${{ env.get('PIXI_BUILD_RUST_VERSION', default='0.1.0dev') }}"
4+
5+
source:
6+
path: ..
7+
8+
requirements:
9+
build:
10+
- ${{ compiler("rust") }}
11+
host:
12+
- xz >=5.0, <6.0
13+
- zlib
14+
- if: unix
15+
then: openssl
16+
17+
build:
18+
script:
19+
- if: osx and x86_64
20+
then:
21+
# use the default linker for osx-64 as we are hitting a bug with the conda-forge linker
22+
- unset CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER
23+
24+
- if: unix
25+
then:
26+
- export OPENSSL_DIR="$PREFIX"
27+
- cargo install --locked --root $PREFIX --path crates/pixi-build-rust --no-track
28+
else:
29+
- cargo install --locked --root %PREFIX% --path crates/pixi-build-rust --no-track
30+
files:
31+
- bin/pixi-build-rust
32+
- bin/pixi-build-rust.exe
33+
34+
tests:
35+
- script: pixi-build-rust --help

0 commit comments

Comments
 (0)