Application Case Fixes - multipoint derivative dicts, early_stopping, composite materials, funtofem.out file for remote driver #531
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: Build, unit tests | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch. | |
# Remove push when finally merging. | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab. | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
jobs: | |
# This job is called test_docs. | |
unit_tests: | |
# Run on Ubuntu | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
# Necessary to prevent mpi tests failing due to lack of slots | |
env: | |
OMPI_MCA_btl: self,tcp | |
OMPI_MCA_rmaps_base_oversubscribe: 1 | |
# Ensures conda environment is initialized for all steps | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# real versions | |
- NAME: Real | |
OPTIONAL: 'default' | |
INTERFACE: 'interface' | |
PUBLISH_DOCS: true | |
# complex versions | |
- NAME: Complex | |
OPTIONAL: 'complex' | |
INTERFACE: 'complex_interface' | |
PUBLISH_DOCS: false | |
# Recommended if you intend to make multiple deployments in quick succession | |
concurrency: ci-${{ github.ref }}-${{ matrix.NAME }} | |
name: FUNtoFEM ${{ matrix.NAME }} Build/Test | |
steps: | |
- name: Display run details | |
run: | | |
echo "============================================================="; | |
echo "Run #${GITHUB_RUN_NUMBER}"; | |
echo "Run ID: ${GITHUB_RUN_ID}"; | |
echo "Testing: ${GITHUB_REPOSITORY}"; | |
echo "Triggered by: ${GITHUB_EVENT_NAME}"; | |
echo "Initiated by: ${GITHUB_ACTOR}"; | |
echo "============================================================="; | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. | |
- uses: actions/checkout@v2 | |
- name: Setup conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: 3.8 | |
- name: Install TACS | |
run: | | |
git clone https://github.com/smdogroup/tacs.git /home/runner/work/tacs; | |
export TACS_DIR=/home/runner/work/tacs; | |
conda install zlib=1.2.11; | |
conda install -c anaconda openmpi -q -y; | |
conda install gxx_linux-64=9.3.0 -q -y; | |
conda install -c anaconda openblas -q -y; | |
conda install -c conda-forge lapack -q -y; | |
conda install -c conda-forge metis -q -y; | |
conda install -c conda-forge petsc=3.12 petsc4py -q -y; | |
pip install cython; | |
cd $TACS_DIR; | |
cp Makefile.in.info Makefile.in; | |
make ${{ matrix.OPTIONAL }} TACS_DIR=$TACS_DIR METIS_INCLUDE=-I${CONDA_PREFIX}/include/ METIS_LIB="-L${CONDA_PREFIX}/lib/ -lmetis"; | |
cd $TACS_DIR; | |
make ${{ matrix.INTERFACE }}; | |
- name: Install FUNtoFEM | |
run: | | |
echo "============================================================="; | |
echo "Install FUNtoFEM"; | |
echo "============================================================="; | |
export F2F_DIR=${GITHUB_WORKSPACE}; | |
echo "F2F_DIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
cd $F2F_DIR; | |
cp Makefile.in.info Makefile.in; | |
make ${{ matrix.OPTIONAL }} F2F_DIR=$F2F_DIR METIS_INCLUDE=-I${CONDA_PREFIX}/include/ METIS_LIB="-L${CONDA_PREFIX}/lib/ -lmetis"; | |
cd $F2F_DIR; | |
make ${{ matrix.INTERFACE }}; | |
- name : Install optional ESP/CAPS | |
if: ${{ matrix.NAME == 'Real' }} | |
run: | | |
echo "============================================================="; | |
echo "Install ESP/CAPS"; | |
echo "============================================================="; | |
# Install ESP/CAPS prebuilt for shape derivatives, only in Real mode | |
cd $F2F_DIR; | |
mkdir extern | |
cd $F2F_DIR/extern/ | |
wget https://acdl.mit.edu/ESP/PreBuilts/ESP123-linux-x86_64.tgz | |
tar -xvf ESP123-linux-x86_64.tgz | |
export ESP_ROOT=${F2F_DIR}/extern/ESP123/EngSketchPad | |
export CASROOT=${F2F_DIR}/extern/ESP123/OpenCASCADE-7.7.0 | |
export CASARCH= | |
export PATH=$PATH:$CASROOT/bin | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CASROOT/lib | |
cd $ESP_ROOT | |
./config/makeEnv ${CASROOT} | |
source $ESP_ROOT/../ESPenv.sh | |
cd ./src/CAPS/aim | |
make | |
cd $F2F_DIR/extern/ESP123/ | |
# remove all ESP/CAPS unit test files with recursive delete | |
find . -name "test*" -type f -delete | |
cd $F2F_DIR | |
- name: Run unit tests | |
run: | | |
echo "============================================================="; | |
echo "Running Tests"; | |
echo "============================================================="; | |
if [[ ${{ matrix.NAME }} == 'Real' ]]; then | |
source ${F2F_DIR}/extern/ESP123/ESPenv.sh | |
fi | |
testflo ${GITHUB_WORKSPACE}/tests/unit_tests/; | |
make-docs: | |
# Recommended if you intend to make multiple deployments in quick succession | |
#concurrency: ci-${{ github.ref }} | |
# Run on Ubuntu | |
runs-on: ubuntu-latest | |
# Necessary to prevent mpi tests failing due to lack of slots | |
env: | |
OMPI_MCA_btl: self,tcp | |
OMPI_MCA_rmaps_base_oversubscribe: 1 | |
# Ensures conda environment is initialized for all steps | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Display run details | |
run: | | |
echo "============================================================="; | |
echo "Run #${GITHUB_RUN_NUMBER}"; | |
echo "Run ID: ${GITHUB_RUN_ID}"; | |
echo "Testing: ${GITHUB_REPOSITORY}"; | |
echo "Triggered by: ${GITHUB_EVENT_NAME}"; | |
echo "Initiated by: ${GITHUB_ACTOR}"; | |
echo "============================================================="; | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. | |
- uses: actions/checkout@v2 | |
- name: Setup conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: 3.8 | |
- name: Install FUNtoFEM | |
run: | | |
echo "============================================================="; | |
echo "Install FUNtoFEM"; | |
echo "============================================================="; | |
export F2F_DIR=${GITHUB_WORKSPACE}; | |
echo "F2F_DIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
cd $F2F_DIR; | |
cp Makefile.in.info Makefile.in; | |
conda install sphinx -q -y; | |
- name: Build docs | |
run: | | |
cd ${GITHUB_WORKSPACE}/docs; | |
make html BUILDDIR=.; | |
cd html; | |
zip -r ../f2f-docs.zip .; | |
- name: Upload docs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: f2f-docs | |
path: docs/f2f-docs.zip | |
- name: Deploy docs | |
if: ${{ github.event_name == 'push' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to | |
folder: docs/html/ # The folder the action should deploy |