Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI cleanup; All CI workflows are required to pass before merge to develop. #243

Merged
merged 19 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
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
59 changes: 59 additions & 0 deletions .github/workflows/Intel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Intel
on:
push:
branches:
- develop
paths-ignore:
- README.md
pull_request:
branches:
- develop
paths-ignore:
- README.md

# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

jobs:
Intel:
runs-on: ubuntu-latest
env:
CC: icc
FC: ifort

steps:

# See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html
- name: install-intel
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile

- name: checkout
uses: actions/checkout@v2
with:
path: bufr
submodules: true

- name: build
run: |
cd bufr
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=./install -DENABLE_PYTHON=OFF ..
make -j2 VERBOSE=1
make install

- name: test-bufr
run: |
cd bufr/build
ctest --verbose --output-on-failure --rerun-failed
61 changes: 61 additions & 0 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Linux
on:
push:
branches:
- develop
paths-ignore:
- README.md
pull_request:
branches:
- develop
paths-ignore:
- README.md

jobs:
Linux:
runs-on: ubuntu-latest
strategy:
matrix:
ccompiler: [clang, gcc-9, gcc-10]

steps:

- name: install-deps
run: |
sudo apt-get update
sudo apt-get install python3-pip python3-dev python3-numpy
sudo python3 -m pip install -U pip setuptools
sudo python3 -m pip install -U numpy
sudo python3 -m pip install -U netCDF4
sudo python3 -m pip install -U pdoc

- name: checkout
uses: actions/checkout@v2
with:
path: bufr
submodules: true

- name: build
run: |
if [[ ${{ matrix.ccompiler }} == "clang" ]]; then
export CC=clang
elif [[ ${{ matrix.ccompiler }} == "gcc-9" ]]; then
export CC=gcc-9
export FC=gfortran-9
elif [[ ${{ matrix.ccompiler }} == "gcc-10" ]]; then
export CC=gcc-10
export FC=gfortran-10
fi
cd bufr
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=./install -DENABLE_PYTHON=ON ..
make -j2 VERBOSE=1
make install
cd python
sudo python3 setup.py install

- name: test
run: |
cd $GITHUB_WORKSPACE/bufr/build
ctest --verbose --output-on-failure --rerun-failed
53 changes: 53 additions & 0 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: MacOS
on:
push:
branches:
- develop
paths-ignore:
- README.md
pull_request:
branches:
- develop
paths-ignore:
- README.md

jobs:
MacOS:
runs-on: macos-latest
env:
FC: gfortran-11

steps:

- name: install-deps
run: |
brew update
brew install doxygen
pip3 install setuptools
pip3 install numpy
pip3 install netCDF4
sudo ln -sf /usr/local/bin/gfortran-11 /usr/local/bin/gfortran

- name: checkout-bufr
uses: actions/checkout@v2
with:
path: bufr

- name: build-bufr
run: |
cd bufr
mkdir build
cd build
cmake ..
make -j2 VERBOSE=1
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
cmake -DCMAKE_INSTALL_PREFIX=./install -DENABLE_PYTHON=ON ..
make -j2 VERBOSE=1
make install
cd python
sudo python3 setup.py install

- name: test-bufr
run: |
cd bufr/build
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
ctest --verbose --output-on-failure --rerun-failed

31 changes: 23 additions & 8 deletions .github/workflows/main_new.yml → .github/workflows/developer.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
name: code coverage
on: [push, pull_request]
name: developer
on:
push:
branches:
- develop
paths-ignore:
- README.md
pull_request:
branches:
- develop
paths-ignore:
- README.md

jobs:
build:
developer:
runs-on: ubuntu-latest
env:
FC: gfortran-10
Expand Down Expand Up @@ -33,18 +43,23 @@ jobs:
cd bufr
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -fprofile-abs-path -O0" ..
make -j2
cmake -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -fprofile-abs-path -O0" -DCMAKE_BUILD_TYPE=Debug -DENABLE_DOCS=On -DENABLE_PYTHON=ON ..
make -j2 VERBOSE=1
make install
cd python
sudo python3 setup.py install

- name: test
run: |
cd $GITHUB_WORKSPACE/bufr/build
ctest --output-on-failure
gcovr -r .. --html-details -o test-coverage.html
ctest --verbose --output-on-failure --rerun-failed
gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html

- uses: actions/upload-artifact@v2
with:
name: test-coverage
path: bufr/build/*.html
path: |
bufr/build/*.html
bufr/build/*.css


77 changes: 0 additions & 77 deletions .github/workflows/main.yml

This file was deleted.

Loading