fix!: remove --debug from CLI and Python API
#4363
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| - ".github/workflows/rust.yml" | |
| - "src/**" | |
| - "crates/**" | |
| - "Cargo.*" | |
| - "test/end-to-end/**" | |
| workflow_dispatch: | |
| name: CI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| RUST_LOG: info | |
| RUST_BACKTRACE: 1 | |
| RUSTFLAGS: "-D warnings" | |
| CARGO_TERM_COLOR: always | |
| SCCACHE_GHA_ENABLED: "true" | |
| ACTIONS_CACHE_SERVICE_V2: on | |
| jobs: | |
| # Run Rust unit/integration tests (debug mode) | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4 | |
| with: | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Configure sccache | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| # https://github.com/actions/runner-images/issues/5459#issuecomment-1532856844 | |
| - name: Set up GNU patch on Windows | |
| # Needed to use GNU patch instead of Strawberry Perl patch | |
| if: ${{ contains(github.event.pull_request.labels.*.name, 'need-patch-apply-tests') && matrix.os == 'windows-latest' }} | |
| run: Add-Content $env:GITHUB_PATH "C:\Program Files\Git\usr\bin" | |
| - name: Set up GNU patch on MacOS | |
| # Needed to use GNU patch instead of whatever is builtin on macos (1 test fails) | |
| if: ${{ contains(github.event.pull_request.labels.*.name, 'need-patch-apply-tests') && matrix.os == 'macos-latest' }} | |
| run: pixi global install patch=2.7.6 | |
| - name: Set up patchelf on MacOS | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: pixi global install patchelf | |
| - name: Run tests | |
| run: pixi run cargo test --workspace --all-targets --features=tui,recipe-generation --verbose -- --nocapture | |
| - name: Run patch apply tests | |
| # https://github.com/orgs/community/discussions/26261#discussioncomment-3251039 | |
| if: ${{ contains(github.event.pull_request.labels.*.name, 'need-patch-apply-tests') }} | |
| run: | | |
| patch --version | |
| pixi run cargo test --features=tui,recipe-generation,patch-test-extra -- --nocapture --ignored | |
| - name: Show sccache stats | |
| if: always() | |
| run: pixi run sccache --show-stats | |
| # Build release binary (one per OS) | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4 | |
| with: | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Configure sccache | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - name: Build release binary | |
| run: pixi run build-release | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: rattler-build-${{ matrix.os }} | |
| path: target-pixi/release/rattler-build${{ runner.os == 'Windows' && '.exe' || '' }} | |
| retention-days: 7 | |
| - name: Show sccache stats | |
| if: always() | |
| run: pixi run sccache --show-stats | |
| # Run end-to-end tests using the pre-built binary | |
| e2e-test: | |
| name: End-to-end (${{ matrix.os }}) | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: "true" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4 | |
| with: | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Download rattler-build binary | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: rattler-build-${{ matrix.os }} | |
| path: target-pixi/release/ | |
| - name: Prepare binary | |
| if: runner.os != 'Windows' | |
| run: chmod +x target-pixi/release/rattler-build | |
| - name: Run end-to-end tests | |
| run: pixi run test-end-to-end-ci | |
| env: | |
| PREFIX_DEV_READ_ONLY_TOKEN: ${{ secrets.PREFIX_DEV_READ_ONLY_TOKEN }} | |
| S3_ACCESS_KEY_ID: ${{ secrets.S3_UPLOAD_ACCESS_KEY_ID }} | |
| S3_SECRET_ACCESS_KEY: ${{ secrets.S3_UPLOAD_ACCESS_KEY_SECRET }} | |
| rebuild-test: | |
| name: Rebuild Test | |
| needs: build | |
| if: contains(github.event.pull_request.labels.*.name, 'needs-rebuild-tests') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - name: Download rattler-build artifact | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: rattler-build-ubuntu-latest | |
| path: ./ | |
| - name: Prepare binary | |
| run: chmod +x rattler-build | |
| - name: Build rich package | |
| run: | | |
| mkdir -p output | |
| ./rattler-build build --recipe ./examples/rich | |
| echo "Built packages:" | |
| ls -la ./output/noarch/ | |
| - name: Rebuild rich package | |
| run: | | |
| PACKAGE=$(find ./output/noarch/rich-*.conda | head -n1) | |
| echo "Rebuilding package: $PACKAGE" | |
| ./rattler-build rebuild --package-file "$PACKAGE" | |
| echo "Rebuild completed successfully" | |
| - name: Compare original and rebuilt packages | |
| run: | | |
| echo "Contents after rebuild:" | |
| ls -la ./output/noarch/ |