Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5964c8c
Change the coverage generation process to be more accurate
adrienbernede Apr 19, 2021
23c657b
Missing changes
adrienbernede Apr 19, 2021
f8a6ab8
Do not require a list of dirs: no breaking change!
adrienbernede Apr 21, 2021
b0d2271
Allow custom codecov config location + verif hash
adrienbernede Apr 26, 2021
c85f59c
Fix
adrienbernede Apr 27, 2021
02c8799
Fix
adrienbernede Apr 27, 2021
4ff2034
Fix script given by codecov doc
adrienbernede Apr 27, 2021
82485d6
Codecov should pick .codecov.yml
adrienbernede Apr 29, 2021
18dca09
Merge branch 'testing/bernede1/codecov' into v1.0
adrienbernede Apr 30, 2021
d91f2cf
Add a changelog
adrienbernede Apr 30, 2021
45085b0
Enable the "-pedantic -Wall -Werror" flags on Mac.
v-dobrev Jun 4, 2021
9a7e2d6
Apply changes for hypre-bigint
adrienbernede Jun 29, 2021
5c2e810
Improve ordering
adrienbernede Jun 29, 2021
ca137e7
Remove wrong flags in MFEM build for hypre bigint
adrienbernede Jul 14, 2021
bbde35e
Change of name for target values
adrienbernede Jul 20, 2021
f1edcc5
Apply rename of mfem option (optim -> opt, debug -> dbg)
adrienbernede Aug 2, 2021
7eb94c4
Apply rename of mfem option (parallel -> par)
adrienbernede Aug 2, 2021
5efa5ee
Merge branch 'v2.0' into warnings-flags-tweak
adrienbernede Sep 2, 2021
87f9e17
fix
adrienbernede Sep 2, 2021
aa7d337
Use new Codecov binary uploader
pazner Nov 4, 2021
3cf5987
Merge pull request #3 from pazner/codecov-new-uploader
tzanio Nov 6, 2021
212c5a3
Merge pull request #2 from mfem/warnings-flags-tweak
tzanio Nov 6, 2021
bd834c4
A small tweak in the build-mfem action
v-dobrev Nov 7, 2021
c444b09
Merge pull request #5 from mfem/v2.0-tweak
v-dobrev Nov 7, 2021
4083f08
Update CHANGELOG.md
tzanio Nov 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.0]

### Added

- The codecov bash script is hash-checked.

### Changed

- BREAKING CHANGE: `upload-coverage` requires lcov to be installed.
- `upload-coverage` optionally takes a list of directories.
- The coverage report generation process is inspired from LLNL/BLT and LLNL/Serac.

### Removed

### Fixed
32 changes: 24 additions & 8 deletions build-hypre/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,43 @@
name: build-hypre

inputs:
hypre-url:
url:
description: 'URL where to look for Hypre'
required: false
default: 'https://github.com/hypre-space/hypre/archive'
hypre-archive:
archive:
description: 'Archive to download'
required: true
hypre-dir:
dir:
description: 'Hypre top directory name'
required: true
target:
description: 'A key to identify the desired hypre config (int32, int64)'
required: false
default: int32

runs:
using: "composite"
steps:
- name: Install Hypre
run: |
wget --no-verbose ${{ inputs.hypre-url }}/${{ inputs.hypre-archive }};
rm -rf ${{ inputs.hypre-dir }};
tar -xzf ${{ inputs.hypre-archive }};
cd ${{ inputs.hypre-dir }}/src;
./configure --disable-fortran CC=mpicc CXX=mpic++;
echo "Map target to options"
if [[ "${{ inputs.target }}" == "int32" ]]
then
export hypre_options="--disable-fortran";
elif [[ "${{ inputs.target }}" == "int64" ]]
then
export hypre_options="--disable-fortran --enable-bigint";
else
echo "Hypre target not recognized";
exit 1;
fi
echo "Installing Hypre"
wget --no-verbose ${{ inputs.url }}/${{ inputs.archive }};
rm -rf ${{ inputs.dir }};
tar -xzf ${{ inputs.archive }};
cd ${{ inputs.dir }}/src;
./configure ${hypre_options} CC=mpicc CXX=mpic++;
make -j3;
cd ../..;
shell: bash
14 changes: 7 additions & 7 deletions build-metis/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
name: build-metis

inputs:
metis-url:
url:
description: 'URL where to look for Metis'
required: false
default: 'https://mfem.github.io/tpls'
metis-archive:
archive:
description: 'Archive to download'
required: true
metis-dir:
dir:
description: 'Metis top directory name'
required: true

