-
Notifications
You must be signed in to change notification settings - Fork 528
chore: merge backend and testsuite repos into this repository #5267
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
Changes from all commits
6820042
bff758c
f183db4
6071a11
6b12161
bde8adb
0ab67c1
0576bca
61cf7ae
08ee584
b665414
a69794e
22a81f0
5b05ed1
d06cec0
91a77e1
590ba5d
5a9bb5e
27e6d88
afef66c
a22a2e1
a0e2809
8e0f8c0
523cd66
3e596ea
c9916a7
7bf736d
41f0dac
d76aa9a
c9270f2
d804203
8f86a8a
9ea2e24
aead019
b4cdeab
6f8114c
077d221
d7845fa
7df280c
6e9e800
6c41b57
a8afc90
0ef6402
d3c4e71
569bfb3
f9d044f
fd94b39
b2d6383
802cc10
55e8b0c
1176fa8
c29f1a3
efced3f
4b19849
91a113a
c18726b
00a7e11
9d8739c
9cd4c10
2b585d7
15463b5
d44e64e
3dcdac3
cbb5fdf
19ec31e
c8332c3
31735b5
2bd1089
7a25d69
af86af7
a2a85e1
bd6db6c
1f315c6
c851fd9
8ba0940
2c5862d
c6bd9fa
1df2b86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Backends - Python Bindings | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - crates/pixi-build-backend/** | ||
| - Cargo.* | ||
| - pixi-build-backends/py-pixi-build-backend/** | ||
| - .github/workflows/backends-python-bindings.yml | ||
| pull_request: | ||
| paths: | ||
| - crates/pixi-build-backend/** | ||
| - Cargo.* | ||
| - pixi-build-backends/py-pixi-build-backend/** | ||
| - .github/workflows/backends-python-bindings.yml | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| PYTHONIOENCODING: utf-8 | ||
|
|
||
| jobs: | ||
| format_lint_test: | ||
| name: Test the Python bindings | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| persist-credentials: false | ||
| - uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3 | ||
| with: | ||
| manifest-path: pixi-build-backends/py-pixi-build-backend/pixi.toml | ||
| environments: ci | ||
| - name: Run clippy | ||
| run: | | ||
| cd pixi-build-backends/py-pixi-build-backend | ||
| pixi run -e ci lint | ||
| - name: Run tests | ||
| run: | | ||
| cd pixi-build-backends/py-pixi-build-backend | ||
| pixi run -e ci test --color=yes | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| name: "Backends - Conda Packages" | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| push_to_channel: | ||
| description: "Push packages to conda channel after build" | ||
| required: false | ||
| default: true | ||
| type: boolean | ||
| package_name: | ||
| description: "Build specific package only (optional)" | ||
| required: false | ||
| type: string | ||
|
Comment on lines
+4
to
+14
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This means we can trigger backend builds with a manual workflow dispatch. We should try if that actually works soon and improve this in general |
||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| generate-matrix: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.set_version.outputs.matrix }} | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3 | ||
| with: | ||
| environments: backends-release | ||
| - name: Extract versions | ||
| id: set_version | ||
| run: | | ||
| # extract names and versions from cargo metadata | ||
| # and generate a matrix entries for the build job | ||
| echo "Package name input: '${GITHUB_EVENT_INPUTS_PACKAGE_NAME}'" | ||
| if [ -n "${GITHUB_EVENT_INPUTS_PACKAGE_NAME}" ]; then | ||
| echo "Building specific package: ${GITHUB_EVENT_INPUTS_PACKAGE_NAME}" | ||
| MATRIX_JSON=$(pixi run -e backends-release generate-matrix --package "${GITHUB_EVENT_INPUTS_PACKAGE_NAME}") | ||
| else | ||
| echo "Building all packages" | ||
| MATRIX_JSON=$(pixi run -e backends-release generate-matrix) | ||
| fi | ||
|
|
||
| echo "Generated matrix: $MATRIX_JSON" | ||
| echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT | ||
| env: | ||
| GITHUB_EVENT_INPUTS_PACKAGE_NAME: ${{ github.event.inputs.package_name }} | ||
|
|
||
| build: | ||
| needs: generate-matrix | ||
| permissions: | ||
| id-token: write | ||
| attestations: write | ||
| contents: read | ||
| env: | ||
| REPO_NAME: "prefix-dev/pixi" | ||
| strategy: | ||
| matrix: | ||
| bins: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | ||
| fail-fast: false | ||
| runs-on: ${{ matrix.bins.os }} | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3 | ||
| with: | ||
| environments: backends-release | ||
| - name: Enable long paths (Windows) | ||
| if: ${{ matrix.bins.os == 'windows-latest' }} | ||
| run: | | ||
| git config --global core.longpaths true | ||
| shell: bash | ||
| - name: Set environment variable for recipe version | ||
| shell: bash | ||
| run: | | ||
| echo "${{ matrix.bins.env_name }}=${{ matrix.bins.version }}" >> $GITHUB_ENV | ||
| - name: Build ${{ matrix.bins.bin }} | ||
| shell: bash | ||
| env: | ||
| RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true" | ||
| RATTLER_BUILD_COLOR: "always" | ||
| run: | | ||
| pixi run -e backends-release build-recipe-ci $RUNNER_TEMP pixi-build-backends/recipe/${{ matrix.bins.bin }}/recipe.yaml ${{ matrix.bins.target }} | ||
|
|
||
| - uses: actions/attest@daf44fb950173508f38bd2406030372c1d1162b1 # v3.0.0 | ||
| id: attest | ||
| with: | ||
| subject-path: "${{ runner.temp }}/**/*.conda" | ||
| predicate-type: "https://schemas.conda.org/attestations-publish-1.schema.json" | ||
| predicate: "{\"targetChannel\": \"https://prefix.dev/pixi-build-backends\"}" | ||
|
|
||
| - name: Generate attestation for conda package | ||
| shell: bash | ||
| run: | | ||
| # Convert Windows paths to Unix-style for bash compatibility | ||
| RUNNER_TEMP_UNIX="${{ runner.temp }}" | ||
| RUNNER_TEMP_UNIX="${RUNNER_TEMP_UNIX//\\//}" | ||
| BUNDLE_PATH_UNIX="${STEPS_ATTEST_OUTPUTS_BUNDLE_PATH//\\//}" | ||
|
|
||
| # Find the actual conda package file (search recursively) | ||
| CONDA_PACKAGE=$(find "$RUNNER_TEMP_UNIX" -name "*.conda" -type f | head -1) | ||
| if [ -n "$CONDA_PACKAGE" ]; then | ||
| # Extract just the filename without path | ||
| PACKAGE_NAME=$(basename "$CONDA_PACKAGE") | ||
| # Create signature filename by replacing .conda with .sig | ||
| SIG_NAME="${PACKAGE_NAME%.conda}.sig" | ||
| # Get the directory where the conda package is located | ||
| PACKAGE_DIR=$(dirname "$CONDA_PACKAGE") | ||
| # Move the attestation bundle to the same directory as the conda package | ||
| mv "$BUNDLE_PATH_UNIX" "$PACKAGE_DIR/$SIG_NAME" | ||
| echo "Created attestation: $PACKAGE_DIR/$SIG_NAME" | ||
| else | ||
| echo "Error: No conda package found in $RUNNER_TEMP_UNIX" | ||
| exit 1 | ||
| fi | ||
| env: | ||
| STEPS_ATTEST_OUTPUTS_BUNDLE_PATH: ${{ steps.attest.outputs.bundle-path }} | ||
|
|
||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | ||
| with: | ||
| name: conda-packages-${{ matrix.bins.bin }}-${{ matrix.bins.target }} | ||
| path: | | ||
| ${{ runner.temp }}/**/*.conda | ||
| ${{ runner.temp }}/**/*.sig | ||
|
|
||
| - name: Kill any lingering processes (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: powershell | ||
| run: | | ||
| # Kill any Python processes | ||
| Get-Process python* -ErrorAction SilentlyContinue | Stop-Process -Force | ||
|
|
||
| # Kill any processes from the pixi environment | ||
| $pixiPath = "${{ github.workspace }}\.pixi\envs\backends-release\bin" | ||
| Get-Process | Where-Object { $_.Path -like "$pixiPath*" } | Stop-Process -Force | ||
|
|
||
| # Wait a moment for handles to be released | ||
| Start-Sleep -Seconds 2 | ||
|
|
||
| aggregate: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| target: [linux-64, linux-aarch64, linux-ppc64le, win-64, osx-64, osx-arm64] | ||
| steps: | ||
| - name: Download conda package artifacts for ${{ matrix.target }} | ||
| uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4 | ||
| with: | ||
| pattern: conda-packages-*-${{ matrix.target }} | ||
| path: conda-artifacts-${{ matrix.target }} | ||
| merge-multiple: true | ||
| - name: Upload aggregated conda packages for ${{ matrix.target }} | ||
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | ||
| with: | ||
| name: conda-packages-${{ matrix.target }} | ||
| path: conda-artifacts-${{ matrix.target }}/**/*.conda | ||
|
|
||
| upload: | ||
| needs: aggregate | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.inputs.push_to_channel == 'true' && github.repository == 'prefix-dev/pixi' }} | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Download all conda packages | ||
| uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4 | ||
| with: | ||
| pattern: conda-packages-* | ||
| path: conda-packages | ||
| merge-multiple: true | ||
| run-id: ${{ github.run_id }} | ||
| - uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3 | ||
| with: | ||
| environments: backends-release | ||
| - name: Upload packages | ||
| shell: bash | ||
| run: | | ||
| for file in conda-packages/**/*.conda; do | ||
| echo "Uploading ${file}" | ||
| # Find corresponding attestation file | ||
| ATTESTATION_FILE="${file%.conda}.sig" | ||
| if [ -f "$ATTESTATION_FILE" ]; then | ||
| echo "Found attestation: $ATTESTATION_FILE" | ||
| pixi run -e backends-release rattler-build upload prefix -c pixi-build-backends "$file" --attestation "$ATTESTATION_FILE" | ||
| else | ||
| echo "Warning: No attestation found for $file" | ||
| pixi run -e backends-release rattler-build upload prefix -c pixi-build-backends "$file" | ||
| fi | ||
| done | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: Backends - ROS | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything ROS related is tested separately |
||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| sha: | ||
| type: string | ||
| description: "The commit sha for artifact lookup" | ||
| required: true | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| PYTHONIOENCODING: utf-8 | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test the pixi-build-ros package | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| TARGET_RELEASE: target/pixi/release | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| persist-credentials: false | ||
| - uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3 | ||
| with: | ||
| manifest-path: pixi-build-backends/backends/pixi-build-ros/pixi.toml | ||
| - name: Download pixi binary | ||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | ||
| with: | ||
| name: pixi-linux-x86_64-${{ inputs.sha }} | ||
| path: ${{ env.TARGET_RELEASE }} | ||
| - name: Add pixi binary to PATH | ||
| run: | | ||
| chmod a+x ${{ github.workspace }}/${{ env.TARGET_RELEASE }}/pixi | ||
| echo "${{ github.workspace }}/${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH | ||
| - name: Lint | ||
| run: | | ||
| cd pixi-build-backends/backends/pixi-build-ros | ||
| pixi run lint | ||
| - name: Run tests | ||
| run: | | ||
| cd pixi-build-backends/backends/pixi-build-ros | ||
| pixi run test-ci --color=yes | ||
|
|
||
| integration-test: | ||
| name: Integration tests | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| artifact: pixi-linux-x86_64 | ||
| - os: macos-14 | ||
| artifact: pixi-macos-aarch64 | ||
| - os: windows-latest | ||
| artifact: pixi-windows-x86_64 | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| TARGET_RELEASE: target/pixi/release | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3 | ||
| with: | ||
| manifest-path: pixi-build-backends/backends/pixi-build-ros/pixi.toml | ||
|
|
||
| - name: Download pixi binary | ||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | ||
| with: | ||
| name: ${{ matrix.artifact }}-${{ inputs.sha }} | ||
| path: ${{ env.TARGET_RELEASE }} | ||
|
|
||
| - name: Add pixi binary to PATH (Unix) | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| chmod a+x ${{ github.workspace }}/${{ env.TARGET_RELEASE }}/pixi | ||
| echo "${{ github.workspace }}/${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH | ||
|
|
||
| - name: Add pixi binary to PATH (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| echo "${{ github.workspace }}/${{ env.TARGET_RELEASE }}" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH | ||
|
|
||
| - name: Verify pixi installation | ||
| run: pixi info | ||
|
|
||
| - name: Build ROS backend channel | ||
| working-directory: pixi-build-backends/backends/pixi-build-ros | ||
| run: pixi run --locked create-channel | ||
|
|
||
| - name: Run ROS integration tests | ||
| working-directory: pixi-build-backends/backends/pixi-build-ros | ||
| run: pixi run --locked pytest tests/integration -v | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python bindings are tested separately