Merge pull request #1288 from TeamCOMPAS/output_system_velocity_vector #1504
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: COMPAS compile test | |
'on': | |
workflow_dispatch: null | |
pull_request: | |
branches: | |
- dev | |
paths: | |
- src/** | |
- compas_python_utils/** | |
- py_tests/** | |
- .github/workflows/** | |
push: | |
branches: | |
- dev | |
jobs: | |
compas: | |
env: | |
ARTIFACT_NAME: detailedEvolutionPlot.png | |
ARTIFACT_PATH: py_tests/test_artifacts | |
name: Build COMPAS | |
runs-on: '${{ matrix.os}}' | |
container: '${{matrix.container}}' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: pip | |
- name: Install TeXLive | |
uses: teatimeguest/setup-texlive-action@v3 | |
- name: Install dependencies on ubuntu | |
if: 'startsWith(matrix.os, ''ubuntu-20'')' | |
run: | | |
cd misc/cicd-scripts | |
chmod 755 linux-dependencies | |
./linux-dependencies | |
- name: Build Compas | |
run: | | |
cd src && make -j $(nproc) -f Makefile | |
./COMPAS -v | |
- name: Install python utils | |
run: | | |
pip install --upgrade pip | |
pip install -e .[dev] | |
- name: Run example COMPAS job | |
run: | | |
export COMPAS_EXECUTABLE_PATH=${GITHUB_WORKSPACE}/src/COMPAS | |
cd ${GITHUB_WORKSPACE}/py_tests/test_data/ | |
chmod 755 run.sh | |
cat run.sh | |
./run.sh | |
- name: Run pytests | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
export COMPAS_ROOT_DIR=${GITHUB_WORKSPACE} | |
jupyter-kernelspec list | |
pytest --cov=compas_python_utils/ py_tests/ -m 'not webtest' | |
pytest --cov=compas_python_utils/ --cov-append py_tests/ -m webtest | |
ls py_tests/test_artifacts | |
coverage html | |
coverage-badge -o coverage_badge.svg -f | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage | |
path: | | |
htmlcov/ | |
coverage_badge.svg | |
- name: Archive COMPAS detailed-evolution plot | |
id: upload | |
uses: actions/[email protected] | |
with: | |
name: '${{ env.ARTIFACT_NAME }}' | |
path: '${{ env.ARTIFACT_PATH }}/${{ env.ARTIFACT_NAME }}' | |
if-no-files-found: error |