Add TACSMeshReader support for 16 and 25 node quad elements (#338) #1
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, and docs | |
on: | |
# Triggers the workflow on push or pull request events but only for the main 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_test_and_docs: | |
# Run on Ubuntu | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
# 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: 'debug' | |
INTERFACE: 'interface' | |
PUBLISH_DOCS: true | |
# complex versions | |
- NAME: Complex | |
OPTIONAL: 'complex_debug' | |
INTERFACE: 'complex_interface' | |
PUBLISH_DOCS: false | |
name: TACS ${{ matrix.NAME }} Build/Test/Docs | |
# Recommended if you intend to make multiple deployments in quick succession. | |
# This will kill any currently running CI from previous commits to the same branch | |
concurrency: | |
group: ci-${{ github.ref }}-${{ matrix.NAME }} | |
cancel-in-progress: true | |
steps: | |
- name: Display run details | |
run: | | |
echo "============================================================="; | |
echo "Run #${GITHUB_RUN_NUMBER}"; | |
echo "Run ID: ${GITHUB_RUN_ID}"; | |
lscpu; | |
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@v4 | |
- name: Setup miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: 3.9 | |
- name: Install TACS | |
run: | | |
export TACS_DIR=${GITHUB_WORKSPACE}; | |
echo "TACS_DIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
conda install -c conda-forge sysroot_linux-64=2.17 -q -y; | |
conda install -c conda-forge openmpi openmpi-mpicxx -q -y; | |
conda install -c anaconda openblas -q -y; | |
conda install -c conda-forge lapack -q -y; | |
conda install -c conda-forge metis=5.1.0 -q -y; | |
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 }}; | |
cd $TACS_DIR/examples; | |
make ${{ matrix.OPTIONAL }} TACS_DIR=$TACS_DIR METIS_INCLUDE=-I${CONDA_PREFIX}/include/ METIS_LIB="-L${CONDA_PREFIX}/lib/ -lmetis"; | |
- name: Install f5totec/f5tovtk | |
run: | | |
# Compile f5totec/f5tovtk | |
conda install -c smdogroup tecio -q -y; | |
cd $TACS_DIR/extern/f5totec; | |
make TACS_DIR=$TACS_DIR TECIO_INCLUDE=-I${CONDA_PREFIX}/include/ TECIO_LIB=${CONDA_PREFIX}/lib/libtecio.a\ | |
METIS_INCLUDE=-I${CONDA_PREFIX}/include/ METIS_LIB="-L${CONDA_PREFIX}/lib/ -lmetis"; | |
cd ..; | |
cd f5tovtk; | |
make TACS_DIR=$TACS_DIR METIS_INCLUDE=-I${CONDA_PREFIX}/include/ METIS_LIB="-L${CONDA_PREFIX}/lib/ -lmetis"; | |
- name: Install optional dependencies | |
run: | | |
# Install petsc for openmdao tests | |
conda install -c conda-forge petsc=3.19 petsc4py -q -y; | |
# Install ESP/CAPS prebuilt for shape derivatives, only in Real mode | |
if [[ ${{ matrix.NAME }} == 'Real' ]]; then | |
cd $TACS_DIR/extern/ | |
wget https://acdl.mit.edu/ESP/archive/ESP122Lin.tgz | |
tar -xvf ESP122Lin.tgz | |
export ESP_ROOT=${TACS_DIR}/extern/ESP122/EngSketchPad | |
export CASROOT=${TACS_DIR}/extern/ESP122/OpenCASCADE-7.6.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 $TACS_DIR/extern/ESP122/ | |
# remove all ESP/CAPS unit test files with recursive delete | |
find . -name "test*" -type f -delete | |
cd $TACS_DIR | |
fi | |
- name: Run unit tests | |
run: | | |
# Reload ESP/CAPS environment variables if in real mode | |
if [[ ${{ matrix.NAME }} == 'Real' ]]; then | |
source ${TACS_DIR}/extern/ESP122/ESPenv.sh | |
fi | |
testflo --timeout 240 .; | |
- name: Build docs | |
run: | | |
cd $TACS_DIR/docs; | |
make html BUILDDIR=.; | |
cd html; | |
zip -r ../tacs-docs.zip .; | |
- name: 'Upload docs' | |
if: ${{ matrix.PUBLISH_DOCS }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tacs-docs | |
path: docs/tacs-docs.zip | |
retention-days: 7 | |
- name: 'Deploy docs' | |
if: ${{ github.event_name == 'push' && matrix.PUBLISH_DOCS }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs/html/ # The folder the action should deploy. | |
# This allows the user to ssh into the github runner and debug a job upon failure | |
# This will only trigger if the job was run using workflow_dispatch and debug_enabled input flag was set to true | |
- name: Setup interactive debug session on failure | |
if: ${{ failure() && github.event.inputs.debug_enabled }} | |
uses: mxschmitt/action-tmate@v3 | |
# To access the terminal through the web-interface: | |
# 1. Click on the web-browser link printed out in this action from the github workkflow terminal | |
# 2. Press cntrl + c in the new tab that opens up to reveal the terminal | |
# 3. To activate the conda environment used to build TACS run: | |
# $ source $CONDA/etc/profile.d/conda.sh | |
# $ conda activate test |