Skip to content

Fuzzy Compile

Fuzzy Compile #42

name: Fuzzy Compile
# The runtime of fuzzy compile can vary wildly, depending on whether the
# randomly chosen subschema is a CommandLineTool, a small workflow, or a
# complex workflow. So instead of running it on every push, do it on a schedule.
on:
# push: # Do NOT run fuzzy compile on every push!
# pull_request: (either on origin or on upstream pull request)
schedule:
# Instead, run it every Wednesday at midnight.
- cron: '0 0 * * 3'
workflow_dispatch:
defaults:
run:
shell: bash -l {0} # Invoke bash in login mode, NOT interactive mode.
# This will cause bash to look for the startup file ~/.bash_profile, NOT ~/.bashrc
# This is important since conda init writes to ~/.bashrc
permissions:
actions: read
contents: read
pull-requests: read
jobs:
fuzzy_compile:
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
# This will prevent DOS attacks from people blasting the CI with rapid fire commits.
concurrency:
group: ${{ github.workflow }}-fuzzy-compile-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
runs-on: [self-hosted, linux]
steps:
- name: Checkout workflow-inference-compiler
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/workflow-inference-compiler
ref: master
path: workflow-inference-compiler
- name: Checkout biobb_adapters
if: always()
uses: actions/checkout@v3
with:
repository: jfennick/biobb_adapters
ref: master
path: biobb_adapters
- name: Checkout mm-workflows
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/mm-workflows
ref: main
path: mm-workflows
- name: Checkout image-workflows
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/image-workflows
ref: main
path: image-workflows
- name: Setup mamba (linux, macos)
if: runner.os != 'Windows'
uses: conda-incubator/setup-miniconda@v3.0.1
with:
miniforge-variant: Mambaforge-pypy3
miniforge-version: latest
environment-file: workflow-inference-compiler/install/system_deps.yml
activate-environment: wic
channels: conda-forge
python-version: "3.9.*" # pypy is not yet compatible with 3.10 and 3.11
- name: Install Workflow Inference Compiler
if: always()
run: cd workflow-inference-compiler/ && pip install ".[all_except_runner_src]"
- name: Install Molecular Modeling Workflows
if: always()
# Also run mm-workflows command to generate
# mm-workflows/autogenerated/schemas/config_schemas.json
# NOTE: Use ".[test]" instead of ".[all_except_runner_src]"
# We do not want or need to install the workflow_deps extra.
# (Many of the packages conflict with pypy.)
run: cd mm-workflows/ && pip install ".[test]" && mm-workflows --generate_schemas
- name: Generate Sophios Python API Workflows (*.py -> *.wic)
if: always()
run: cd workflow-inference-compiler/ && python -c 'import sophios; import sophios.plugins; sophios.plugins.blindly_execute_python_workflows()'
- name: Generate Sophios Validation Jsonschema
if: always()
run: cd workflow-inference-compiler/ && sophios --generate_schemas
# Please read docs/validation.md#Property-Based-Testing
# This is essentially an integration test for all of the
# WIC Python API workflows as well as the WIC Python API itself.
- name: Validate Sophios Python API Workflows (*.py -> *.wic)
if: always()
run: cd workflow-inference-compiler/ && python -c 'import sophios; import sophios.plugins; sophios.plugins.blindly_execute_python_workflows()'
# Since a randomly chosen subschema is used every time, repeat 10X for more coverage.
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd workflow-inference-compiler/ && pytest -k test_fuzzy_compile