Skip to content

Commit 5073981

Browse files
committed
Individual workflow for libmesh-1.5.1.deb (Ubuntu 18.04).
1 parent 47c8085 commit 5073981

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: libMesh-1.5.1.deb (Ubuntu 18.04)
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events on any branch but only when this file is modified.
5+
on:
6+
push:
7+
branches:
8+
paths:
9+
- ".github/workflows/libmesh_v1.5.1_ubuntu18.04.yml"
10+
11+
pull_request:
12+
branches:
13+
paths:
14+
- ".github/workflows/libmesh_v1.5.1_ubuntu18.04.yml"
15+
16+
# trigger manually from GitHub Actions tab
17+
workflow_dispatch:
18+
19+
jobs:
20+
build_libmesh:
21+
runs-on: ubuntu-18.04
22+
env:
23+
MY_WORK_PATH: ${{ github.workspace }}/work
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
# Print out some useful diagnostic info about the job/environment.
28+
- name: Diagnostic info
29+
run: |
30+
echo "GITHUB_WORKFLOW: ${GITHUB_WORKFLOW}"
31+
echo "Run #${GITHUB_RUN_NUMBER}"
32+
echo "Run ID: ${GITHUB_RUN_ID}"
33+
echo "Testing: ${GITHUB_REPOSITORY}"
34+
echo "Triggered by (GITHUB_EVENT_NAME): ${GITHUB_EVENT_NAME}"
35+
echo "Initiated by (GITHUB_ACTOR): ${GITHUB_ACTOR}"
36+
37+
# Update packages fromt apt repos.
38+
- name: Install APT dependencies
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get -qq install -y \
42+
build-essential gfortran wget less m4 git cmake \
43+
python3-all python3-all-dev python3-all-dbg \
44+
openmpi-bin libopenmpi-dev python3-mpi4py \
45+
petsc-dev python3-petsc4py \
46+
slepc-dev python3-slepc4py \
47+
libparpack2-dev \
48+
libmetis-dev \
49+
libnetcdf-dev \
50+
libboost-all-dev \
51+
libeigen3-dev \
52+
libnlopt-dev \
53+
libadolc-dev \
54+
doxygen graphviz rsync
55+
56+
- name: Setup working directory
57+
run: mkdir ${GITHUB_WORKSPACE}/work
58+
59+
# Note we currently have to use a modified version of the release with some updates to the libMesh
60+
# build to allow for a non-libMesh/contrib, non-PETSc version of metis provided by the Ubuntu repositories.
61+
- name: Fetch libMesh
62+
run: |
63+
cd ${MY_WORK_PATH}
64+
git clone -b v1.5.1_with_build_updates --single-branch https://github.com/jdeaton/libmesh.git
65+
66+
- name: Configure libMesh
67+
run: |
68+
cd ${MY_WORK_PATH}/libmesh
69+
mkdir build
70+
cd build
71+
export PETSC_DIR=/usr/lib/petsc
72+
export SLEPC_DIR=/usr/lib/slepc
73+
../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
74+
75+
- name: Compile/install libMesh
76+
timeout-minutes: 180
77+
run: |
78+
cd ${MY_WORK_PATH}/libmesh/build
79+
make -j 1
80+
sudo make install
81+
82+
- name: Package libMesh into .deb
83+
run: |
84+
# Organize libMesh include/ and lib/ for packaging.
85+
export PKG_DIR=libmesh-1.5.1-1
86+
export INST_DIR=${PKG_DIR}/usr/local
87+
mkdir ${PKG_DIR}
88+
mkdir ${PKG_DIR}/usr
89+
mkdir ${PKG_DIR}/usr/local
90+
mkdir ${PKG_DIR}/usr/local/include
91+
mkdir ${PKG_DIR}/usr/local/lib
92+
cp -r /usr/local/include/* ${INST_DIR}/include
93+
cp -r /usr/local/lib/libmesh* ${INST_DIR}/lib
94+
cp -r /usr/local/lib/libnetcdf* ${INST_DIR}/lib
95+
96+
# Copy in DEBIAN/control package configuration file.
97+
cp -r ${GITHUB_WORKSPACE}/libmesh/ubuntu18.04_bionic/libmesh_v1.5.1/DEBIAN ${PKG_DIR}
98+
99+
# Create libMesh .deb package.
100+
dpkg-deb --build libmesh-1.5.1-1
101+
102+
- name: Upload libMesh package artifact
103+
uses: actions/upload-artifact@v2
104+
with:
105+
name: libmesh-1.5.1.deb-ubuntu18.04
106+
path: libmesh-1.5.1-1.deb

0 commit comments

Comments
 (0)