Putting together a draft paper for JOSS #997
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
name: CI | |
on: | |
push: | |
branches: [ master, dev ] | |
pull_request: | |
branches: | |
- '**' | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
tidy: | |
name: Enforce Tidyness | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- run: sudo apt-get update -qq | |
- run: sudo apt-get install -qq rename python3-sphinx | |
- run: ./ci/test_tidy.sh | |
test-macos-tidy: | |
name: Test Tidy Enforcement on macOS | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- run: brew install coreutils findutils gnu-sed gawk grep rename sphinx-doc | |
# adapted from https://stackoverflow.com/a/42878119 | |
- run: brew link sphinx-doc --force | |
- run: ./ci/test_tidy.sh | |
test: | |
name: Tests | |
runs-on: ubuntu-18.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
cxx: [clang++, g++] | |
test-set: | |
- test-native-regular | |
- test-native-fulldebug | |
- test-native-opt | |
- test-examples | |
- test-demos | |
# - test-cookiecutter | |
env: | |
CXX: ${{ matrix.cxx }} | |
TEST_SET: ${{ matrix.test-set }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- run: sudo apt-get update -qq | |
- run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
- run: sudo apt-get update -qq | |
- run: sudo apt-get install -qq g++-8 cmake build-essential python3-pip python3-virtualenv nodejs tar gzip libpthread-stubs0-dev libc6-dbg gdb | |
- run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 | |
- run: git fetch origin master:refs/remotes/origin/master | |
- run: make install-test-dependencies | |
- run: ${CXX} --version | |
- run: | | |
source third-party/emsdk/emsdk_env.sh | |
make ${TEST_SET} CXX=${CXX} | |
test-web: | |
name: Web Tests | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- run: sudo apt-get update -qq | |
- run: sudo apt-get install -qq g++-8 cmake build-essential python3-pip python3-virtualenv nodejs tar gzip libpthread-stubs0-dev libc6-dbg gdb | |
- run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 | |
- run: make install-test-dependencies | |
- name: Run headless test | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: make test-web | |
test-coverage: | |
name: Measure Test Coverage | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- run: sudo apt-get update -qq | |
- run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
- run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
- run: sudo apt-add-repository "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" | |
- run: sudo apt-get update -qq | |
- run: sudo apt-get install -qq g++-8 | |
- run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 | |
- run: sudo apt-get install cmake build-essential python3-virtualenv python3-pip nodejs tar gzip libclang-7-dev llvm llvm-dev libllvm7 llvm-7 llvm-7-dev clang-7 libstdc++-7-dev # might have to happen after we update g++ | |
- run: sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 90 | |
- run: sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-7 90 | |
- run: sudo update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-7 90 | |
- run: sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-7 90 | |
- run: git fetch origin master:refs/remotes/origin/master | |
- run: make install-test-dependencies | |
- run: export CXX=clang++-7 && make install-coverage-dependencies | |
- run: export CXX=clang++-7 && make coverage | |
- run: curl -s https://codecov.io/bash | bash | |
test-documentation: | |
name: Test Documentation Build | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: mmore500/actions-setup-docker@94429ebc8d9edb4e8c8afb2667bce1e89435f74f | |
- run: docker build -t devosoft/empirical . | |
- run: docker ps -a | |
- run: sudo docker run --name empirical devosoft/empirical /bin/bash -c "set -o pipefail && cd /opt/Empirical/doc && make html coverage | ./headtail.sh && python /opt/Empirical/doc/parse_documentation_coverage.py /opt/Empirical/doc/_build/doc-coverage.json >> /opt/Empirical/doc-coverage.json" | |
- run: sudo docker cp empirical:/opt/Empirical/doc-coverage.json . | |
- uses: sylvanld/action-storage@v1 | |
if: github.ref == 'refs/heads/master' | |
with: | |
src: doc-coverage.json | |
dst: stats/doc-coverage.json | |
paper: | |
runs-on: ubuntu-latest | |
name: Paper Draft | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build draft PDF | |
uses: openjournals/openjournals-draft-action@master | |
with: | |
journal: joss | |
# This should be the path to the paper within your repo. | |
paper-path: paper.md | |
- name: Upload | |
uses: actions/upload-artifact@v1 | |
with: | |
name: paper | |
# This is the output path where Pandoc will write the compiled | |
# PDF. Note, this should be the same directory as the input | |
# paper.md | |
path: paper.pdf | |
deploy-dockerhub: | |
name: Deploy to DockerHub | |
runs-on: ubuntu-18.04 | |
if: github.ref == 'refs/heads/master' | |
needs: | |
- tidy | |
- test | |
- test-web | |
- test-coverage | |
- test-documentation | |
- test-macos-tidy | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Push to Docker Hub | |
uses: docker/build-push-action@v1 | |
with: | |
push: true | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: devosoft/empirical | |
tag_with_ref: true |