Extraction of Python installer into a separate package #935
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 Xmipp | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: | |
| - 'ubuntu-24.04' | |
| cuda: | |
| - {version: '12.6.0', method: 'network'} | |
| - {version: 'None'} | |
| compiler: | |
| - {cc: gcc, cxx: g++} | |
| include: | |
| - os: 'ubuntu-22.04' | |
| cuda: {version: '11.8.0', method: 'network'} | |
| compiler: {cc: gcc-9, cxx: g++-9, update-alternatives: True} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libfftw3-dev libopenmpi-dev libhdf5-dev libtiff5-dev libsqlite3-dev default-jdk git cmake openmpi-bin ${{ matrix.compiler.cc }} ${{ matrix.compiler.cxx }} | |
| - if: ${{matrix.compiler.update-alternatives}} | |
| run: | | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${{ matrix.compiler.cc }} 128 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${{ matrix.compiler.cxx }} 128 | |
| - uses: actions/setup-python@main | |
| with: | |
| python-version: '3.9.15' | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install numpy xmipp3_installer | |
| - uses: Jimver/cuda-toolkit@master | |
| if: matrix.cuda.version != 'None' | |
| id: cuda-toolkit | |
| with: | |
| cuda: ${{ matrix.cuda.version }} | |
| method: ${{ matrix.cuda.method }} | |
| sub-packages: ${{ matrix.cuda.method=='network' && '["nvcc", "toolkit"]' || '[]' }} # Fake ternary operator | |
| - uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ steps.extract_branch.outputs.branch }} | |
| # Variable in the name is only evaluated once the workflow reaches this step | |
| - name: Compile Xmipp with all dependencies in branch ${{ steps.extract_branch.outputs.branch }} (if such branch exists, default is devel) | |
| env: | |
| BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} | |
| run: echo "SEND_INSTALLATION_STATISTICS=OFF" > xmipp.conf && ./xmipp all -b $BRANCH_NAME --keep-output || (cat compilation.log && false) | |
| - name: Cat | |
| run: cat xmipp.conf |