Skip to content

perf(test): optimize integration tests to use local fixtures #6772

perf(test): optimize integration tests to use local fixtures

perf(test): optimize integration tests to use local fixtures #6772

Workflow file for this run

name: CI
on:
push:
branches:
- main
- update-pixi
workflow_dispatch:
pull_request:
types:
- labeled
- synchronize
- opened
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: read-all
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUST_LOG: info
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
CARGO_TERM_COLOR: always
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
PYTEST_ADDOPTS: "--color=yes"
PYTHONIOENCODING: utf-8 # necessary to make unicode symbols print correctly on Windows
#
# Select a profile that is used for building the binary. The profile optimizes for certain use-cases.
# For distribution builds we want to reduce the size of the binary as much as possible. Whereas in
# regular CI builds we just want the fastest build possible.
#
# We switch based on the branch that is being built. If it's the main branch or a tag, we use the `dist`.
#
# Inspiration was taken from this blog: https://arusahni.net/blog/2020/03/optimizing-rust-binary-size.html
#
CARGO_BUILD_PROFILE: ci
jobs:
# Check if the code has changed in such a way that a rebuild is needed.
determine_changes:
name: "determine changes"
runs-on: ubuntu-latest
outputs:
# Flag that is raised when any code is changed
code: ${{ steps.changed.outputs.code_any_changed }}
unix_installer: ${{ steps.unix_installer_changed.outputs.code_any_changed }}
win_installer: ${{ steps.win_installer_changed.outputs.code_any_changed }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0
- uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94 # v46
id: changed
with:
files_yaml: |
code:
- "**/*"
- "!assets/**"
- "!docs/**"
- "docs/source_files/**"
- "!install/**"
- "!assets/**"
- "!**/*.md"
- uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94 # v46
id: unix_installer_changed
with:
files_yaml: |
code:
- "install/install.sh"
- uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94 # v46
id: win_installer_changed
with:
files_yaml: |
code:
- "install/install.ps1"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Set up pixi
uses: prefix-dev/setup-pixi@main
with:
environments: lint
cache-write: ${{ github.ref == 'refs/heads/main' }}
- name: lint (if this step fails, please 'pixi run lint' locally and push the changes)
run: pixi run lint
# Check that all the code references are correct.
check-rustdoc-links:
name: "cargo rustdoc | ubuntu"
needs: determine_changes
runs-on: ubuntu-latest
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: |
for package in $(cargo metadata --no-deps --format-version=1 | jq -r '.packages[] | .name'); do
cargo rustdoc -p "$package" --all-features -- -D warnings -W unreachable-pub
done
# Checks for dependencies that are not used in the codebase
cargo-machete:
name: Cargo Machete
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Machete
uses: bnjbvr/cargo-machete@7959c845782fed02ee69303126d4a12d64f1db18 # v0.9.1
# Checks for duplicate version of package
cargo-vendor:
name: Cargo Vendor
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ". -> target/pixi"
key: ${{ hashFiles('pixi.lock') }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test cargo vendor
run: cargo vendor --locked
check-cli-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: prefix-dev/setup-pixi@main
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ". -> target/pixi"
key: ${{ hashFiles('pixi.lock') }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Remove the generated CLI documentation
run: |
find docs/reference/cli -type f -name '*.md' -exec grep -q '<!--- This file is autogenerated. Do not edit manually! -->' {} \; -print0 | xargs -0 rm
- name: Regenerate CLI documentation
run: |
pixi run generate-cli-docs
- name: Check if there are any changes
run: |
if ! git diff --quiet; then
echo "Error: Generated CLI documentation differs from committed version"
echo "Please run 'pixi run generate-cli-docs' to regenerate the documentation and commit the changes."
git diff
exit 1
fi
# Run tests on important platforms.
#
cargo-test-linux:
name: "cargo test | ubuntu"
timeout-minutes: 15
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
runs-on: 8core_ubuntu_latest_runner
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ". -> target/pixi"
key: ${{ hashFiles('pixi.lock') }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test pixi
run: pixi run test-slow --retries 2
env:
PIXI_TEST_R2_ACCESS_KEY_ID: ${{ secrets.PIXI_TEST_R2_ACCESS_KEY_ID }}
PIXI_TEST_R2_SECRET_ACCESS_KEY: ${{ secrets.PIXI_TEST_R2_SECRET_ACCESS_KEY }}
cargo-test-macos-aarch64:
name: "cargo test | macos aarch64"
timeout-minutes: 15
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
runs-on: macos-15
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ". -> target/pixi"
key: ${{ hashFiles('pixi.lock') }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test pixi
run: pixi run test-slow --retries 2
env:
PIXI_TEST_R2_ACCESS_KEY_ID: ${{ secrets.PIXI_TEST_R2_ACCESS_KEY_ID }}
PIXI_TEST_R2_SECRET_ACCESS_KEY: ${{ secrets.PIXI_TEST_R2_SECRET_ACCESS_KEY }}
cargo-test-macos-x86_64:
name: "cargo test | macos x86_64"
timeout-minutes: 30
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' && github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow')}} # Only run on the main branch
runs-on: macos-15-intel
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ". -> target/pixi"
key: ${{ hashFiles('pixi.lock') }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test pixi
run: pixi run test-slow --retries 2
env:
PIXI_TEST_R2_ACCESS_KEY_ID: ${{ secrets.PIXI_TEST_R2_ACCESS_KEY_ID }}
PIXI_TEST_R2_SECRET_ACCESS_KEY: ${{ secrets.PIXI_TEST_R2_SECRET_ACCESS_KEY }}
cargo-test-windows:
name: "cargo test | windows x64"
timeout-minutes: 15
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
runs-on: windows_x64_2025_large
steps:
# We don't use the dev drive here since we run out of space otherwise
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
cache-directories: ${{ env.DEV_DRIVE }}/target
key: ${{ hashFiles('pixi.lock') }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test pixi
run: pixi run test-slow --retries 2
env:
CARGO_TARGET_DIR: ${{ env.DEV_DRIVE }}/target
PIXI_TEST_R2_ACCESS_KEY_ID: ${{ secrets.PIXI_TEST_R2_ACCESS_KEY_ID }}
PIXI_TEST_R2_SECRET_ACCESS_KEY: ${{ secrets.PIXI_TEST_R2_SECRET_ACCESS_KEY }}
#
# Builds the binary artifacts on different platforms
#
build-binary-linux-x86_64:
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
runs-on: 8core_ubuntu_latest_runner
name: "build binary | linux x86_64"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
- name: "Setup musl"
run: |
sudo apt-get install musl-tools
rustup target add x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Build"
run: >
cargo build
--locked
--target x86_64-unknown-linux-musl
--profile $CARGO_BUILD_PROFILE
--features self_update
- name: "Upload binary"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: pixi-linux-x86_64-${{ github.sha }}
path: ./target/x86_64-unknown-linux-musl/${{ env.CARGO_BUILD_PROFILE }}/pixi
retention-days: 14
build-binary-macos-aarch64:
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
runs-on: macos-15
name: "build binary | macos aarch64"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Build"
run: >
cargo build
--locked
--profile $CARGO_BUILD_PROFILE
--features self_update
- name: "Upload binary"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: pixi-macos-aarch64-${{ github.sha }}
path: ./target/${{ env.CARGO_BUILD_PROFILE }}/pixi
retention-days: 14
build-binary-macos-x86_64:
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' && github.ref == 'refs/heads/main' }} # Only run on the main branch
runs-on: macos-15-intel
name: "build binary | macos x86_64"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Build"
run: >
cargo build
--locked
--profile $CARGO_BUILD_PROFILE
--features self_update
- name: "Upload binary"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: pixi-macos-x86_64-${{ github.sha }}
path: ./target/${{ env.CARGO_BUILD_PROFILE }}/pixi
retention-days: 14
build-binary-windows-x86_64:
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
runs-on: windows_x64_2025_large
name: "build binary | windows x86_64"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ${{ env.PIXI_WORKSPACE }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Build"
working-directory: ${{ env.PIXI_WORKSPACE }}
run: >
cargo build
--locked
--profile $env:CARGO_BUILD_PROFILE
--features self_update
- name: "Upload binary"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: pixi-windows-x86_64-${{ github.sha }}
path: ${{ env.PIXI_WORKSPACE }}/target/${{ env.CARGO_BUILD_PROFILE }}/pixi.exe
retention-days: 14
build-binary-windows-aarch64:
needs: determine_changes
if: ${{ needs.determine_changes.outputs.code == 'true' && github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow')}} # Only run on the main branch
# Using windows-latest as it's only run on main, thus speed is not that important
runs-on: windows-latest
name: "build binary | windows aarch64"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
- name: "Install Rust toolchain"
run: rustup target add aarch64-pc-windows-msvc
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
workspaces: ${{ env.PIXI_WORKSPACE }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Build"
working-directory: ${{ env.PIXI_WORKSPACE }}
run: >
cargo build
--locked
--target aarch64-pc-windows-msvc
--profile $env:CARGO_BUILD_PROFILE
--features self_update
- name: "Upload binary"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: pixi-windows-aarch64-${{ github.sha }}
path: ${{ env.PIXI_WORKSPACE }}/target/aarch64-pc-windows-msvc/${{ env.CARGO_BUILD_PROFILE }}/pixi.exe
retention-days: 14
#
# Run integration tests on important platforms
#
test-pytest-windows-x86_64:
timeout-minutes: 10
name: Pytest | windows x86_64
runs-on: windows-latest
needs: build-binary-windows-x86_64
env:
TARGET_RELEASE: "target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
echo "${{ env.PIXI_WORKSPACE }}/${{ env.TARGET_RELEASE }}" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-windows-x86_64-${{ github.sha }}
path: ${{ env.PIXI_WORKSPACE }}/${{ env.TARGET_RELEASE }}
- name: Verify pixi installation
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi info
- name: Run pytests
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi run --locked test-integration-ci
test-pytest-macos-aarch64:
timeout-minutes: 10
name: Pytest | macos aarch64
runs-on: macos-15
needs: build-binary-macos-aarch64
env:
TARGET_RELEASE: "${{ github.workspace }}/target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-macos-aarch64-${{ github.sha }}
path: ${{ env.TARGET_RELEASE }}
- name: Setup unix binary, add to github path
run: |
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
echo "${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH
- name: Verify pixi installation
run: pixi info
- name: Run integration tests
run: pixi run --locked test-integration-ci
test-pytest-linux-x86_64:
timeout-minutes: 10
name: Pytest | linux x86_64
runs-on: 8core_ubuntu_latest_runner
needs: build-binary-linux-x86_64
env:
TARGET_RELEASE: "${{ github.workspace }}/target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-linux-x86_64-${{ github.sha }}
path: ${{ env.TARGET_RELEASE }}
- name: Setup unix binary, add to github path
run: |
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
echo "${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH
- name: Verify pixi installation
run: pixi info
- name: Run integration tests
run: pixi run --locked test-integration-ci
test-integration-windows-x86_64:
timeout-minutes: 30
name: Integration tests | windows x86_64
runs-on: windows-latest
needs: build-binary-windows-x86_64
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
env:
TARGET_RELEASE: "target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
echo "${{ env.PIXI_WORKSPACE }}/${{ env.TARGET_RELEASE }}" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-windows-x86_64-${{ github.sha }}
path: ${{ env.PIXI_WORKSPACE }}/${{ env.TARGET_RELEASE }}
- name: Verify pixi installation
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi info
- name: Run long running integration tests
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi run --locked test-integration-extra-slow-ci
- name: Test examples
shell: bash
working-directory: ${{ env.PIXI_WORKSPACE }}
run: bash tests/scripts/test-examples.sh
test-integration-macos-aarch64:
timeout-minutes: 30
name: Integration tests | macos aarch64
runs-on: macos-15
needs: build-binary-macos-aarch64
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
env:
TARGET_RELEASE: "${{ github.workspace }}/target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-macos-aarch64-${{ github.sha }}
path: ${{ env.TARGET_RELEASE }}
- name: Setup unix binary, add to github path
run: |
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
echo "${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH
- name: Verify pixi installation
run: pixi info
- name: Run long running integration tests
run: pixi run --locked test-integration-extra-slow-ci
- name: Run integration tests
run: pixi run --locked test-integration-ci
- name: Test examples
run: bash tests/scripts/test-examples.sh
- name: Test export
run: pixi run --locked test-export
test-integration-linux-x86_64:
timeout-minutes: 30
name: Integration tests | linux x86_64
runs-on: 8core_ubuntu_latest_runner
needs: build-binary-linux-x86_64
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
env:
TARGET_RELEASE: "${{ github.workspace }}/target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-linux-x86_64-${{ github.sha }}
path: ${{ env.TARGET_RELEASE }}
- name: Setup unix binary, add to github path
run: |
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
echo "${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH
- name: Verify pixi installation
run: pixi info
- name: Run long running integration tests
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
run: pixi run --locked test-integration-ci -m "extra_slow"
- name: Run integration tests
run: pixi run --locked test-integration-ci
- name: "Test examples"
run: bash tests/scripts/test-examples.sh
- name: "Test export"
run: pixi run --locked test-export
test-downstream-windows-x86_64:
timeout-minutes: 30
name: Downstream tests | windows x86_64
runs-on: windows-latest
needs: build-binary-windows-x86_64
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
env:
TARGET_RELEASE: "target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
echo "${{ env.PIXI_WORKSPACE }}/${{ env.TARGET_RELEASE }}" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-windows-x86_64-${{ github.sha }}
path: ${{ env.PIXI_WORKSPACE }}/${{ env.TARGET_RELEASE }}
- name: Verify pixi installation
run: pixi info
- name: Install pixi's pixi project
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi install -vvv --locked
- name: Checkout Deltares/Ribasim
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: Deltares/Ribasim
path: ribasim
- name: Copy Deltares/Ribasim to Dev Drive
run: Copy-Item -Path "${{ github.workspace }}/ribasim" -Destination "${{ env.PIXI_WORKSPACE }}/ribasim" -Recurse
- name: Install Deltares/Ribasim
run: pixi install -vvv --locked
working-directory: ${{ env.PIXI_WORKSPACE }}/ribasim
- name: Checkout quantco/polarify
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: quantco/polarify
path: polarify
- name: Copy quantco/polarify to Dev Drive
run: Copy-Item -Path "${{ github.workspace }}/polarify" -Destination "${{ env.PIXI_WORKSPACE }}/polarify" -Recurse
- name: Install quantco/polarify
run: pixi install -vvv --locked
working-directory: ${{ env.PIXI_WORKSPACE }}/polarify
- run: pixi info
working-directory: ${{ env.PIXI_WORKSPACE }}/polarify
- run: pixi list
working-directory: ${{ env.PIXI_WORKSPACE }}/polarify
- name: Run downstream polarify environment
run: pixi run --locked echo "Running downstream polarify environment"
working-directory: ${{ env.PIXI_WORKSPACE }}/polarify
test-downstream-macos-aarch64:
timeout-minutes: 15
name: Downstream tests | macos aarch64
runs-on: macos-15
needs: build-binary-macos-aarch64
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
env:
TARGET_RELEASE: "${{ github.workspace }}/target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-macos-aarch64-${{ github.sha }}
path: ${{ env.TARGET_RELEASE }}
- name: Setup unix binary, add to github path
run: |
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
echo "${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH
- name: Verify pixi installation
run: pixi info
- name: Install pixi
# Using locked to validate that the lock file is correct
run: pixi install -vvv --locked
- name: "Checkout Deltares/Ribasim"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: Deltares/Ribasim
path: ribasim
- name: "Install Deltares/Ribasim"
run: pixi install -vvv --locked
working-directory: ribasim
- name: "Checkout quantco/polarify"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: quantco/polarify
path: polarify
- name: "Install quantco/polarify"
run: pixi install -vvv --locked
working-directory: polarify
- run: pixi info
- run: pixi list
- name: Run downstream polarify environment
run: pixi run --locked echo "Running downstream polarify environment"
test-downstream-linux-x86_64:
timeout-minutes: 15
name: Downstream tests | linux x86_64
runs-on: 8core_ubuntu_latest_runner
needs: build-binary-linux-x86_64
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test:extra_slow') }}
env:
TARGET_RELEASE: "${{ github.workspace }}/target/pixi/release"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download binary from build
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pixi-linux-x86_64-${{ github.sha }}
path: ${{ env.TARGET_RELEASE }}
- name: Setup unix binary, add to github path
run: |
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
echo "${{ env.TARGET_RELEASE }}" >> $GITHUB_PATH
- name: Verify pixi installation
run: pixi info
- name: Install pixi
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi install -vvv --locked
- name: "Checkout nerfstudio-project/nerfstudio"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: nerfstudio-project/nerfstudio
path: nerfstudio
- name: "Install nerfstudio-project/nerfstudio"
# Not using locked as their lockfile is not in sync
run: pixi install -vvv
working-directory: nerfstudio
- name: "Checkout Deltares/Ribasim"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: Deltares/Ribasim
path: ribasim
- name: "Install Deltares/Ribasim"
run: pixi install -vvv --locked
working-directory: ribasim
- name: "Checkout quantco/polarify"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: quantco/polarify
path: polarify
- name: "Install quantco/polarify"
run: pixi install -vvv --locked
working-directory: polarify
- run: pixi info
- run: pixi list
- name: Run downstream polarify environment
run: pixi run --locked echo "Running downstream polarify environment"
#
# Install a number of common wheels on some platforms
#
test-common-wheels-linux-x86_64:
name: Wheel Tests | linux x86_64
needs:
- build-binary-linux-x86_64
uses: ./.github/workflows/test_common_wheels.yml
with:
sha: ${{ github.sha }}
arch: linux-x86_64
runs-on: 8core_ubuntu_latest_runner
test-common-wheels-windows-x86_64:
name: Wheel Tests | windows x86_64
needs:
- build-binary-windows-x86_64
uses: ./.github/workflows/test_common_wheels.yml
with:
sha: ${{ github.sha }}
arch: windows-x86_64
runs-on: windows-latest
test-common-wheels-macos-aarch64:
name: Wheel Tests | macos aarch64
needs:
- build-binary-macos-aarch64
uses: ./.github/workflows/test_common_wheels.yml
with:
sha: ${{ github.sha }}
arch: macos-aarch64
runs-on: macos-15
#
# Test unix installer on some platforms
#
test-install-sh-nix:
strategy:
matrix:
os: [ubuntu-latest, macos-15]
name: install.sh | ${{ matrix.os }}
needs:
- determine_changes
runs-on: ${{ matrix.os }}
if: ${{ needs.determine_changes.outputs.unix_installer == 'true' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: "Install"
run: |
uname -a
test ! -e ~/.pixi/bin/pixi
sh < ./install/install.sh
~/.pixi/bin/pixi --version
test-install-sh-alpine:
name: install.sh | alpine linux
needs:
- determine_changes
runs-on: ubuntu-latest
if: ${{ needs.determine_changes.outputs.unix_installer == 'true' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@cf5fddcea495dcc19c0f991c6f6fa6a7abf3d50a # v1.3.0
- name: "Install"
run: |
uname -a
cat /etc/alpine-release
test ! -e ~/.pixi/bin/pixi
sh < ./install/install.sh
~/.pixi/bin/pixi --version
shell: alpine.sh {0}
test-install-sh-without-tar:
name: install.sh | linux without tar
needs:
- determine_changes
runs-on: ubuntu-latest
if: ${{ needs.determine_changes.outputs.unix_installer == 'true' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@cf5fddcea495dcc19c0f991c6f6fa6a7abf3d50a # v1.3.0
- name: "Install"
run: |
uname -a
cat /etc/alpine-release
test ! -e ~/.pixi/bin/pixi
mv $(which tar) $(which tar).bak
! hash tar
sh < ./install/install.sh
~/.pixi/bin/pixi --version
shell: alpine.sh --root {0}
test-install-sh-msys2:
name: install.sh | msys2
needs:
- determine_changes
runs-on: windows-latest
if: ${{ needs.determine_changes.outputs.unix_installer == 'true' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup ucrt64 msys2
uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2
with:
msystem: UCRT64
install: unzip
- name: "Install"
run: |
uname -a
test ! -e ~/.pixi/bin/pixi.exe
sh < ./install/install.sh
~/.pixi/bin/pixi.exe --version
~/.pixi/bin/pixi --version
shell: msys2 {0}
test-install-sh-msys2-without-unzip:
name: install.sh | msys2 without unzip
needs:
- determine_changes
runs-on: windows-latest
if: ${{ needs.determine_changes.outputs.unix_installer == 'true' }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup ucrt64 msys2
uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2
with:
msystem: UCRT64
- name: "Install"
run: |
uname -a
test ! -e ~/.pixi/bin/pixi
sh < ./install/install.sh
~/.pixi/bin/pixi --version
shell: msys2 {0}
test-install-ps1:
name: install.ps1
needs:
- determine_changes
runs-on: windows-latest
if: ${{ needs.determine_changes.outputs.win_installer == 'true' }}
env:
PIXI_REPOURL: "https://github.com/prefix-dev/pixi/"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup ucrt64 msys2
uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2
with:
msystem: UCRT64
- name: "Before Install"
run: test ! -e $USERPROFILE/.pixi/bin/pixi.exe
shell: msys2 {0}
- name: "Install"
run: ${{ github.workspace }}/install/install.ps1
- name: "After Install"
run: $USERPROFILE/.pixi/bin/pixi.exe --version
shell: msys2 {0}
test-build-linux-x86_64:
timeout-minutes: 10
name: Test pixi-build Linux x86_64
runs-on: ubuntu-latest
needs: build-binary-linux-x86_64
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: nichmor/pixi-build-testsuite
ref: feat/change-manifest-path-to-path-in-pixi-build
- name: Set up pixi
uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- name: Download pixi artifacts
run: pixi run download-artifacts --repo pixi --run-id ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download pixi-build-backends artifacts
run: pixi run download-artifacts --repo pixi-build-backends
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup binary permissions
run: chmod a+x artifacts/pixi*
- name: Run integration tests
run: pixi run --locked test-slow
test-build-windows-x86_64:
timeout-minutes: 15
name: Test pixi-build Windows x86_64
runs-on: windows-latest
needs: build-binary-windows-x86_64
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: nichmor/pixi-build-testsuite
ref: feat/change-manifest-path-to-path-in-pixi-build
- name: Create Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
- name: Copy Git Repo to Dev Drive
run: Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
- name: Set up pixi
uses: prefix-dev/setup-pixi@main
with:
manifest-path: ${{ env.PIXI_WORKSPACE }}/pixi.toml
cache-write: ${{ github.ref == 'refs/heads/main' }}
- name: Download pixi artifacts
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi run download-artifacts --repo pixi --run-id ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download pixi-build-backends artifacts
working-directory: ${{ env.PIXI_WORKSPACE }}
run: pixi run download-artifacts --repo pixi-build-backends
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run integration tests
run: pixi run --locked test-slow
working-directory: ${{ env.PIXI_WORKSPACE }}
test-build-macos-aarch64:
timeout-minutes: 10
name: Test pixi-build macOS aarch64
runs-on: macos-15
needs: build-binary-macos-aarch64
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
repository: nichmor/pixi-build-testsuite
ref: feat/change-manifest-path-to-path-in-pixi-build
- name: Set up pixi
uses: prefix-dev/setup-pixi@main
with:
cache-write: ${{ github.ref == 'refs/heads/main' }}
- name: Download pixi artifacts
run: pixi run download-artifacts --repo pixi --run-id ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download pixi-build-backends artifacts
run: pixi run download-artifacts --repo pixi-build-backends
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup binary permissions
run: chmod a+x artifacts/pixi*
- name: Run integration tests
run: pixi run --locked test-slow