Skip to content

Commit

Permalink
Try to fix missing token.
Browse files Browse the repository at this point in the history
  • Loading branch information
Algiane committed Apr 9, 2024
1 parent 56487cc commit d130833
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 45 deletions.
162 changes: 162 additions & 0 deletions .github/workflows/code-cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: Code coverage

on:
# run tests on push events
push:
# run tests on PR events
pull_request:
types: [opened, synchronize]

jobs:
coverage:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-20.04

strategy:
fail-fast: true
matrix:
pattern: [on,off]
pointmap: [off]
scotch: [on,off]
vtk: [off]
int: [int32_t]

include:
# test vtk only without scotch and with delaunay insertion (more
# tests are useless)
- pattern: off
pointmap: off
scotch: off
vtk: on
int: int32_t

# Test pointmap with scotch, with and without patterns
- pattern: off
pointmap: on
scotch: on
vtk: off
int: int32_t

- pattern: on
pointmap: on
scotch: on
vtk: off
int: int32_t

# Add builds for int64
- pattern: on
pointmap: on
scotch: on
vtk: on
int: int64_t

- pattern: off
pointmap: off
scotch: on
vtk: on
int: int64_t

steps:
- name: Print options and set environment variables
run: |
echo "Job parameters:
Pattern: ${{ matrix.pattern }},
Pointmap: ${{ matrix.pointmap }},
Scotch: ${{ matrix.scotch }},
VTK: ${{ matrix.vtk }},
int: ${{ matrix.int }}"
- name: Install VTK
# Download vtk only if used
if: matrix.vtk == 'on'
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y libvtk7-dev
- name: Install Sctoch
# Download scotch only if used
if: matrix.scotch == 'on'
run: |
git clone https://gitlab.inria.fr/scotch/scotch.git
cd scotch
git checkout v6.1.3
cd src
cp Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc
make scotch -j 4
make install scotch -j 4
- name: Install LibCommons
run: |
git clone https://github.com/ISCDtoolbox/Commons.git
cd Commons
mkdir build
cd build
cmake ..
make install
- name: Install LinearElasticity
run: |
git clone https://github.com/ISCDtoolbox/LinearElasticity.git
cd LinearElasticity
mkdir build
cd build
cmake ..
make install
# checkout the provided branch name if workflow is manually run
- uses: actions/checkout@v3
if: inputs.branch_name
with:
ref: ${{github.event.inputs.branch}}
path: mmg

# checkout the event branch for automatic workflows
- uses: actions/checkout@v3
if: inputs.branch_name == ''
with:
path: mmg


- name: Configure Mmg with static libs (default behaviour)
run: |
cmake -Smmg -Bbuild \
-DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage" \
-DCMAKE_Fortran_COMPILER=gfortran-9 \
-DCMAKE_INSTALL_PREFIX=mmg-install \
-DCI_CONTEXT=ON \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DMMG_PATTERN=${{ matrix.pattern }} \
-DUSE_SCOTCH=${{ matrix.scotch }} \
-DSCOTCH_DIR=scotch \
-DUSE_VTK=${{ matrix.vtk }} \
-DMMG5_INT=${{ matrix.int }} \
-DTEST_LIBMMG=ON \
-DTEST_LIBMMGS=ON \
-DTEST_LIBMMG2D=ON \
-DTEST_LIBMMG3D=ON \
-DONLY_VERY_SHORT_TESTS=ON
shell: bash

- name: Build Mmg
run: |
cmake --build build --config Debug -j 4
- name: Install Mmg
run: |
cmake --build build --target install --config Debug -j 4
- name: Test Mmg
run: |
cd build
ctest --timeout 7200 -VV -C Debug -j 4
- name: Upload coverage to Codecov
#if: inputs.CODE_COVERAGE
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
90 changes: 45 additions & 45 deletions .github/workflows/main-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,48 +261,48 @@ jobs:
cmake ..
make install
- name: Test compilation with shared libs linkage
run: |
cmake -Smmg -Bbuild_shared \
${{ env.CMAKE_C_FLG }} \
${{ env.FORT_FLG }} \
-DCI_CONTEXT=ON \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DMMG_PATTERN=${{ matrix.pattern }} \
-DUSE_SCOTCH=${{ matrix.scotch }} \
-DSCOTCH_DIR=scotch-install \
-DUSE_VTK=${{ matrix.vtk }} \
-DMMG5_INT=${{ matrix.int }} \
-DBUILD_SHARED_LIBS=ON \
-DTEST_LIBMMG=ON \
-DTEST_LIBMMGS=ON \
-DTEST_LIBMMG2D=ON \
-DTEST_LIBMMG3D=ON \
${{ inputs.add_cmake_cfg_args }}
cmake --build build_shared --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
shell: bash

