Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #492

Merged
merged 22 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 53 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,61 @@ jobs:
- run: export CXX=clang++ && make install-coverage-dependencies
- run: export CXX=clang++ && make coverage
- run: curl -s https://codecov.io/bash | bash
# adapted from https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#publishing-a-package-using-an-action
build-container:
name: Build Docker Image
runs-on: ubuntu-22.04
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Log in to GitHub Container Registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=raw,value=ACTIONS_BUILD_${{ github.run_number }}
- name: Push to GHCR
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
test-documentation:
name: Test Documentation Build
runs-on: ubuntu-22.04
needs: build-container
container:
image: ghcr.io/devosoft/empirical:ACTIONS_BUILD_${{ github.run_number }}
# github actions requires root to access mounted volumes
options: --user root
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1
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 .
- run: |
make -C doc html coverage | ./doc/headtail.sh
python doc/parse_documentation_coverage.py doc/_build/doc-coverage.json >> doc-coverage.json
- uses: sylvanld/action-storage@v1
if: github.ref == 'refs/heads/master'
with:
src: doc-coverage.json
dst: stats/doc-coverage.json
deploy-dockerhub:
name: Deploy to DockerHub
deploy-container:
name: Deploy to DockerHub and ghcr.io
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/master'
needs:
Expand All @@ -136,3 +172,12 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
repository: devosoft/empirical
tag_with_ref: true
- name: Push to GHCR
uses: docker/build-push-action@v1
with:
context: .
push: true
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
repository: devosoft/empirical
tag_with_ref: true
8 changes: 6 additions & 2 deletions .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# .readthedocs.yml
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

#Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.7"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py
Expand All @@ -14,6 +19,5 @@ formats: []

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: doc/requirements.txt
2 changes: 1 addition & 1 deletion doc/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sphinx==3.2.1
exhale==0.2.3
sphinx-rtd-theme==0.5.0
coverxygen==1.5.0
breathe==4.22.1
breathe==4.26.1
myst-parser==0.12.9
# @mmore500 2021-10
# docutils 0.18.0 crashes docs build due to exception
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ babel==2.9.1
# via sphinx
beautifulsoup4==4.10.0
# via bs4
breathe==4.22.1
breathe==4.26.1
# via
# -r requirements.in
# exhale
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/NK-const.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define EMP_EVOLVE_NK_CONST_HPP_INCLUDE

#include <array>
#include <stddef.h>

#include "../base/assert.hpp"
#include "../bits/BitSet.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/NK.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define EMP_EVOLVE_NK_HPP_INCLUDE

#include <array>
#include <stddef.h>

#include "../base/vector.hpp"
#include "../bits/BitVector.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/OEE.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define EMP_EVOLVE_OEE_HPP_INCLUDE

#include <deque>
#include <stddef.h>

#include "../base/Ptr.hpp"
#include "../base/vector.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/Resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef EMP_EVOLVE_RESOURCE_HPP_INCLUDE
#define EMP_EVOLVE_RESOURCE_HPP_INCLUDE

#include <stddef.h>

#include "World.hpp"

Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/StateGrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@


#include <map>
#include <stddef.h>
#include <string>

#include "../base/assert.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/Systematics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <map>
#include <ostream>
#include <set>
#include <stddef.h>
#include <unordered_set>

#include "../base/Ptr.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/World.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <functional>
#include <map>
#include <stddef.h>
#include <unordered_map>

#include "../base/Ptr.hpp"
Expand Down
2 changes: 2 additions & 0 deletions include/emp/Evolve/World_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#ifndef EMP_EVOLVE_WORLD_ITERATOR_HPP_INCLUDE
#define EMP_EVOLVE_WORLD_ITERATOR_HPP_INCLUDE

#include <stddef.h>

#include "../base/Ptr.hpp"

