|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: CI |
| 4 | +env: |
| 5 | + GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }} |
| 6 | + |
| 7 | +# Controls when the workflow will run |
| 8 | +on: |
| 9 | + # Triggers the workflow on push or pull request events but only for the "main" branch |
| 10 | + push: |
| 11 | + branches: [ "main" ] |
| 12 | + pull_request: |
| 13 | + branches: [ "main" ] |
| 14 | + |
| 15 | + # Allows you to run this workflow manually from the Actions tab |
| 16 | + workflow_dispatch: |
| 17 | + |
| 18 | +jobs: |
| 19 | + MEPHIT: |
| 20 | + name: Build and test |
| 21 | + runs-on: ubuntu-latest |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v3 |
| 25 | + |
| 26 | + - name: Install dependencies |
| 27 | + run: | |
| 28 | + sudo apt-get update && apt-get install -y -q --no-install-recommends \ |
| 29 | + apt-transport-https \ |
| 30 | + build-essential \ |
| 31 | + ca-certificates \ |
| 32 | + curl \ |
| 33 | + libssl-dev \ |
| 34 | + openssh-client \ |
| 35 | + rsync \ |
| 36 | + wget \ |
| 37 | + git \ |
| 38 | + gfortran \ |
| 39 | + ninja-build \ |
| 40 | + cmake \ |
| 41 | + python3 \ |
| 42 | + python3-dev \ |
| 43 | + python3-pip \ |
| 44 | + python3-venv |
| 45 | +
|
| 46 | + sudo apt-get install -y -q --no-install-recommends \ |
| 47 | + procps \ |
| 48 | + nano \ |
| 49 | + vim \ |
| 50 | + htop \ |
| 51 | + ncdu \ |
| 52 | + less \ |
| 53 | + gdb \ |
| 54 | + cmake-curses-gui |
| 55 | +
|
| 56 | + sudo apt-get install -y -q --no-install-recommends \ |
| 57 | + pkg-config \ |
| 58 | + libsuitesparse-dev \ |
| 59 | + libopenblas-dev \ |
| 60 | + libsuperlu-dev \ |
| 61 | + libhdf5-dev \ |
| 62 | + libhdf5-openmpi-dev \ |
| 63 | + libnetcdf-dev \ |
| 64 | + libnetcdff-dev \ |
| 65 | + libfftw3-dev \ |
| 66 | + libgsl-dev \ |
| 67 | + libopenmpi-dev \ |
| 68 | + libscalapack-openmpi-dev \ |
| 69 | + libpcre3-dev \ |
| 70 | + libreadline-dev \ |
| 71 | + h5utils \ |
| 72 | + hdf5-tools \ |
| 73 | + netcdf-bin |
| 74 | +
|
| 75 | + sudo apt-get install -y -q --no-install-recommends \ |
| 76 | + python3-wheel python3-setuptools \ |
| 77 | + # Shell and file formats |
| 78 | + python3-ipython jupyter python3-sphinx python3-matplotlib \ |
| 79 | + python3-openpyxl python3-xlrd python3-h5py python3-netcdf4 \ |
| 80 | + # Scientific computing |
| 81 | + python3-sympy python3-uncertainties python3-numpy python3-scipy \ |
| 82 | + python3-numba \ |
| 83 | + # Statistics |
| 84 | + python3-pandas python3-sklearn python3-torch \ |
| 85 | + # For OMFIT |
| 86 | + python3-boto3 python3-lmfit python3-configobj python3-dill \ |
| 87 | + python3-pyodbc python3-pyotp \ |
| 88 | + # Misc |
| 89 | + fortran-language-server python3-tqdm python3-pytest \ |
| 90 | + python3-mpi4py python3-skbuild |
| 91 | +
|
| 92 | + mkdir -p ~/venv |
| 93 | + python3 -m venv --system-site-packages ~/venv/plasma |
| 94 | + python -m pip install pylance black f90wrap |
| 95 | +
|
| 96 | + echo 'export PATH=~/bin:$PATH' >> ~/.bashrc && \ |
| 97 | + echo 'export LD_LIBRARY_PATH=~/bin:$LD_LIBRARY_PATH' >> ~/.bashrc && \ |
| 98 | + echo 'export STELLOPT_PATH="/src/STELLOPT"' >> ~/.bashrc && \ |
| 99 | + echo 'export MACHINE="ubuntu"' >> ~/.bashrc && \ |
| 100 | + echo 'export OMPI_ALLOW_RUN_AS_ROOT=1' >> ~/.bashrc && \ |
| 101 | + echo 'export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1' >> ~/.bashrc && \ |
| 102 | + echo '. ~/venv/plasma/bin/activate' >> ~/.bashrc |
| 103 | +
|
| 104 | + - name: Initialize Gitlab access token |
| 105 | + run: | |
| 106 | + git config --global credential.helper store |
| 107 | + echo "https://x-access-token:[email protected]" >> ~/.git-credentials |
| 108 | +
|
| 109 | + - name: libneo |
| 110 | + run: | |
| 111 | + git clone https://github.com/itpplasma/libneo.git |
| 112 | +
|
| 113 | + - name: NEO-2 |
| 114 | + run: | |
| 115 | + git clone https://github.com/itpplasma/NEO-2.git |
| 116 | +
|
| 117 | + - name: NEO-RT |
| 118 | + run: | |
| 119 | + mkdir contrib |
| 120 | + cd contrib |
| 121 | + git clone [email protected]:itpplasma/quadpack |
| 122 | + git clone [email protected]:itpplasma/vode |
| 123 | + cd .. |
| 124 | + git clone [email protected]:itpplasma/spline |
| 125 | + git clone [email protected]:itpplasma/BOOZER_MAGFIE |
| 126 | + git clone [email protected]:itpplasma/NEO-RT |
| 127 | +
|
| 128 | + - name: SIMPLE |
| 129 | + run: | |
| 130 | + git clone [email protected]:itpplasma/SIMPLE |
| 131 | +
|
| 132 | + - name: GORILLA |
| 133 | + run: | |
| 134 | + git clone https://github.com/itpplasma/GORILLA.git |
| 135 | +
|
| 136 | + - name: MEPHIT |
| 137 | + run: | |
| 138 | + git clone https://gitlab.tugraz.at/plasma/codes/MEPHIT.git |
| 139 | +
|
| 140 | + - name: KIM |
| 141 | + run: | |
| 142 | + git clone https://gitlab.tugraz.at/plasma/codes/MEPHIT.git |
0 commit comments