Skip to content

Compute Panel Dimensions in TACS for Stiffened Panel Optimizations #874

Compute Panel Dimensions in TACS for Stiffened Panel Optimizations

Compute Panel Dimensions in TACS for Stiffened Panel Optimizations #874

Workflow file for this run

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.9
- 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 -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;
pip install openmdao==3.30.0
conda install -c conda-forge petsc=3.19 petsc4py -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 }};
- 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/ESP124-linux-x86_64.tgz
tar -xvf ESP124-linux-x86_64.tgz
export ESP_ROOT=${F2F_DIR}/extern/ESP124/EngSketchPad
export CASROOT=${F2F_DIR}/extern/ESP124/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/ESP124/
# 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/ESP124/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/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages # The branch the action should deploy to
folder: docs/html/ # The folder the action should deploy