namespace emp {
Expand Down
2 changes: 2 additions & 0 deletions include/emp/Evolve/World_output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef EMP_EVOLVE_WORLD_OUTPUT_HPP_INCLUDE
#define EMP_EVOLVE_WORLD_OUTPUT_HPP_INCLUDE

#include <stddef.h>

#include "../base/vector.hpp"
#include "../data/DataFile.hpp" // Helper to determine when specific events should occur.
#include "../tools/string_utils.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/Evolve/World_select.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <functional>
#include <map>
#include <stddef.h>

#include "../base/array.hpp"
#include "../base/assert.hpp"
Expand Down
2 changes: 2 additions & 0 deletions include/emp/Evolve/World_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
#ifndef EMP_EVOLVE_WORLD_STRUCTURE_HPP_INCLUDE
#define EMP_EVOLVE_WORLD_STRUCTURE_HPP_INCLUDE

#include <cstdint>
#include <set>
#include <stddef.h>

#include "../base/array.hpp"
#include "../base/assert.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/Ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define EMP_BASE_PTR_HPP_INCLUDE

#include <cstring>
#include <stddef.h>
#include <unordered_map>

#include "assert.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/_emscripten_assert_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <iostream>
#include <sstream>
#include <stddef.h>
#include <string>

#include <emscripten.h>
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/_emscripten_error_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define EMP_BASE__EMSCRIPTEN_ERROR_TRIGGER_HPP_INCLUDE


#include <stddef.h>
#include <string>

namespace emp {
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/_native_assert_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <iostream>
#include <sstream>
#include <stddef.h>
#include <string>

#include "_is_streamable.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/_native_error_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define EMP_BASE__NATIVE_ERROR_TRIGGER_HPP_INCLUDE


#include <stddef.h>
#include <string>

namespace emp {
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/_tdebug_assert_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifndef EMP_BASE__TDEBUG_ASSERT_TRIGGER_HPP_INCLUDE
#define EMP_BASE__TDEBUG_ASSERT_TRIGGER_HPP_INCLUDE

#include <stddef.h>
#include <string>

namespace emp {
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/_tdebug_error_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define EMP_BASE__TDEBUG_ERROR_TRIGGER_HPP_INCLUDE


#include <stddef.h>
#include <string>

namespace emp {
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <array>
#include <initializer_list>
#include <stddef.h>
#include <vector>

#include "assert.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/errors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <iostream>
#include <map>
#include <sstream>
#include <stddef.h>
#include <string>

/// If we are in emscripten, make sure to include the header.
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <initializer_list>
#include <map>
#include <stddef.h>

#include "assert.hpp"
#include "MapProxy.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define EMP_BASE_OPTIONAL_HPP_INCLUDE

#include <optional>
#include <stddef.h>
#include <type_traits>
#include <utility>

Expand Down
1 change: 1 addition & 0 deletions include/emp/base/unordered_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define EMP_BASE_UNORDERED_MAP_HPP_INCLUDE

#include <initializer_list>
#include <stddef.h>
#include <unordered_map>

#include "assert.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/base/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <initializer_list>
#include <iterator>
#include <stddef.h>
#include <utility>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions include/emp/bits/BitArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@


#include <bitset>
#include <cstdint>
#include <cstring>
#include <initializer_list>
#include <iostream>
#include <stddef.h>

#include "../base/assert.hpp"
#include "../base/Ptr.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/bits/BitMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define EMP_BITS_BITMATRIX_HPP_INCLUDE

#include <iostream>
#include <stddef.h>
#include <typeinfo>


Expand Down
1 change: 1 addition & 0 deletions include/emp/bits/BitSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#ifndef EMP_BITS_BITSET_HPP_INCLUDE
#define EMP_BITS_BITSET_HPP_INCLUDE

#include <stddef.h>

#include "BitArray.hpp"

Expand Down
2 changes: 2 additions & 0 deletions include/emp/bits/BitVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@


#include <bitset>
#include <cstdint>
#include <cstring>
#include <initializer_list>
#include <iostream>
#include <stddef.h>

#include "../base/assert.hpp"
#include "../base/Ptr.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/emp/bits/_bitset_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#ifndef EMP_BITS__BITSET_HELPERS_HPP_INCLUDE
#define EMP_BITS__BITSET_HELPERS_HPP_INCLUDE

#include <stddef.h>

namespace emp {

Expand Down
3 changes: 3 additions & 0 deletions include/emp/bits/bitset_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#ifndef EMP_BITS_BITSET_UTILS_HPP_INCLUDE
#define EMP_BITS_BITSET_UTILS_HPP_INCLUDE

#include <cstdint>
#include <stddef.h>

namespace emp {

/// Create a series of a specified number of ones (at compile time) in a uint.
Expand Down
2 changes: 2 additions & 0 deletions include/emp/compiler/DFA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#ifndef EMP_COMPILER_DFA_HPP_INCLUDE
#define EMP_COMPILER_DFA_HPP_INCLUDE

#include <cstdint>
#include <limits>
#include <stddef.h>
#include <string>

#include "../base/array.hpp"
Expand Down
2 changes: 2 additions & 0 deletions include/emp/compiler/Lexer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#ifndef EMP_COMPILER_LEXER_HPP_INCLUDE
#define EMP_COMPILER_LEXER_HPP_INCLUDE

#include <cstdint>
#include <map>
#include <stddef.h>
#include <string>

#include "../base/map.hpp"
Expand Down
Loading
Loading