Skip to content

Drop typeguard + backport apptainer version #262

Drop typeguard + backport apptainer version

Drop typeguard + backport apptainer version #262

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .[R]
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.1.3
- name: Pull Docker image
run: docker pull ewatercycle/walrus-grpc4bmi:v0.2.0
- name: Cache Apptainer image
id: cache-apptainer-image
uses: actions/cache@v2
with:
path: ~/.apptainer
key: apptainer-image
- name: Pull Apptainer image
if: steps.cache-apptainer-image.outputs.cache-hit != 'true'
run: apptainer pull docker://ewatercycle/walrus-grpc4bmi:v0.2.0
- uses: r-lib/actions/setup-r@v2
with:
install-r: false
- name: Install R dependencies
run: |
Rscript -e "install.packages('remotes')"
Rscript -e "install.packages('R6')"
- name: Test with pytest
run: |
pytest -vv --cov=grpc4bmi --cov-report xml
- name: Correct coverage paths
run: sed -i "s+$PWD/++g" coverage.xml
- name: SonarCloud analysis
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install grpc
uses: ewatercycle/setup-grpc@v4
with:
grpc-version: 1.27.2
- name: Copy grpc to system default
run: |
sudo rsync -a $GRPC_ROOT/ /usr/local
sudo ldconfig
- name: Build & install bmi-c
run: mkdir -p build && cd build && cmake .. && sudo make install
working-directory: cpp/bmi-c
- name: Build dir
run: mkdir -p cpp//build
- name: configure
run: cmake ..
working-directory: cpp/build
- name: make
run: make VERBOSE=1
working-directory: cpp/build
- name: ctest
run: ctest -V
working-directory: cpp/build