Conda End-to-end Test #2191
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
| name: Conda End-to-end Test | |
| env: | |
| SANITIZER_CI_SCHEDULE: '25 6 * * 5' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - LICENSE | |
| - NOTICE | |
| - README.md | |
| - "docs/**" | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - LICENSE | |
| - NOTICE | |
| - README.md | |
| - "docs/**" | |
| workflow_dispatch: | |
| inputs: | |
| sanitizer: | |
| description: "Run sanitized build" | |
| required: false | |
| type: boolean | |
| default: false | |
| schedule: | |
| # Run conda CI on Monday and Thursday at 1:25am EST (06:25 UTC) | |
| # Run conda sanitized builds on Fridays at 1:25 am EST (06:25 UTC) | |
| - cron: '25 6 * * 1,4,5' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| checks: write | |
| jobs: | |
| initialize: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| SANITIZER: ${{ steps.setupmanual.outputs.SANITIZER || steps.setupschedule.outputs.SANITIZER }} | |
| steps: | |
| - name: Display and Setup Build Args (Manual) | |
| id: setupmanual | |
| run: | | |
| echo "Sanitizer: $SANITIZER" | |
| echo "SANITIZER=$SANITIZER" >> $GITHUB_OUTPUT | |
| env: | |
| SANITIZER: ${{ github.event.inputs.sanitizer }} | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| - name: Display and Setup Build Args (Schedule) | |
| id: setupschedule | |
| run: | | |
| echo "Sanitizer: $SANITIZER" | |
| echo "SANITIZER=$SANITIZER" >> $GITHUB_OUTPUT | |
| env: | |
| SANITIZER: ${{ github.event.schedule == env.SANITIZER_CI_SCHEDULE }} | |
| if: ${{ github.event_name == 'schedule' }} | |
| build: | |
| needs: | |
| - initialize | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| - macos-14 | |
| - windows-2022 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 | |
| with: | |
| micromamba-version: '2.3.2-0' | |
| environment-file: conda/dev-environment-unix.yml | |
| init-shell: >- | |
| bash | |
| cache-environment: true | |
| cache-downloads: true | |
| # Hosted runners are ephemeral, so removing the micromamba root buys nothing | |
| post-cleanup: 'none' | |
| if: ${{ runner.os != 'Windows' }} | |
| - uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 | |
| with: | |
| micromamba-version: '2.3.2-0' | |
| environment-file: conda/dev-environment-win.yml | |
| init-shell: >- | |
| cmd.exe | |
| cache-environment: true | |
| cache-downloads: true | |
| # Hosted runners are ephemeral, so removing the micromamba root buys nothing, and on | |
| # Windows it fails with EPERM when a handle is still open on python.exe. | |
| # See https://github.com/mamba-org/setup-micromamba/issues/268 | |
| post-cleanup: 'none' | |
| if: ${{ runner.os == 'Windows' }} | |
| - name: Set up Caches | |
| uses: ./.github/actions/setup-caches | |
| with: | |
| vcpkg: false | |
| - name: Python Lint Steps | |
| run: make lint | |
| shell: micromamba-shell {0} | |
| if: ${{ runner.os != 'Windows' }} | |
| - name: Python Lint Steps (Windows) | |
| run: make lint | |
| shell: cmd /C call {0} | |
| if: ${{ runner.os == 'Windows' }} | |
| - name: Python Build Steps (Linux) | |
| run: make build-conda ${{ needs.initialize.outputs.SANITIZER == 'true' && 'ASAN="ON" UBSAN="ON"' || '' }} | |
| shell: micromamba-shell {0} | |
| if: ${{ runner.os == 'Linux' }} | |
| - name: Python Build Steps (macOS) | |
| run: make build-conda | |
| shell: micromamba-shell {0} | |
| if: ${{ runner.os == 'macOS' }} | |
| - name: Python Build Steps (Windows) | |
| env: | |
| CSP_GENERATOR: "Visual Studio 17 2022" | |
| run: make build-conda | |
| shell: cmd /C call {0} | |
| if: ${{ runner.os == 'Windows' }} | |
| - name: Python Test Steps | |
| run: make test | |
| shell: micromamba-shell {0} | |
| if: ${{ runner.os != 'Windows' && needs.initialize.outputs.SANITIZER == 'false' }} | |
| - name: Python Test Steps (Sanitizer) | |
| run: make test-sanitizer | |
| shell: micromamba-shell {0} | |
| if: ${{ runner.os != 'Windows' && needs.initialize.outputs.SANITIZER == 'true' }} | |
| - name: Python Test Steps ( Windows ) | |
| run: make test | |
| shell: cmd /C call {0} | |
| if: ${{ runner.os == 'Windows' }} |