diff --git a/.github/workflows/ci-fortuno.yml b/.github/workflows/ci-fortuno.yml index f6cc6ed..8f17b03 100644 --- a/.github/workflows/ci-fortuno.yml +++ b/.github/workflows/ci-fortuno.yml @@ -1,4 +1,4 @@ -name: CI for Fortuno Integration +name: Integration CI on: push: @@ -10,79 +10,58 @@ on: env: BUILD_DIR: _build INSTALL_DIR: _install + FORTUNO_BUILD_DIR: _fortuno_build + FORTUNO_INSTALL_DIR: _fortuno_install + fortuno_build_path: ${{github.workspace}}/fortuno/build 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 + fortuno-build: + runs-on: ubuntu-latest steps: - - - name: Check-out code + - name: Checkout your project 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 + - name: Clone Fortuno Repository run: | - pip install cmake + git clone https://github.com/fortuno-repos/fortuno.git ${{github.workspace}}/fortuno - name: Build Fortuno + working-directory: ${{github.workspace}}/fortuno/build 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} + mkdir -p ${fortuno_build_path} + cmake -B ${fortuno_build_path} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DFORTUNO_WITH_SERIAL=ON + cmake --build ${fortuno_build_path} + cmake --install ${fortuno_build_path} + rm -rf ${fortuno_build_path} - - name: Build Your Integration + - name: Upload Fortuno Artifacts + uses: actions/upload-artifact@v3 + with: + name: fortuno-artifacts + path: | + ${FORTUNO_INSTALL_DIR}/lib + ${FORTUNO_INSTALL_DIR}/include + + integration-tests: + runs-on: ubuntu-latest + needs: fortuno-build + + steps: + - name: Checkout your project + uses: actions/checkout@v4 + + - name: Download Fortuno Artifacts + uses: actions/download-artifact@v3 + with: + name: fortuno-artifacts + + - name: Setup your project and Build run: | mkdir -p ${BUILD_DIR} - cmake -B ${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_PREFIX_PATH=${INSTALL_DIR} -DFORTUNO_WITH_SERIAL=ON + cmake -B ${BUILD_DIR} -DCMAKE_PREFIX_PATH=${FORTUNO_INSTALL_DIR} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} cmake --build ${BUILD_DIR} cmake --install ${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} + - name: Run Tests + run: ctest --output-on-failure