- name: Test compilation without library linkage
run: |
cmake -Smmg -Bbuild_nolibs \
${{ env.CMAKE_C_FLG }} \
${{ env.FORT_FLG }} \
-DCI_CONTEXT=ON \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DMMG_PATTERN=${{ matrix.pattern }} \
-DUSE_SCOTCH=${{ matrix.scotch }} \
-DSCOTCH_DIR=scotch-install \
-DUSE_VTK=${{ matrix.vtk }} \
-DMMG5_INT=${{ matrix.int }} \
-DLIBMMG_STATIC=OFF \
-DLIBMMGS_STATIC=OFF \
-DLIBMMG2D_STATIC=OFF \
-DLIBMMG3D_STATIC=OFF \
${{ inputs.add_cmake_cfg_args }}
cmake --build build_nolibs --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
shell: bash
#name: Test compilation with shared libs linkage
#run: |
# cmake -Smmg -Bbuild_shared \
# ${{ env.CMAKE_C_FLG }} \
# ${{ env.FORT_FLG }} \
# -DCI_CONTEXT=ON \
# -DBUILD_TESTING=ON \
# -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
# -DMMG_PATTERN=${{ matrix.pattern }} \
# -DUSE_SCOTCH=${{ matrix.scotch }} \
# -DSCOTCH_DIR=scotch-install \
# -DUSE_VTK=${{ matrix.vtk }} \
# -DMMG5_INT=${{ matrix.int }} \
# -DBUILD_SHARED_LIBS=ON \
# -DTEST_LIBMMG=ON \
# -DTEST_LIBMMGS=ON \
# -DTEST_LIBMMG2D=ON \
# -DTEST_LIBMMG3D=ON \
# ${{ inputs.add_cmake_cfg_args }}
# cmake --build build_shared --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
#shell: bash
#
#name: Test compilation without library linkage
#run: |
# cmake -Smmg -Bbuild_nolibs \
# ${{ env.CMAKE_C_FLG }} \
# ${{ env.FORT_FLG }} \
# -DCI_CONTEXT=ON \
# -DBUILD_TESTING=ON \
# -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
# -DMMG_PATTERN=${{ matrix.pattern }} \
# -DUSE_SCOTCH=${{ matrix.scotch }} \
# -DSCOTCH_DIR=scotch-install \
# -DUSE_VTK=${{ matrix.vtk }} \
# -DMMG5_INT=${{ matrix.int }} \
# -DLIBMMG_STATIC=OFF \
# -DLIBMMGS_STATIC=OFF \
# -DLIBMMG2D_STATIC=OFF \
# -DLIBMMG3D_STATIC=OFF \
# ${{ inputs.add_cmake_cfg_args }}
# cmake --build build_nolibs --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
#shell: bash

- name: Configure Mmg with static libs (default behaviour)
run: |
Expand Down Expand Up @@ -344,14 +344,14 @@ jobs:
if: matrix.vtk == 'off' && matrix.int == 'int32_t'
run: |
cd build
ctest --timeout 7200 -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
ctest --timeout 7200 -N -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Test Mmg with in64_t integers
# Run long tests only on ubuntu with pattern off, scotch on, vtk on and int64_t integers
if: matrix.os == 'ubuntu-20.04' && matrix.pattern == 'off' && matrix.scotch == 'on' && matrix.vtk == 'on' && matrix.int == 'int64_t'
run: |
cd build
ctest --timeout 7200 -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
ctest --timeout 7200 -N -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Test non native I/Os of Mmg
if: matrix.vtk == 'on'
Expand All @@ -368,7 +368,7 @@ jobs:
build/TEST_OUTPUTS
- name: Upload coverage to Codecov
if: inputs.code_coverage == true
#if: matrix.os == 'ubuntu-20.04'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
Expand Down

0 comments on commit d130833

Please sign in to comment.