Skip to content

Commit

Permalink
ci linux test using docker container.
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed Feb 5, 2023
1 parent d8893f6 commit 720711f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ ENV HYPRE_DIR=$LIB_DIR/hypre/src/hypre
ENV PARMETIS_DIR=$LIB_DIR/parmetis-4.0.3/build/lib/libparmetis
ENV METIS_DIR=$LIB_DIR/parmetis-4.0.3/build/lib/libmetis

WORKDIR /home
#WORKDIR /home
#RUN useradd -u 1000 -m test
35 changes: 15 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
name: CI
on:
on:
pull_request:
types: [opened, labeled, synchronize]
branches:
- master
jobs:
linux:
runs-on: ubuntu-latest
container:
image: dreamer2368/librom_env:latest
options: --user 1001 --privileged
volumes:
- /mnt:/mnt
steps:
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
with:
swap-size-gb: 10

- name: Install Linux dependencies
run: |
sudo apt update
sudo apt-get install libmpich-dev libblas-dev liblapack-dev libscalapack-mpi-dev libhdf5-serial-dev
- name: Check out libROM
uses: actions/checkout@v2
- uses: ./.github/workflows/checkout_repo
uses: actions/checkout@v3
- name: Build libROM
run: |
mkdir ${GITHUB_WORKSPACE}/build
export CC=mpicc
export CXX=mpicxx
scripts/setup.sh
cd ${GITHUB_WORKSPACE}/build
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
pwd
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
make
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
make
- name: Build baseline libROM
if: ${{ github.event.label.name == 'LGTM' || contains(github.event.pull_request.labels.*.name, 'LGTM') }}
Expand All @@ -38,13 +35,11 @@ jobs:
git clone https://github.com/LLNL/libROM.git
cd libROM
mkdir build
export CC=mpicc
export CXX=mpicxx
scripts/setup.sh
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
pwd
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
make
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
make
- uses: ./.github/workflows/run_tests
mac:
Expand All @@ -69,4 +64,4 @@ jobs:
make
cmake -DCMAKE_BUILD_TYPE=Optimized ..
make
- uses: ./.github/workflows/run_tests
- uses: ./.github/workflows/run_tests
7 changes: 5 additions & 2 deletions .github/workflows/run_tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ runs:
- name: Run unit tests
run: |
cd ${GITHUB_WORKSPACE}/build
pwd
ls
ls ./tests/
./tests/test_SVD
./tests/test_Vector
./tests/test_Matrix
Expand All @@ -21,11 +24,11 @@ runs:
mpirun -n 3 --oversubscribe tests/test_GreedyCustomSampler
shell: bash

- name: Run regression tests
if: ${{ github.event.label.name == 'LGTM' || contains(github.event.pull_request.labels.*.name, 'LGTM') }}
run: |
cd ${GITHUB_WORKSPACE}
./regression_tests/run_regression_tests.sh
shell: bash

0 comments on commit 720711f

Please sign in to comment.