|
1 | 1 | name: PyRosetta |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: ['*'] |
6 | | - tags: ['*'] |
7 | | - pull_request: |
8 | | - branches: ['*'] |
9 | | - schedule: |
| 4 | + push: |
| 5 | + branches: ['*'] |
| 6 | + tags: ['*'] |
| 7 | + pull_request: |
| 8 | + branches: ['*'] |
| 9 | + schedule: |
10 | 10 | # Run Every Monday 4 AM UTC |
11 | | - - cron: '0 4 * * 1' |
| 11 | + - cron: '0 4 * * 1' |
12 | 12 |
|
13 | 13 | env: |
14 | 14 | CARGO_TERM_COLOR: always |
15 | 15 |
|
16 | 16 | jobs: |
| 17 | + |
| 18 | + # ============================================================ |
| 19 | + # PIXI JOB |
| 20 | + # ============================================================ |
17 | 21 | pixi: |
| 22 | + name: Pixi |
| 23 | + runs-on: ubuntu-latest |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + python-version: [3.13] |
| 27 | + # TODO: [3.10, 3.11, 3.12, 3.13, 3.14] |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + |
| 31 | + - name: Set up Pixi |
| 32 | + uses: prefix-dev/[email protected] |
| 33 | + with: |
| 34 | + environments: py313 |
| 35 | + manifest-path: pyrosetta/pixi/pixi.toml |
| 36 | + |
| 37 | + - name: Run tests (pixi) |
| 38 | + run: | |
| 39 | + cd pyrosetta/pixi |
| 40 | + pixi run python -m unittest discover -s pyrosetta.tests.distributed.cluster |
| 41 | +
|
| 42 | + # ============================================================ |
| 43 | + # UV JOB |
| 44 | + # ============================================================ |
| 45 | + uv: |
| 46 | + name: uv |
18 | 47 | runs-on: ubuntu-latest |
19 | 48 | strategy: |
20 | | - matrix: |
21 | | - #environment: [py310, py311, py312, py313, py314, ] |
22 | | - environment: [py313, ] |
| 49 | + matrix: |
| 50 | + python-version: [3.13] |
| 51 | + # TODO: [3.10, 3.11, 3.12, 3.13, 3.14] |
23 | 52 | steps: |
24 | | - - uses: actions/checkout@v4 |
25 | | - - uses: prefix-dev/[email protected] |
26 | | - with: |
27 | | - environments: ${{ matrix.environment }} |
28 | | - manifest-path: pyrosetta/pixi/pixi.toml |
29 | | - |
30 | | - - name: distributed.cluster |
31 | | - run: | |
32 | | - #cd pyrosetta/pixi && pixi run -e ${{ matrix.environment }} test |
33 | | - # cd pyrosetta/pixi && pixi run python -m unittest pyrosetta.tests.* |
34 | | - cd pyrosetta/pixi && pixi run python -m unittest discover -s pyrosetta.tests.distributed.cluster |
| 53 | + - uses: actions/checkout@v4 |
| 54 | + |
| 55 | + - name: Set up Python |
| 56 | + uses: actions/setup-python@v4 |
| 57 | + with: |
| 58 | + python-version: ${{ matrix.python-version }} |
| 59 | + |
| 60 | + - name: Install uv |
| 61 | + run: | |
| 62 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
| 63 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 64 | + uv --version |
| 65 | +
|
| 66 | + - name: Install PyRosetta dependencies |
| 67 | + run: | |
| 68 | + uv pip install --system pyrosetta-installer |
| 69 | +
|
| 70 | + - name: Install PyRosetta via installer |
| 71 | + run: | |
| 72 | + python - <<'EOF' |
| 73 | + import pyrosetta_installer |
| 74 | + try: |
| 75 | + pyrosetta_installer.install_pyrosetta( |
| 76 | + distributed=True, |
| 77 | + serialization=True, |
| 78 | + skip_if_installed=True, |
| 79 | + mirror=0 |
| 80 | + ) |
| 81 | + except Exception as e: |
| 82 | + print(f"PyRosetta installation with 'mirror=0' failed: {e}. Retrying with 'mirror=1'.") |
| 83 | + pyrosetta_installer.install_pyrosetta( |
| 84 | + distributed=True, |
| 85 | + serialization=True, |
| 86 | + skip_if_installed=True, |
| 87 | + mirror=1 |
| 88 | + ) |
| 89 | + EOF |
| 90 | +
|
| 91 | + - name: Run tests (uv) |
| 92 | + run: | |
| 93 | + python -m unittest discover -s pyrosetta.tests.distributed.cluster |
| 94 | +
|
| 95 | + # ============================================================ |
| 96 | + # CONDA JOB |
| 97 | + # ============================================================ |
| 98 | + conda: |
| 99 | + name: Conda |
| 100 | + runs-on: ubuntu-latest |
| 101 | + strategy: |
| 102 | + matrix: |
| 103 | + python-version: [3.13] |
| 104 | + # TODO: [3.10, 3.11, 3.12, 3.13, 3.14] |
| 105 | + steps: |
| 106 | + - uses: actions/checkout@v4 |
| 107 | + |
| 108 | + - name: Set up Conda |
| 109 | + uses: conda-incubator/setup-miniconda@v3 |
| 110 | + with: |
| 111 | + python-version: ${{ matrix.python-version }} |
| 112 | + auto-update-conda: true |
| 113 | + activate-environment: pyrosetta-env |
| 114 | + environment-file: pyrosetta/conda/environment.yml |
| 115 | + channel-priority: strict |
| 116 | + |
| 117 | + - name: Run tests (conda) |
| 118 | + shell: bash -l {0} |
| 119 | + run: | |
| 120 | + # Initialize conda for the current shell |
| 121 | + eval "$(conda shell.bash hook)" |
| 122 | + # Activate the environment |
| 123 | + conda activate pyrosetta-env |
| 124 | + # Run unittest |
| 125 | + python -m unittest discover -s pyrosetta.tests.distributed.cluster |
| 126 | +
|
| 127 | + # ============================================================ |
| 128 | + # MAMBA JOB |
| 129 | + # ============================================================ |
| 130 | + mamba: |
| 131 | + name: Mamba |
| 132 | + runs-on: ubuntu-latest |
| 133 | + strategy: |
| 134 | + matrix: |
| 135 | + python-version: [3.13] |
| 136 | + # TODO: [3.10, 3.11, 3.12, 3.13, 3.14] |
| 137 | + steps: |
| 138 | + - uses: actions/checkout@v4 |
| 139 | + |
| 140 | + - name: Set up Miniconda |
| 141 | + uses: conda-incubator/setup-miniconda@v3 |
| 142 | + with: |
| 143 | + python-version: ${{ matrix.python-version }} |
| 144 | + auto-update-conda: true |
| 145 | + |
| 146 | + - name: Set up Mamba |
| 147 | + run: | |
| 148 | + conda install -n base -c conda-forge mamba |
| 149 | + mamba env create -f pyrosetta/conda/environment.yml |
| 150 | +
|
| 151 | + - name: Run tests (mamba) |
| 152 | + shell: bash -l {0} |
| 153 | + run: | |
| 154 | + # Initialize conda for the current shell |
| 155 | + eval "$(conda shell.bash hook)" |
| 156 | + # Activate the environment |
| 157 | + conda activate pyrosetta-env |
| 158 | + # Run unittest |
| 159 | + python -m unittest discover -s pyrosetta.tests.distributed.cluster |
0 commit comments