diff --git a/.github/workflows/build_libmesh_v1.5.1.yml b/.github/workflows/libmesh_v1.5.1_ubuntu20.04.yml similarity index 65% rename from .github/workflows/build_libmesh_v1.5.1.yml rename to .github/workflows/libmesh_v1.5.1_ubuntu20.04.yml index 720aa19..f32af0a 100644 --- a/.github/workflows/build_libmesh_v1.5.1.yml +++ b/.github/workflows/libmesh_v1.5.1_ubuntu20.04.yml @@ -1,27 +1,17 @@ -name: Linux - libMesh-1.5.1 +name: libMesh-1.5.1.deb (Ubuntu 20.04) # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the main branch +# events on any branch but only when this file is modified. on: - # trigger on pushes to develop or main push: - #branches: - # - main - # - master - # - develop - paths-ignore: - - "*.md" - - "*.rst" + branches: + paths: + - ".github/workflows/libmesh_v1.5.1_ubuntu20.04.yml" - # trigger on pull request to main or develop pull_request: branches: - - develop - - main - - master - paths-ignore: - - "*.md" - - "*.rst" + paths: + - ".github/workflows/libmesh_v1.5.1_ubuntu20.04.yml" # trigger manually from GitHub Actions tab workflow_dispatch: @@ -29,18 +19,20 @@ on: jobs: build_libmesh: runs-on: ubuntu-20.04 + env: + MY_WORK_PATH: ${{ github.workspace }}/work steps: - uses: actions/checkout@v2 # Print out some useful diagnostic info about the job/environment. - name: Diagnostic info 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 "GITHUB_WORKFLOW: ${GITHUB_WORKFLOW}" + echo "Run #${GITHUB_RUN_NUMBER}" + echo "Run ID: ${GITHUB_RUN_ID}" + echo "Testing: ${GITHUB_REPOSITORY}" + echo "Triggered by (GITHUB_EVENT_NAME): ${GITHUB_EVENT_NAME}" + echo "Initiated by (GITHUB_ACTOR): ${GITHUB_ACTOR}" # Update packages fromt apt repos. - name: Install APT dependencies @@ -59,41 +51,38 @@ jobs: libeigen3-dev \ libnlopt-dev \ libadolc-dev \ - doxygen graphviz rsync \ - # texlive-latex-base dvi2ps ghostscript \ - # python3.7 python3.7-dev libpython3.7 - - - name: Setup environment - run: | - export NP=2 - mkdir ${GITHUB_WORKSPACE}/work + doxygen graphviz rsync + + - name: Setup working directory + run: mkdir ${MY_WORK_PATH} - # Fetch/configure libMesh. # Note we currently have to use a modified version of the release with some updates to the libMesh - # build to allow for a non-provided, non-PETSc version of metis provided by the Ubuntu repositories. - - name: Fetch/configure libMesh - timeout-minutes: 10 - run: | - cd ${GITHUB_WORKSPACE}/work + # build to allow for a non-libMesh/contrib, non-PETSc version of metis provided by the Ubuntu repositories. + - name: Fetch libMesh + run: | + cd ${MY_WORK_PATH} git clone -b v1.5.1_with_build_updates --single-branch https://github.com/jdeaton/libmesh.git - cd libmesh + + - name: Configure libMesh + run: | + cd ${MY_WORK_PATH}/libmesh mkdir build cd build export PETSC_DIR=/usr/lib/petsc export SLEPC_DIR=/usr/lib/slepc ../configure --quiet --prefix=/usr/local --with-methods="opt devel dbg" --enable-cxx11-required --disable-metaphysicl --disable-examples --enable-triangle=yes --enable-tetgen=yes --disable-strict-lgpl --with-metis=/usr/lib/x86_64-linux-gnu --with-metis-include=/usr/include --with-nlopt-include=/usr/include --with-nlopt-lib=/usr/lib/x86_64-linux-gnu - - - name: Make libMesh + + - name: Compile/install libMesh timeout-minutes: 180 run: | - cd ${GITHUB_WORKSPACE}/work/libmesh/build + cd ${MY_WORK_PATH}/libmesh/build make -j 1 sudo make install - - name: Package libMesh + - name: Package libMesh into .deb run: | # Organize libMesh include/ and lib/ for packaging. - export PKG_DIR=${GITHUB_WORKSPACE}/libmesh-1.5.1-1 + export PKG_DIR=libmesh-1.5.1-1 export INST_DIR=${PKG_DIR}/usr/local mkdir ${PKG_DIR} mkdir ${PKG_DIR}/usr @@ -113,5 +102,5 @@ jobs: - name: Upload libMesh package artifact uses: actions/upload-artifact@v2 with: - name: libmesh-1.5.1-ubuntu20.04 + name: libmesh-1.5.1.deb-ubuntu20.04 path: libmesh-1.5.1-1.deb \ No newline at end of file