Skip to content

Commit

Permalink
CHG: simplifying workflow and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuMorlighem committed Jul 18, 2024
1 parent d0fde5f commit 382596b
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 149 deletions.
97 changes: 0 additions & 97 deletions .github/ci_scripts/ci_ISSM.sh

This file was deleted.

52 changes: 0 additions & 52 deletions .github/ci_scripts/github_linux_basic

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/c-cpp-apt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Compilation CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
ISSM_DIR: ${{ github.workspace }}

jobs:
build:

runs-on: ubuntu-latest

steps:

- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

- name: Installing MATLAB
id: setup-matlab
uses: matlab-actions/setup-matlab@v2
with:
release: R2023b

- name: Installling Open MPI, METIS and PETSc
run: |
sudo apt-get install -y libopenmpi-dev libmetis-dev petsc-dev
- name: Check out repository code
uses: actions/checkout@v4

- name: Install External packages
run: |
cd $ISSM_DIR/externalpackages/triangle && ./install-linux.sh && source $ISSM_DIR/etc/environment.sh
cd $ISSM_DIR/externalpackages/m1qn3 && ./install-linux.sh && source $ISSM_DIR/etc/environment.sh
- name: Reconfigure ISSM
run: |
autoreconf -ivf
./configure --prefix=${ISSM_DIR} \
--disable-static \
--enable-development \
--enable-debugging \
--with-numthreads=4 \
--with-matlab-dir=${{ steps.setup-matlab.outputs.matlabroot }} \
--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
--with-mpi-include="/usr/lib/x86_64-linux-gnu/openmpi/include/" \
--with-mpi-libflags="-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lmpi_cxx" \
--with-petsc-dir="/usr/lib/petscdir/petsc-real/" \
--with-blas-lapack-dir="/usr/lib/petscdir/petsc-real/" \
--with-metis-dir="/usr/include" \
--with-scalapack-dir="/usr/lib/x86_64-linux-gnu/" \
--with-mumps-dir="/usr/lib/petscdir/petsc-real/" \
--with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install" \
--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install"
- name: Compile ISSM
run: make -j8 install

- name: Prepare MATLAB script
run: |
cat > ${ISSM_DIR}/matlab_ci.m << EOF
% Go to the test directory
cd $ISSM_DIR/test/NightlyRun/
% Add ISSM tools to path
addpath('${ISSM_DIR}/src/m/dev');
devpath;
% Run tests
runme('exclude',[IdFromString('Dakota')],'id',101:110,'quitonerror',1);
quit(0);
EOF
cat ${ISSM_DIR}/matlab_ci.m
- name: Get run-matlab-command
run: |
wget -O /usr/local/bin/run-matlab-command https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/glnxa64/run-matlab-command
chmod +x /usr/local/bin/run-matlab-command
- name: Run MATLAB Command
run: |
source $ISSM_DIR/etc/environment.sh
LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6 run-matlab-command "matlab_ci"
- run: echo "This job's status is ${{ job.status }}."

0 comments on commit 382596b

Please sign in to comment.