fix setup of Okabe-Ito custom colors #23
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
# CI handling ROOT (C++) and pyROOT | |
name: ROOT CI | |
on: | |
# Trigger the workflow on push or pull request events but only for the "main" branch, | |
# for given paths | |
push: | |
branches: [ "main" ] | |
paths: ['src/root/**', 'conda.yml', 'examples/root/**'] | |
pull_request: | |
branches: [ "main" ] | |
paths: ['src/root/**', 'conda.yml', 'examples/root/**'] | |
# Allow manual dispatch | |
workflow_dispatch: | |
jobs: | |
root-python-example: | |
# PyROOT example | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} # needed for conda | |
steps: | |
# Check-out repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: CI | |
use-mamba: true | |
- name: Cache Conda env | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: | |
conda-${{ | |
hashFiles('conda.yml') }}-${{ env.CACHE_NUMBER | |
}} | |
env: | |
# Increase this value to reset cache if conda.yml has not changed | |
CACHE_NUMBER: 0 | |
id: cache | |
- name: Update environment | |
run: mamba env update -n CI -f conda.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Install package | |
run: | | |
pip install $GITHUB_WORKSPACE | |
- name: Create ROOT example plot using python | |
run: | | |
cd $GITHUB_WORKSPACE/examples/root/python | |
python3 example.py | |
- name: Upload plot | |
uses: actions/upload-artifact@v4 | |
with: | |
name: root-python-example | |
path: ${{ github.workspace }}/examples/root/python/example.pyroot.pdf | |
if-no-files-found: error | |
root-cpp-example: | |
# ROOT C++ example | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} # needed for conda | |
steps: | |
# Check-out repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: CI | |
use-mamba: true | |
- name: Cache Conda env | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: | |
conda-${{ | |
hashFiles('conda.yml') }}-${{ env.CACHE_NUMBER | |
}} | |
env: | |
# Increase this value to reset cache if conda.yml has not changed | |
CACHE_NUMBER: 0 | |
id: cache | |
- name: Update environment | |
run: mamba env update -n CI -f conda.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Create ROOT example plot using C++ | |
run: | | |
export ROOT_INCLUDE_PATH=$GITHUB_WORKSPACE/src/root/cpp/include:${ROOT_INCLUDE_PATH} | |
cd $GITHUB_WORKSPACE/examples/root/cpp | |
root -b -q example.C | |
- name: Upload plot | |
uses: actions/upload-artifact@v4 | |
with: | |
name: root-cpp-example | |
path: ${{ github.workspace }}/examples/root/cpp/example.root.pdf | |
if-no-files-found: error |