Skip to content

Commit

Permalink
Release 2.0 -- merge pull request #139 from n-claes/develop
Browse files Browse the repository at this point in the history
Releasing Legolas 2.0
  • Loading branch information
n-claes authored May 5, 2023
2 parents af5e140 + 85a2f73 commit 4d7bf7a
Show file tree
Hide file tree
Showing 452 changed files with 30,050 additions and 39,891 deletions.
83 changes: 0 additions & 83 deletions .github/workflows/docs.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/docs_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: docs

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
develop:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Fix version for now, 3.4 throws an error (see #101)
pip install markdown==3.3.7
pip install ford==6.1.13 graphviz
sudo apt-get install graphviz
pip install -U sphinx
pip install numpydoc sphinx-rtd-theme lazy-object-proxy==1.4 sphinx-autoapi
- name: Generate documentation
run: |
cd docs
python generate_docs.py develop
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# only deploy if the branch is develop
if: ${{ contains(github.ref, 'refs/heads/develop') }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: n-claes/legolas.science-dev
publish_branch: main
publish_dir: ./docs
cname: dev.legolas.science
enable_jekyll: true
full_commit_message: 'dev: deploy n-claes/legolas@${{ github.sha }}'
46 changes: 46 additions & 0 deletions .github/workflows/docs_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: docs

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

jobs:
stable:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Fix version for now, 3.4 throws an error (see #101)
pip install markdown==3.3.7
pip install ford==6.1.13 graphviz
sudo apt-get install graphviz
pip install -U sphinx
pip install numpydoc sphinx-rtd-theme lazy-object-proxy==1.4 sphinx-autoapi
- name: Generate documentation
run: |
cd docs
python generate_docs.py stable
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# only deploy if the branch is master
if: ${{ contains(github.ref, 'refs/heads/master') }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY_STABLE }}
external_repository: n-claes/legolas.science-stable
publish_branch: main
publish_dir: ./docs
cname: legolas.science
enable_jekyll: true
full_commit_message: 'stable: deploy n-claes/legolas@${{ github.sha }}'
20 changes: 9 additions & 11 deletions .github/workflows/pylbo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: [master, develop]

env:
CC: /usr/bin/gcc-9
FC: /usr/bin/gfortran-9
CC: /usr/bin/gcc-10
FC: /usr/bin/gfortran-10
LEGOLASDIR: /home/runner/work/legolas/legolas

jobs:
Expand All @@ -17,10 +17,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
Expand All @@ -45,28 +45,26 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
sudo apt-get update
sudo apt-get install ffmpeg
cd post_processing
python setup.py develop
- name: Install Legolas dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install gfortran-9
sudo apt-get -y install cmake
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install lcov
gfortran-9 --version
gfortran-10 --version
cmake --version
- name: Compile Legolas
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: legolas

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

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
name: [regression]
os: [ubuntu-latest]
compiler: [gfortran-11]
coverage: [true]

env:
FC: ${{ matrix.compiler }}
LEGOLASDIR: /home/runner/work/legolas/legolas
ARPACK_ROOT: /home/runner/work/legolas/legolas/tests/arpack-ng

name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install cmake
uses: jwlawson/actions-setup-cmake@v1.13.0
with:
cmake-version: "3.24.x"

- name: Install Legolas dependencies
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.compiler }}
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install lcov
${FC} --version
cmake --version
gcov --version
- name: Install Python dependencies & Pylbo
run: |
python -m pip install --upgrade pip
pip install pytest numpy matplotlib f90nml tqdm psutil pytest-mpl
cd post_processing
python setup.py develop
- name: Cache ARPACK
id: arpack-cache
uses: actions/cache@v1
with:
path: tests/arpack-ng/
key: ${{ runner.os }}-arpackv3

- name: Build ARPACK
if: steps.arpack-cache.outputs.cache-hit != 'true'
run: |
cd tests
git clone https://github.com/opencollab/arpack-ng.git
cd arpack-ng
mkdir build
mkdir installed
cd build
cmake -DEXAMPLES=OFF -DMPI=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=../installed ..
make -j 2
sudo make -j 2 install
- name: Compile Legolas
run: |
mkdir build
cd build
if [[ "${{ matrix.coverage }}" ]]; then
cmake -DCoverage=ON ..
else
cmake -DDebug=ON ..
fi
make -j 2
- name: Run tests
run: |
cd $LEGOLASDIR/tests/regression_tests
pytest
- name: Generate coverage report
if: ${{ matrix.coverage }}
run: |
mkdir coverage
cd coverage
lcov --capture --directory $LEGOLASDIR/build \
--output-file ${{ matrix.name }}.info \
--gcov-tool /usr/bin/gcov-11
# filter out coverage files
find $LEGOLASDIR/build -name '*.gc*' -delete
- name: Archive failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: failed_logs
path: tests/regression_tests/test_results

- name: Upload coverage report
uses: codecov/codecov-action@v1
if: ${{ matrix.coverage }}
with:
files: ./coverage/${{ matrix.name }}.info
flags: legolas
Loading

0 comments on commit 4d7bf7a

Please sign in to comment.