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

Add CML GitHub Action #7

Draft
wants to merge 72 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
71591c5
Add CML YAML
gchhablani Feb 20, 2022
48a8090
Separate Run
gchhablani Feb 20, 2022
9c3f928
Fix GCBM directory
gchhablani Feb 20, 2022
3b50bc8
Fix GCBM directory
gchhablani Feb 20, 2022
b81dfd4
Test just clone
gchhablani Feb 20, 2022
0eaf107
Add remove
gchhablani Feb 20, 2022
0d44e8e
Add docker compose build
gchhablani Feb 20, 2022
dcf138d
Add checkout to gcbm-container branch
gchhablani Feb 20, 2022
3cb9a7d
Fix flint cloud dir name
gchhablani Feb 20, 2022
1c7a00b
Add commands to create container and report
gchhablani Feb 20, 2022
c94bbee
Update cml.yaml
gchhablani Feb 22, 2022
f6b12d1
Add FLINTcloud container and fix workflow
gchhablani Feb 27, 2022
2a89a1c
Remove runs-on and add bash to rm
gchhablani Feb 27, 2022
8308dff
Add back runs-on
gchhablani Feb 27, 2022
3956bfe
Fix volume in container
gchhablani Feb 27, 2022
11e44e7
Add step to install npm
gchhablani Feb 27, 2022
f939100
Debug to print working directory
gchhablani Feb 27, 2022
9564436
Remove install npm step temporarily
gchhablani Feb 27, 2022
a647616
Fix volume directory
gchhablani Feb 27, 2022
a54530b
Fix directory in volume
gchhablani Feb 27, 2022
933542a
Move volume mounting to options
gchhablani Feb 27, 2022
9980374
Remove quotes from volume name
gchhablani Feb 27, 2022
3562444
Fix volume directory
gchhablani Feb 27, 2022
a48e8f0
Fix volumes and ports
gchhablani Feb 27, 2022
1371d21
Fix directory in volume
gchhablani Feb 27, 2022
60d25a8
Print working directory and ls
gchhablani Feb 27, 2022
d0ea3e1
Change sh to /bin/bash
gchhablani Feb 27, 2022
0312682
Fix volume directory
gchhablani Feb 27, 2022
b9799cd
Switch volume mounting to options
gchhablani Feb 27, 2022
1c1c18f
Remove volume mounting
gchhablani Feb 27, 2022
2267cfe
Remove extra debugging steps
gchhablani Feb 27, 2022
6db2b24
Add node action
gchhablani Feb 27, 2022
52d0b86
Fix node action
gchhablani Feb 27, 2022
cc6168b
Switch back to manual npm install
gchhablani Feb 27, 2022
062cfaf
Fix path in bash command
gchhablani Feb 27, 2022
c0e50c6
Add docker ps
gchhablani Mar 1, 2022
4a8b121
Fix docker exec indent
gchhablani Mar 1, 2022
10c753d
Remove bash from command
gchhablani Mar 1, 2022
8cf199a
Revert back to old workflow
gchhablani Mar 1, 2022
8f151fb
Update cml.yaml
gchhablani Mar 25, 2022
3b06d59
Update cml.yaml
gchhablani Mar 25, 2022
2e2aa21
Update cml.yaml
gchhablani Mar 27, 2022
94951b6
Update cml.yaml
gchhablani Mar 27, 2022
8d1816d
Update cml.yaml
gchhablani Mar 27, 2022
0b968b4
Update cml.yaml
gchhablani Mar 27, 2022
ce9b76e
Update cml.yaml
gchhablani Mar 27, 2022
3e782d9
Update cml.yaml
gchhablani Mar 27, 2022
805a8c5
Update cml.yaml
gchhablani Mar 27, 2022
17179f4
Update cml.yaml
gchhablani Mar 27, 2022
4d44040
Update cml.yaml
gchhablani Mar 27, 2022
0a332d1
Update cml.yaml
gchhablani Mar 27, 2022
b7f1fbe
Update cml.yaml
gchhablani Mar 27, 2022
9f7de97
Update cml.yaml
gchhablani Mar 27, 2022
17c8d7b
Update cml.yaml
gchhablani Mar 27, 2022
8f95edf
Update cml.yaml
gchhablani Mar 27, 2022
1d00d53
Update cml.yaml
gchhablani Mar 27, 2022
9974e11
Update cml.yaml
gchhablani Mar 27, 2022
5ef26e3
Update cml.yaml
gchhablani Mar 27, 2022
e17f8bd
Update cml.yaml
gchhablani Mar 27, 2022
cbd7b6f
Update cml.yaml
gchhablani Mar 27, 2022
afe2ad8
Update cml.yaml
gchhablani Mar 27, 2022
8f7561f
Update cml.yaml
gchhablani Mar 27, 2022
b3fdd58
Update cml.yaml
gchhablani Mar 27, 2022
6e5b3b4
Update cml.yaml
gchhablani Mar 27, 2022
374b5c2
Update cml.yaml
gchhablani Mar 27, 2022
dfe9b9b
Update cml.yaml
gchhablani Mar 29, 2022
278c71d
Update cml.yaml
gchhablani Mar 29, 2022
4211b57
Add graph creation script
gchhablani Mar 29, 2022
41a5695
Merge branch 'add_cml_test' of https://github.com/gchhablani/GCBM.Bel…
gchhablani Mar 29, 2022
bd73c63
Delete create_biomass_graph.py
gchhablani Mar 29, 2022
044af0a
Add all working parts together
gchhablani Mar 29, 2022
3517f57
Update cml.yaml
gchhablani Mar 29, 2022
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
71 changes: 71 additions & 0 deletions .github/workflows/cml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Generate CML Report

on: [push]

jobs:
generate_cml_report:
runs-on: ubuntu-latest
container:
image: ghcr.io/harshcasper/flint.gcbm-cloud
ports:
- "8080:8080"
steps:
- name: Remove GCBM output
id: remove_gcbm_output
run: |
rm -rf Standalone_GCBM/gcbm_project/output
- name: Setup Node # Need this for the CML setup
id: setup_node
uses: actions/setup-node@v2
with:
node-version: '14' # Min version 12 is needed
- name: Setup CML
id: setup_cml
uses: iterative/setup-cml@v1
- name: Checkout gcbm-container branch
id : checkout_gcbm_container_branch
uses: actions/checkout@v2
with:
ref: gcbm-container
- name: Install simplejson
id: install_simplejson
run: pip install simplejson
- name: Install sqlalchemy
id: install_sqlalchemy
run: pip install sqlalchemy
- name: Install pandas
id: install_pandas
run: pip install pandas
- name: Install matplotlib
id: install_matplotlib
run: pip install matplotlib
- name: Run Moja CLI
id: run_moja_cli
run: |
echo "[1/4] Change working directory to gcbm_project"
cd Standalone_GCBM/gcbm_project

echo "[2/4] Run Moja CLI"
/opt/gcbm/moja.cli --config_file gcbm_config.cfg --config_provider provider_config.json 2> temp.md

echo "[3/4] Compile GCBM Results"
python3 ../tools/CompileGCBMResults/compileresults.py sqlite:///output/gcbm_output.db --output_db sqlite:///output/compiled_gcbm_output.db

echo "[4/4] Generate Biomass Graph"
python3 create_biomass_graph.py

# - name: CML Upload Report
# id: cml_upload_report
# env:
# REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# cml-send-comment Standalone_GCBM/gcbm_project/temp.md

- name: CML Publish Graph
id: cml_publish_graph
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cml publish Standalone_GCBM/gcbm_project/output/total_biomass_mt.png --md >> graph.md
cml-send-comment graph.md