name: CI with CUDA on: push: branches: - main jobs: build: runs-on: ubuntu-latest container: image: nvidia/cuda:12.9.0-devel-ubuntu24.04 timeout-minutes: 180 steps: - name: Set timezone run: ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime - name: Install dependencies run: | export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null apt-add-repository 'deb https://apt.kitware.com/ubuntu/ noble main' apt-get update apt-get install -y cmake flex bison openmpi-bin libopenmpi-dev gfortran git python3 python3-numpy python3-pandas - name: Checkout code uses: actions/checkout@v4 with: submodules: true - name: Setup run: | git clone --recurse-submodules --remote https://github.com/pencil-code/pencil-code.git cd pencil-code source sourceme.sh git remote set-url origin https://ToxPuro:${{ secrets.PENCIL_PASSWORD }}@pencil-code.org/git/ - name: Sample0 run: | cd $PENCIL_HOME/src/astaroth python3 update_fortran.py -p ~/pencil-code - name: Sample0_commit if: steps.sample0.outputs.code != '0' run: | cd $PENCIL_HOME git add src/*.f90 git commit -m"Automatic commit to keep code GPU-enabled" git push