Add Julia support to gprc4bmi #283
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r dev-requirements.txt | |
pip install -e .[R,julia] | |
- name: Setup Apptainer | |
uses: eWaterCycle/setup-apptainer@v2 | |
with: | |
apptainer-version: 1.1.9 | |
- name: Pull Docker image | |
run: docker pull ewatercycle/walrus-grpc4bmi:v0.3.1 | |
- name: Cache Apptainer image | |
id: cache-apptainer-image | |
uses: actions/cache@v3 | |
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.3.1 | |
- 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: Install Julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '^1.9' | |
- 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-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install grpc | |
uses: ewatercycle/setup-grpc@v4 | |
with: | |
grpc-version: 1.51.1 | |
- name: Copy grpc to system default | |
run: | | |
sudo rsync -a $GRPC_ROOT/ /usr/local | |
sudo ldconfig | |
- name: Install bmi-cxx | |
run: | | |
git clone -b v2.0 https://github.com/csdms/bmi-cxx.git bmi-cxx | |
mkdir bmi-cxx/build | |
cd bmi-cxx/build | |
cmake .. | |
make install | |
- name: Install bmi-cxx | |
run: | | |
git clone -b v2.1 https://github.com/csdms/bmi-c.git bmi-c | |
mkdir bmi-c/build | |
cd bmi-c/build | |
cmake .. | |
make install | |
- 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 | |
# TODO use https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c |