Skip to content

update build.yml

update build.yml #13

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5 # <-- Upgraded from @v4
- name: Install compiler and dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
libopenmpi-dev \
openmpi-bin
- name: Configure CMake
# Creates the build directory and generates build files automatically
run: cmake -B build -S .
- name: Build project
# Compiles the target inside the build directory using all available cores
run: cmake --build build -j $(nproc)
- name: Run executable
run: |
# We use mpirun with 2 ranks to verify our MPI environment
# is fully operational within the GitHub environment!
mpirun -np 2 ./build/miniClimate \
--nx 64 \
--ny 64 \
--steps 10