|
| 1 | +name: Simvue Examples |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: ["main", "dev", "hotfix/update-ci"] |
| 6 | + pull_request: |
| 7 | + branches: [ "main", "dev", "hotfix/update-ci" ] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + |
| 13 | +jobs: |
| 14 | + GeometryOptimisation: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + if: false # deactivate for now |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + - name: Download BlueMira |
| 20 | + uses: actions/checkout@v4 |
| 21 | + with: |
| 22 | + repository: Fusion-Power-Plant-Framework/bluemira |
| 23 | + ref: v1.10.0 |
| 24 | + path: blue_mira |
| 25 | + - uses: conda-incubator/setup-miniconda@v3 |
| 26 | + with: |
| 27 | + activate-environment: bluemira |
| 28 | + environment-file: blue_mira/conda/environment.yml |
| 29 | + miniforge-version: "latest" |
| 30 | + use-only-tar-bz2: false |
| 31 | + miniforge-variant: Mambaforge |
| 32 | + use-mamba: true |
| 33 | + python-version: "3.11" |
| 34 | + - name: Install bluemira |
| 35 | + shell: bash -l {0} |
| 36 | + run: pip install -e blue_mira |
| 37 | + - name: Install Simvue |
| 38 | + shell: bash -l {0} |
| 39 | + run: pip install -e . |
| 40 | + - name: Run Example |
| 41 | + shell: bash -l {0} |
| 42 | + run: python ./examples/GeometryOptimisation/bluemira_simvue_geometry_optimisation.py |
| 43 | + Logging: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + if: false # deactivate for now |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v4 |
| 48 | + - name: Setup Python |
| 49 | + uses: actions/setup-python@v5 |
| 50 | + with: |
| 51 | + python-version: "3.11" |
| 52 | + - name: Install Simvue |
| 53 | + run: python3 -m pip install . |
| 54 | + - name: Run Example |
| 55 | + run: | |
| 56 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 57 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 58 | + python3 examples/Logging/logging-to-simvue.py --ci |
| 59 | + OpenFOAM: |
| 60 | + runs-on: ubuntu-latest |
| 61 | + if: false # deactivate for now |
| 62 | + container: |
| 63 | + image: openfoam/openfoam10-paraview56 |
| 64 | + options: --user root |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + - name: Manual Python Install |
| 68 | + run: | |
| 69 | + add-apt-repository ppa:deadsnakes/ppa -y |
| 70 | + apt-get update && \ |
| 71 | + apt-get install -y git wget curl python3.11-full |
| 72 | +
|
| 73 | + - name: Install dependencies |
| 74 | + run: | |
| 75 | + python3.11 -m ensurepip --upgrade |
| 76 | + python3.11 -m pip install ukaea-multiparser |
| 77 | + - name: Install Package |
| 78 | + run: python3.11 -m pip install . |
| 79 | + - name: Run Example |
| 80 | + shell: bash |
| 81 | + run: | |
| 82 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 83 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 84 | + python3.11 ./examples/OpenFOAM/simvue_openfoam.py /opt/openfoam10/tutorials/incompressible/pimpleFoam/laminar/movingCone/Allrun --ci |
| 85 | + Optuna: |
| 86 | + runs-on: ubuntu-latest |
| 87 | + if: false # deactivate for now |
| 88 | + steps: |
| 89 | + - uses: actions/checkout@v4 |
| 90 | + - name: Setup Python |
| 91 | + uses: actions/setup-python@v5 |
| 92 | + with: |
| 93 | + python-version: "3.11" |
| 94 | + - name: Install Simvue |
| 95 | + run: python3 -m pip install . |
| 96 | + - name: Install Dependencies |
| 97 | + run: | |
| 98 | + python3 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu |
| 99 | + python3 -m pip install -r examples/Optuna/PyTorch/requirements.txt |
| 100 | + - name: Run Example |
| 101 | + run: | |
| 102 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 103 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 104 | + python3.11 ./examples/Optuna/PyTorch/simvue_optuna_pytorch.py --ci |
| 105 | + PyTorch: |
| 106 | + runs-on: ubuntu-latest |
| 107 | + if: false # deactivate for now |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@v4 |
| 110 | + - name: Setup Python |
| 111 | + uses: actions/setup-python@v5 |
| 112 | + with: |
| 113 | + python-version: "3.11" |
| 114 | + - name: Install Simvue |
| 115 | + run: python3 -m pip install . |
| 116 | + - name: Install Dependencies |
| 117 | + run: | |
| 118 | + python3 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu |
| 119 | + python3 -m pip install -r examples/PyTorch/requirements.txt |
| 120 | + - name: Run Example |
| 121 | + run: | |
| 122 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 123 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 124 | + python3.11 ./examples/PyTorch/main.py --ci |
| 125 | + SU2: |
| 126 | + runs-on: ubuntu-latest |
| 127 | + if: false # deactivate for now |
| 128 | + steps: |
| 129 | + - uses: actions/checkout@v4 |
| 130 | + - name: Setup Python |
| 131 | + uses: actions/setup-python@v5 |
| 132 | + with: |
| 133 | + python-version: "3.11" |
| 134 | + - name: Download SU2 |
| 135 | + run: | |
| 136 | + wget https://github.com/su2code/SU2/releases/download/v8.0.1/SU2-v8.0.1-linux64.zip |
| 137 | + unzip SU2-v8.0.1-linux64.zip |
| 138 | + - name: Install dependencies |
| 139 | + run: | |
| 140 | + python -m pip install ukaea-multiparser |
| 141 | + python -m pip install . |
| 142 | + - name: Run Example |
| 143 | + run: | |
| 144 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 145 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 146 | + python examples/SU2/SU2.py bin --config tests/example_data/SU2_inv_ONERAM6.cfg --ci |
| 147 | + TensorFlow: |
| 148 | + if: false # deactivate for now |
| 149 | + runs-on: ubuntu-latest |
| 150 | + steps: |
| 151 | + - uses: actions/checkout@v4 |
| 152 | + - name: Setup Python |
| 153 | + uses: actions/setup-python@v5 |
| 154 | + with: |
| 155 | + python-version: "3.11" |
| 156 | + - name: Install Simvue |
| 157 | + run: python3 -m pip install . |
| 158 | + - name: Install Dependencies |
| 159 | + run: python3 -m pip install -r examples/Tensorflow/requirements.txt |
| 160 | + - name: Run Example |
| 161 | + run: | |
| 162 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 163 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 164 | + python3.11 ./examples/Tensorflow/dynamic_rnn.py --ci |
| 165 | + FDS: |
| 166 | + runs-on: ubuntu-latest |
| 167 | + container: |
| 168 | + image: openbcl/fds:6.9.1 |
| 169 | + steps: |
| 170 | + - uses: actions/checkout@v4 |
| 171 | + - name: Setup Python |
| 172 | + uses: actions/setup-python@v5 |
| 173 | + with: |
| 174 | + python-version: "3.11" |
| 175 | + - name: Install Simvue |
| 176 | + run: python3 -m pip install . |
| 177 | + - name: Install Dependencies |
| 178 | + run: python3 -m pip install -r examples/FDS/requirements.txt |
| 179 | + - name: Run Example |
| 180 | + run: | |
| 181 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 182 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 183 | + python3.11 ./examples/FDS/minimal_fds.py examples/FDS/activate_vents.fds . --ci |
| 184 | + GEANT4: |
| 185 | + if: false # deactivate for now |
| 186 | + runs-on: ubuntu-latest |
| 187 | + container: |
| 188 | + image: artemisbeta/geant4:11.2.1 |
| 189 | + steps: |
| 190 | + - uses: actions/checkout@v4 |
| 191 | + with: |
| 192 | + submodules: recursive |
| 193 | + - name: Setup Python |
| 194 | + uses: actions/setup-python@v5 |
| 195 | + with: |
| 196 | + python-version: "3.11" |
| 197 | + - name: Install Simvue |
| 198 | + run: python3 -m pip install . |
| 199 | + - name: Install Dependencies |
| 200 | + run: python3 -m pip install -r examples/Geant4/requirements.txt |
| 201 | + - name: Build Example |
| 202 | + run: | |
| 203 | + cmake -DCMAKE_PREFIX_PATH=/usr/local/share/geant4/install/4.11.2/ -Bbuild examples/Geant4/FixedTarget/ |
| 204 | + cmake --build build |
| 205 | + - name: Run Example |
| 206 | + run: | |
| 207 | + export SIMVUE_URL=${{ secrets.SIMVUE_URL }} |
| 208 | + export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }} |
| 209 | + python examples/Geant4/geant4_simvue.py build/MaterialTesting --ci --events 10 |
0 commit comments