Pixi development environment #2
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
| name: Build and test in dev environment | |
| # Builds FANS using dev environment with cmake and make, then runs tests. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{github.event_name == 'pull_request'}} | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up pixi | |
| uses: prefix-dev/setup-pixi@v0.9.0 | |
| with: | |
| environments: dev | |
| - name: Generate build directory | |
| run: mkdir -p build | |
| - name: Configure | |
| working-directory: build | |
| run: | | |
| pixi run -e dev cmake --version | |
| pixi run -e dev cmake .. | |
| - name: Compile | |
| working-directory: build | |
| run: | | |
| pixi run -e dev cmake --build . -j $(nproc) || pixi run -e dev cmake --build . -j1 | |
| - name: Run pytest checks on HDF5 output | |
| run: pixi run test | |
| - name: Upload test logs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os }} test-logs | |
| path: test/output/*.log | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: ${{ matrix.os }} PyTest logs | |
| path: | | |
| **/pytest*.xml | |
| **/.pytest_cache |