Expand All @@ -28,8 +28,8 @@ runs:
steps:
- name: Install Metis
run: |
wget --no-verbose ${{ inputs.metis-url }}/${{ inputs.metis-archive }};
rm -rf ${{ inputs.metis-dir }};
tar -xzf ${{ inputs.metis-archive }};
make -j3 -C ${{ inputs.metis-dir }}/Lib CC=mpicc OPTFLAGS="-Wno-error=implicit-function-declaration -O2";
wget --no-verbose ${{ inputs.url }}/${{ inputs.archive }};
rm -rf ${{ inputs.dir }};
tar -xzf ${{ inputs.archive }};
make -j3 -C ${{ inputs.dir }}/Lib CC=mpicc OPTFLAGS="-Wno-error=implicit-function-declaration -O2";
shell: bash
21 changes: 11 additions & 10 deletions build-mfem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ inputs:
description: 'os'
required: true
target:
description: 'Type of target (debug, optim)'
description: 'Type of target (dbg, opt)'
required: false
default: optim
default: opt
mpi:
description: 'MPI status'
required: false
default: parallel
default: par
codecov:
description: 'Codecov status'
required: false
Expand Down Expand Up @@ -71,23 +71,24 @@ runs:
echo "-----------------------------"
echo "--- Prepare Configuration ---"
MPI="NO"
if [[ ${{ inputs.mpi }} == 'parallel' ]]; then
if [[ ${{ inputs.mpi }} == 'par' ]]; then
MPI="YES"
echo "[INFO] Hypre symlink: hypre -> ${{ inputs.hypre-dir }}"
ln -s -f ${{ inputs.hypre-dir }} hypre;
echo "[INFO] Metis symlink: metis -> ${{ inputs.metis-dir }}"
ln -s -f ${{ inputs.metis-dir }} metis-4.0;
fi
echo "[STATUS] MPI: ${MPI}"
CPPFLAGS="";
DEBUG="NO";
CPPFLAGS=""
DEBUG="NO"
BUILD_TYPE="Release"
if [[ ${{ inputs.target }} == 'debug' ]]; then
if [[ ${{ inputs.target }} == 'dbg' ]]; then
DEBUG="YES";
BUILD_TYPE="Debug";
if [[ ${{ inputs.os }} == 'ubuntu-18.04' ]]; then
CPPFLAGS+=" -pedantic -Wall -Werror";
fi
fi
if [[ ${{ runner.os }} != 'Linux' || \
${{ inputs.target }} == 'dbg' ]]; then
CPPFLAGS+=" -pedantic -Wall -Werror";
fi
echo "[STATUS] DEBUG: ${DEBUG}"
echo "[STATUS] BUILD_TYPE: ${BUILD_TYPE}"
Expand Down
31 changes: 26 additions & 5 deletions upload-coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# CONTRIBUTING.md for details.

name: Upload Coverage
description: Upload coverage to codecov
description: Upload coverage to codecov, requires lcov.

inputs:
name:
Expand All @@ -19,15 +19,36 @@ inputs:
project_dir:
description: "Path to the project directory"
required: true
directories:
descripton: "List of directories to look for coverage info"
required: false

runs:
using: "composite"

steps:
- run: |
cd ${{ inputs.project_dir }}
curl -o codecov.sh -f https://codecov.io/bash || \
curl -o codecov.sh -f https://codecov.io/bash || \
curl -o codecov.sh -f https://codecov.io/bash
bash codecov.sh -n "${{ inputs.name }}"
# Restrict search to directories listed, if any.
directory_list="${{ inputs.directories }}";
dirs_opts="";
if [[ -n "${directory_list}" ]]; then
for dir in ${directory_list}; do dirs_opts+=" --directory=${dir}"; done
fi
# Generate the coverage report.
lcov --no-external --gcov-tool gcov ${dirs_opts} --capture --output-file lcov.info;
# The variable $RUNNER_OS should be either "Linux" or "macOS"
os_lowercase=$(echo $RUNNER_OS | awk '{print tolower($0)}')
# The prefix will end with "linux" or "macos" depending on the runner OS
prefix="https://uploader.codecov.io/latest/$os_lowercase"
curl -Os "$prefix/codecov"
# Check integrity of the binary uploader (cf. https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader)
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
curl -Os "$prefix/codecov.SHA256SUM"
curl -Os "$prefix/codecov.SHA256SUM.sig"
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
# Run the uploader
chmod +x codecov
./codecov -n "${{ inputs.name }}"
shell: bash