Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build with rattler-build #9

Merged
merged 27 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
18893a4
wip: build with rattler-build
tdejager Oct 10, 2024
bf49758
fix: update ci
tdejager Oct 10, 2024
9ccf628
fix: rattler build
tdejager Oct 10, 2024
c098677
fix: should be dir
tdejager Oct 10, 2024
3e9ef79
feat: add openssl
tdejager Oct 10, 2024
e5a8095
fix: long windows paths
tdejager Oct 10, 2024
e2450fb
feat: git windows long paths
tdejager Oct 10, 2024
d725f93
fix: more windows specifics
tdejager Oct 10, 2024
26e6d3b
fix: recipe
tdejager Oct 10, 2024
6d4e516
wip: uploading
tdejager Oct 14, 2024
2a963be
Merge branch 'prefix-dev:main' into feat/build-with-rattler
tdejager Nov 12, 2024
e55c7f6
feat: add oidc stuf
tdejager Nov 12, 2024
0a70043
feat: add correct permissions
tdejager Nov 12, 2024
72e67ca
fix: try again
tdejager Nov 12, 2024
ce843d1
fix: ..
tdejager Nov 12, 2024
abdf8f2
fix: permissions per workflow
tdejager Nov 12, 2024
1b426a2
feat: try without audience
tdejager Nov 12, 2024
26a4201
fix: remove token for now
tdejager Nov 12, 2024
6e71111
feat: create version on the flow and use oidc
tdejager Nov 12, 2024
7332441
fix: modernize setting of output
tdejager Nov 12, 2024
f504986
fix: latest rattler-build
tdejager Nov 12, 2024
7fb329d
fix: can include recipe now
tdejager Nov 12, 2024
e4b5146
misc: make recipe smaller
nichmor Nov 13, 2024
0e9eefb
Revert "misc: make recipe smaller"
tdejager Nov 14, 2024
2547f42
feat: don't inlcude recipe again and use latest rattler-build with tr…
tdejager Nov 14, 2024
4d84f70
feat: recipe in different sub-folder
tdejager Nov 14, 2024
ac5a4a4
fix: remove special windows handling
baszalmstra Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/rattler-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
on:
push:
branches:
- "main"
pull_request:

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 "version=$VERSION" >> $GITHUB_OUTPUT

rattler-build:
needs: generate_version
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/[email protected]
with:
pixi-version: v0.32.1
cache: true
environments: build-self
- name: Enable long paths
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --global core.longpaths true
shell: bash
- 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 --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
if: github.event_name == 'push'
run: |
# ignore errors because we want to ignore duplicate packages
for file in $RUNNER_TEMP/**/*.conda; do
echo "Uploading ${file}"
rattler-build upload prefix -c pixi-build-backends "$file"
done
2 changes: 1 addition & 1 deletion .github/workflows/rust-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- "main"
pull_request:

name: Rust
name: Rust Test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
debug/
target/

# If running rattler-build locally
output/

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
191 changes: 191 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.30.0,<1"

[feature.schema.tasks]
generate-schema = "python schema/model.py > schema/schema.json"
fmt-schema = "ruff format schema"
Expand All @@ -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"] }
Loading