Skip to content

Commit

Permalink
Merge pull request #191 from MmgTools/develop
Browse files Browse the repository at this point in the history
Merge develop into master for release 5.7.0
  • Loading branch information
Algiane committed Dec 12, 2022
2 parents b29c88d + c12544a commit 94c6c60
Show file tree
Hide file tree
Showing 276 changed files with 32,295 additions and 22,509 deletions.
58 changes: 37 additions & 21 deletions .github/workflows/dbg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ name: Dbg

on:
workflow_dispatch:
# Inputs the workflow accepts.
# Inputs the workflow accepts.
inputs:
cmake_build_type:
description: 'Value for CMAKE_BUILD_TYPE'
type: string
default: Release
default: Debug
required: true

add_cmake_cfg_args:
description: 'Additional arguments for configuration step'
default: -D LONG_TESTS=ON
required: false
type: string

Expand All @@ -28,7 +29,7 @@ on:
os:
description: 'os'
required: true
default: 'ubuntu-20.04'
default: 'windows-2019'
options:
- 'ubuntu-20.04'
- 'macos-10.15'
Expand Down Expand Up @@ -58,12 +59,21 @@ on:
- 'on'
- 'off'

debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
# job
jobs:
ci:
runs-on: ${{ github.event.inputs.os }}

steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
timeout-minutes: 150

- name: Print options and set environment variables
run: |
echo "${{ github.event.inputs.name }}:
Expand All @@ -88,23 +98,29 @@ jobs:
echo "BUILD_CMD=cmake --build . --config ${{ github.event.inputs.cmake_build_type }}" >> "$GITHUB_ENV"
echo "TEST_FLG=-C ${{ github.event.inputs.cmake_build_type }} ${{ github.event.inputs.add_ctest_args }}" >> "$GITHUB_ENV"
fi
echo "CMAKE_FLG: ${{ github.event.inputs.add_cmake_cfg_args }} "
# Remark: we can't print env variable value in this context
env:
NJOBS: "2"

shell: bash

# checkout the provided branch name if workflow is manually run
- uses: actions/checkout@v2
- uses: actions/checkout@v3
if: inputs.branch_name
with:
ref: ${{ github.event.inputs.branch }}

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

- name: Print windows arch info
if: runner.os == 'windows'
run: |
WMIC CPU Get DeviceID, NumberOfCores, NumberOfLogicalProcessors
wmic OS get Caption,CSDVersion,OSArchitecture,Version
- name: Install VTK
# Download vtk only if used
if: github.event.inputs.vtk == 'on'
Expand Down Expand Up @@ -134,7 +150,7 @@ jobs:

- name: Install LibCommons
# LinearElasticity don't build with MSVC
if: github.event.inputs.os != 'windows-2022'
if: runner.os != 'windows'
run: |
git clone https://github.com/ISCDtoolbox/Commons.git
cd Commons
Expand All @@ -145,7 +161,7 @@ jobs:
- name: Install LinearElasticity
# LinearElasticity don't build with MSVC
if: github.event.inputs.os != 'windows-2022'
if: runner.os != 'windows'
run: |
git clone https://github.com/ISCDtoolbox/LinearElasticity.git
cd LinearElasticity
Expand All @@ -162,30 +178,30 @@ jobs:
cmake ${{ env.FORT_FLG }} \
-DCI_CONTEXT=ON \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=${{ inputs.cmake_build_type }} \
-DPATTERN=${{ matrix.pattern }} \
-DUSE_SCOTCH=${{ matrix.scotch }} \
-DUSE_VTK=${{ matrix.vtk }} \
-DCMAKE_BUILD_TYPE=${{ github.event.inputs.cmake_build_type }} \
-DMMG_PATTERN=${{ github.event.inputs.pattern }} \
-DUSE_SCOTCH=${{ github.event.inputs.scotch }} \
-DUSE_VTK=${{ github.event.inputs.vtk }} \
-DTEST_LIBMMG=ON \
-DTEST_LIBMMGS=ON \
-DTEST_LIBMMG2D=ON \
-DTEST_LIBMMG3D=ON \
${{ github.events.inputs.add_cmake_cfg_args }} ..
${{ github.event.inputs.add_cmake_cfg_args }} ..
shell: bash

- name: Build Mmg
run: |
cd build
${{env.BUILD_CMD}}
- name: Test Mmg
if: github.event.inputs.vtk == 'off'
run: |
cd build
ctest -VV ${{ env.TEST_FLG }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: Mmg-bin
path: |
build/bin
- name: Test non native I/Os of Mmg
if: github.event.inputs.vtk == 'on'
- name: Test Mmg
run: |
cd build
ctest -R "msh|vtk" -VV ${{ env.TEST_FLG }}
ctest ${{ env.TEST_FLG }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: C/C++ CI
name: Fast check without dependencies

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

jobs:
build:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/long-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Long tests

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

# run tests manually on a given branch (default is master)
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
branch:
# branch to test
description: 'branch to test'
# Default value if no value is explicitly provided
default: 'master'
required: false

# job
jobs:
mmg-debug:
uses: ./.github/workflows/main-job.yml
with:
cmake_build_type: RelWithAssert
add_cmake_cfg_args: -D LONG_TESTS=ON
branch_name: ${{github.event.inputs.branch}}
Loading

0 comments on commit 94c6c60

Please sign in to comment.