Run tests with pixi #239
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: Run tests with pixi | |
| on: | |
| # on demand | |
| workflow_dispatch: | |
| inputs: | |
| delete_pixi_lock: | |
| description: 'If true, delete pixi.lock, to test against the latest version of dependencies.' | |
| required: true | |
| default: 'false' | |
| pull_request: | |
| schedule: | |
| # * is a special character in YAML so you have to quote this string | |
| # Execute a "nightly" build twice a week 2 AM UTC | |
| - cron: '0 2 * * 2,5' | |
| jobs: | |
| pixi-test: | |
| name: '[pixi:${{ matrix.pixi_task }}:${{ matrix.os }}]' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ | |
| ubuntu-24.04, | |
| ubuntu-24.04-arm, | |
| macos-latest, | |
| windows-latest | |
| ] | |
| pixi_task: [ | |
| test, | |
| test-bazel, | |
| test-bazel-ext-deps | |
| ] | |
| exclude: | |
| # https://github.com/ami-iit/bazel-cmake-deps-override does not support Windows at the moment | |
| - os: windows-latest | |
| pixi_task: test-bazel-ext-deps | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # On periodic jobs and when delete_pixi_lock option is true, delete the pixi.lock to check that the project compiles with latest version of dependencies | |
| - name: Delete pixi.lock on scheduled jobs or if delete_pixi_lock is true | |
| if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.delete_pixi_lock == 'true') | |
| shell: bash | |
| run: | | |
| rm pixi.lock | |
| # To use valgrind even with conda/pixi we still need to install libc6-dbg via apt on Debian-based distros | |
| # See https://github.com/gbionics/osqp-eigen/pull/171#issuecomment-2458149581 | |
| - name: Install libc6-dbg | |
| if: contains(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libc6-dbg | |
| - name: Set up pixi | |
| uses: prefix-dev/setup-pixi@v0.9.0 | |
| - name: Print pixi-related info | |
| run: | | |
| pixi info | |
| pixi list -e default | |
| pixi list -e bazel | |
| - name: Build and test the project | |
| run: pixi run ${{ matrix.pixi_task }} | |
| # On tasks that used bazel, stop bazel to avoid permission errors while deleting the workspace | |
| - name: Shutdown bazel | |
| if: contains(matrix.pixi_task, 'bazel') | |
| run: | | |
| pixi run -e bazel bazel clean --expunge |