diff --git a/.github/workflows/ci-fortuno.yml b/.github/workflows/ci-fortuno.yml new file mode 100644 index 0000000..170dc5b --- /dev/null +++ b/.github/workflows/ci-fortuno.yml @@ -0,0 +1,81 @@ +name: CI for Fortuno Integration + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +env: + BUILD_DIR: _build + INSTALL_DIR: _install + +jobs: + + # + # Test Fortuno integration in various configurations + # + fortuno-integration-test: + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + compiler: gnu + mpi: nompi + interface: serial + - os: ubuntu-latest + compiler: gnu + mpi: mpich + interface: mpi + - os: ubuntu-latest + compiler: intel + mpi: nompi + interface: serial + + steps: + + - name: Check-out code + uses: actions/checkout@v4 + + - name: Setup Intel compiler + if: ${{ contains(matrix.compiler, 'intel') }} + uses: rscohn2/setup-oneapi@v0 + with: + components: | + ifx + icx + impi + + - name: Setup GNU compiler + if: ${{ contains(matrix.compiler, 'gnu') }} + uses: fortran-lang/setup-fortran@v1 + with: + compiler: gcc + version: 13 + + - name: Setup build tools + run: | + pip install cmake fpm meson ninja fypp + + - name: Build Fortuno + run: | + mkdir -p ${BUILD_DIR} + cmake -B ${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DFORTUNO_WITH_SERIAL=ON + cmake --build ${BUILD_DIR} + cmake --install ${BUILD_DIR} + rm -rf ${BUILD_DIR} + + - name: Run tests + run: | + cd ${BUILD_DIR}/app + ./testapp + ./testapp_fpp + ./testapp_fypp + + - name: Cleanup + run: | + rm -rf ${INSTALL_DIR} ${FPM_EXPORT_DIR} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ee9749..7bc59c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,6 @@ name: ci env: build_path: ${{github.workspace}}/build - fortuno_build_path: ${{github.workspace}}/fortuno/build jobs: build_and_test: @@ -27,23 +26,9 @@ jobs: - name: Display versions run: | gfortran --version - cmake --version + cmake --version - - name: Clone Fortuno - run: | - git clone https://github.com/fortuno-repos/fortuno.git ${{github.workspace}}/fortuno - ls -l - - - name: Create Fortuno Build Directory - run: cmake -E make_directory ${{env.fortuno_build_path}} - - - name: Build Fortuno - working-directory: ${{env.fortuno_build_path}} - run: | - cmake .. - make - - - name: Create Project Build Directory + - name: Create Build Directory run: cmake -E make_directory ${{env.build_path}} - name: Configure CMake