Skip to content

Commit b181d10

Browse files
authored
ci: move temporarily to recipe build (#148)
1 parent 5265d00 commit b181d10

File tree

9 files changed

+161
-12
lines changed

9 files changed

+161
-12
lines changed

.github/workflows/rattler-build.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
- "pixi-build-rust-v[0-9]+.[0-9]+.[0-9]+"
99
# Build all backends on main branch
1010
branches: [main]
11-
workflow_dispatch:
12-
1311

1412
name: "Build and publish pixi builds backends as conda packages"
1513

@@ -63,30 +61,31 @@ jobs:
6361
run: |
6462
git config --global core.longpaths true
6563
shell: bash
64+
- name: Set environment variable for recipe version
65+
shell: bash
66+
run: |
67+
echo "${{ matrix.bins.env_name }}=${{ matrix.bins.version }}" >> $GITHUB_ENV
6668
- name: Build ${{ matrix.bins.bin }}
6769
shell: bash
6870
env:
6971
TARGET_PLATFORM: ${{ matrix.bins.target }}
7072
RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true"
7173
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 }}
7574
run: |
76-
pixi run build-package --manifest-path crates/${{ matrix.bins.crate_name }} --target-platform=${{ env.TARGET_PLATFORM }}
75+
pixi run build-recipe --recipe recipe/${{ matrix.bins.recipe_name }}.yaml --target-platform=${{ env.TARGET_PLATFORM }}
7776
- name: Upload OSX or Linux packages
7877
shell: bash
7978
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.bins.os != 'windows-latest' && github.repository == env.REPO_NAME }}
8079
run: |
81-
for file in "$RUNNER_TEMP"/*.conda; do
80+
for file in "$RUNNER_TEMP"/**/*.conda; do
8281
echo "Uploading ${file}"
8382
pixi run -e build rattler-build upload prefix -c pixi-build-backends "$file"
8483
done
8584
- name: Upload Windows packages
8685
shell: pwsh
8786
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.bins.os == 'windows-latest' && github.repository == env.REPO_NAME }}
8887
run: |
89-
Get-ChildItem -Path $env:RUNNER_TEMP -Filter *.conda | ForEach-Object {
88+
Get-ChildItem -Path $env:RUNNER_TEMP -Filter *.conda -Recurse | ForEach-Object {
9089
Write-Host "Uploading $($_.FullName)"
9190
pixi run -e build rattler-build upload prefix -c pixi-build-backends "$($_.FullName)"
9291
}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pixi-build-rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pixi-build-rust"
3-
version = "0.1.9"
3+
version = "0.1.10"
44
edition.workspace = true
55

66
[dependencies]

crates/pixi-build-rust/pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ preview = ["pixi-build"]
1010
authors = ["Nichita Morcotilo <nichita@prefix.dev>"]
1111
description = "Showcases how to build a rust project with pixi"
1212
name = "pixi-build-rust"
13-
version = "0.1.9"
13+
version = "0.1.10"
1414

1515

1616
[dependencies]

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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package:
2+
name: pixi-build-cmake
3+
version: "${{ env.get('PIXI_BUILD_CMAKE_VERSION', default='0.1.0dev') }}"
4+
5+
# cache:
6+
# source:
7+
# path: ..
8+
# requirements:
9+
# build:
10+
# - ${{ compiler("rust") }}
11+
# host:
12+
# - xz >=5.0, <6.0
13+
# - if: unix
14+
# then: openssl
15+
16+
source:
17+
path: ..
18+
19+
requirements:
20+
build:
21+
- ${{ compiler("rust") }}
22+
host:
23+
- xz >=5.0, <6.0
24+
- if: unix
25+
then: openssl
26+
27+
28+
build:
29+
script:
30+
- if: unix
31+
then:
32+
- export OPENSSL_DIR="$PREFIX"
33+
- cargo install --locked --root $PREFIX --path crates/pixi-build-cmake --no-track
34+
else:
35+
- cargo install --locked --root %PREFIX% --path crates/pixi-build-cmake --no-track
36+
files:
37+
- bin/pixi-build-cmake
38+
- bin/pixi-build-cmake.exe
39+
40+
tests:
41+
- script: pixi-build-cmake --help

recipe/pixi_build_python.yaml

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

recipe/pixi_build_rattler_build.yaml

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

recipe/pixi_build_rust.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
- if: unix
14+
then: openssl
15+
16+
build:
17+
script:
18+
- if: unix
19+
then:
20+
- export OPENSSL_DIR="$PREFIX"
21+
- cargo install --locked --root $PREFIX --path crates/pixi-build-rust --no-track
22+
else:
23+
- cargo install --locked --root %PREFIX% --path crates/pixi-build-rust --no-track
24+
files:
25+
- bin/pixi-build-rust
26+
- bin/pixi-build-rust.exe
27+
28+
tests:
29+
- script: pixi-build-rust --help

0 commit comments

Comments
 (0)