Skip to content

Commit

Permalink
Merge pull request #1 from EdelweissFE/alex/github-workflow
Browse files Browse the repository at this point in the history
Alex/GitHub workflow
  • Loading branch information
alexdummer authored May 3, 2024
2 parents 61029eb + 109bf6f commit ee2cbbf
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 17 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Documentation

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
branches: [ master ]
on: [push, pull_request]

jobs:
build:
Expand Down Expand Up @@ -34,7 +28,7 @@ jobs:
- name: Install Eigen
shell: bash -l {0}
run: |
git clone https://gitlab.com/libeigen/eigen.git
git clone --branch 3.4.0 https://gitlab.com/libeigen/eigen.git
cd eigen
mkdir build
cd build
Expand All @@ -45,7 +39,7 @@ jobs:
- name: Install Autodiff
shell: bash -l {0}
run: |
git clone https://github.com/autodiff/autodiff.git
git clone --branch v1.1.0 https://github.com/autodiff/autodiff.git
cd autodiff
mkdir build
cd build
Expand All @@ -68,7 +62,7 @@ jobs:
shell: bash -l {0}
run: |
cd EdelweissFE
python setup.py build_ext -i
python -m pip install .
cd ..
- name: Building Buzzard documentation
Expand All @@ -79,12 +73,6 @@ jobs:
echo $EDELWEISS_PATH
sphinx-build ./doc/source/ ./docs -b html
- name: Run Buzzard tests
shell: bash -l {0}
run: |
export EDELWEISS_PATH=/home/runner/work/Buzzard/Buzzard/EdelweissFE
python run_edelweiss_tests.py
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Run tests

on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- "master"
pull_request:
branches:
- "master"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
use-mamba: true
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: anaconda-client-env

- name: Install Eigen
shell: bash -l {0}
run: |
git clone --branch 3.4.0 https://gitlab.com/libeigen/eigen.git
cd eigen
mkdir build
cd build
cmake -DBUILD_TESTING=OFF -DINCLUDE_INSTALL_DIR=$CONDA_PREFIX/include -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..
make install
cd ../..
- name: Install Autodiff
shell: bash -l {0}
run: |
git clone --branch v1.1.0 https://github.com/autodiff/autodiff.git
cd autodiff
mkdir build
cd build
cmake -DAUTODIFF_BUILD_TESTS=OFF \
-DAUTODIFF_BUILD_PYTHON=OFF \
-DAUTODIFF_BUILD_EXAMPLES=OFF \
-DAUTODIFF_BUILD_DOCS=OFF \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
..
make install
cd ../..
- name: Install Marmot
shell: bash -l {0}
run: |
git clone --recurse-submodules https://github.com/MAteRialMOdelingToolbox/Marmot/
cd Marmot
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..
make install
cd ../..
- name: Build EdelweissFE
shell: bash -l {0}
run: |
git clone https://github.com/EdelweissFE/EdelweissFE.git
cd EdelweissFE
mamba install --file requirements.txt
pip install .
cd ..
- name: Run Buzzard tests
shell: bash -l {0}
run: |
python -m pip install -r requirements.txt
python run_edelweiss_tests.py
2 changes: 1 addition & 1 deletion buzzard/interfaces/edelweiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def getInputDictWithCurrentParameters(currParams: np.ndarray, sim: Simulation) -
Input dictionary for EdelweissFE.
"""

randomFileName = "_temp_" + str(rd.randint(0, 1e16)) + ".inp"
randomFileName = "_temp_" + str(rd.randint(0, int(1e16))) + ".inp"

paramIDX = 0

Expand Down

0 comments on commit ee2cbbf

Please sign in to comment.