test dir for docs #36
Workflow file for this run
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: | |
- main | |
- development | |
- tests | |
tags: ['*'] | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
test: | |
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
permissions: # needed for julia-actions/cache to delete old caches | |
actions: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
julia-version: | |
- '1.10.4' # the one I have been developing with | |
- '1' # to check the latest v1 version | |
- 'pre' # check upcoming releases | |
os: ["ubuntu-latest"] | |
arch: ["x64"] | |
shell: ["bash"] | |
compiler: ["g++"] | |
include: | |
- os: "macOS-latest" | |
julia-version: '1' | |
shell: "bash" | |
compiler: "g++-13" | |
arch: "arm64" | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
token: ${{ secrets.GH_PCVCT }} | |
- name: Set up test project | |
run: | | |
mkdir -p ./test/test-project/data/inputs/configs/default | |
cp ./test/PhysiCell/sample_projects/template/config/PhysiCell_settings.xml ./test/test-project/data/inputs/configs/default/PhysiCell_settings.xml | |
mkdir -p ./test/test-project/data/inputs/custom_codes/default | |
cp ./test/PhysiCell/sample_projects/template/main.cpp ./test/test-project/data/inputs/custom_codes/default/main.cpp | |
cp ./test/PhysiCell/sample_projects/template/Makefile ./test/test-project/data/inputs/custom_codes/default/Makefile | |
cp -r ./test/PhysiCell/sample_projects/template/custom_modules ./test/test-project/data/inputs/custom_codes/default/custom_modules | |
mkdir -p ./test/test-project/data/inputs/rulesets_collections/default | |
touch ./test/test-project/data/inputs/rulesets_collections/default/base_rulesets.csv | |
echo "default,pressure,decreases,cycle entry,0,0.5,4,0" >> ./test/test-project/data/inputs/rulesets_collections/default/base_rulesets.csv | |
echo "Template project files are in place within ./test/test-project/data/inputs" | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.julia-version }} | |
arch: ${{ matrix.arch }} | |
- name: Set environment variable PHYSICELL_CPP | |
run: echo "PHYSICELL_CPP=${{ matrix.compiler }}" >> $GITHUB_ENV | |
- uses: julia-actions/cache@v2 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v4 | |
with: | |
file: lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created | |
contents: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1' | |
- uses: julia-actions/cache@v2 | |
- name: Configure doc environment | |
shell: julia --project=docs --color=yes {0} | |
run: | | |
using Pkg | |
Pkg.develop(PackageSpec(path=pwd())) | |
Pkg.instantiate() | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-docdeploy@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
- name: Run doctests | |
shell: julia --project=docs --color=yes {0} | |
run: | | |
using Documenter: DocMeta, doctest | |
using pcvct | |
DocMeta.setdocmeta!(pcvct, :DocTestSetup, :(using pcvct); recursive=true) | |
doctest(pcvct) |