Skip to content

Commit

Permalink
CI and readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwilliams committed Jan 22, 2024
1 parent 008010c commit abee4f5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ jobs:

Build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
Expand All @@ -16,20 +18,20 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Python
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
uses: actions/setup-python@v4 # Use pip to install latest CMake, & FORD/Jin2For, etc.
with:
python-version: ${{ matrix.python-version }}

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v4
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -44,6 +46,9 @@ jobs:
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt-get install lcov
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc_v }} gfortran-${{ matrix.gcc_v }}
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
Expand All @@ -58,23 +63,24 @@ jobs:
- name: Create coverage report
run: |
mkdir -p ${{ env.COV_DIR }}
lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base
lcov --capture --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.capture
mv ./build/gfortran_*/*/* ${{ env.COV_DIR }}
lcov --capture --initial --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.base
lcov --capture --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.capture
lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
env:
COV_DIR: build/coverage

- name: Upload coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: build/coverage/coverage.info

- name: Build documentation
run: ford ./simulated-annealing.md
run: ford ./ford.md

- name: Deploy Documentation
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@4.1.0
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: doc # The folder the action should deploy.
folder: doc # The folder the action should deploy.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
A modern Fortran simulated annealing optimization method. ***A work in progress.***
### Status

[![Language](https://img.shields.io/badge/-Fortran-734f96?logo=fortran&logoColor=white)](https://github.com/topics/fortran)
[![CI Status](https://github.com/jacobwilliams/simulated-annealing/actions/workflows/CI.yml/badge.svg)](https://github.com/jacobwilliams/simulated-annealing/actions)
[![GitHub release](https://img.shields.io/github/release/jacobwilliams/simulated-annealing.svg?style=plastic)](https://github.com/jacobwilliams/simulated-annealing/releases/latest)
[![codecov](https://codecov.io/gh/jacobwilliams/simulated-annealing/branch/master/graph/badge.svg?token=43HK33CSMY)](https://codecov.io/gh/jacobwilliams/simulated-annealing)
Expand All @@ -23,7 +24,7 @@ To use `simulated-annealing` within your fpm project, add the following to your
simulated-annealing = { git="https://github.com/jacobwilliams/simulated-annealing.git" }
```

To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford simulated-annealing.md```
To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford ford.md```

### See also

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions fpm.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name = "simulated-annealing"
author = "Jacob Williams"
copyright = "Copyright (c) 2019-2022, Jacob Williams"
copyright = "Copyright (c) 2019-2024, Jacob Williams"
license = "BSD-3"
description = "Simulated Annealing with Modern Fortran"
homepage = "https://github.com/jacobwilliams/simulated-annealing"
keywords = ["nle solver"]
keywords = ["nle solver", "optimization"]

[build]
auto-executables = false
Expand Down

0 comments on commit abee4f5

Please sign in to comment.