Skip to content

Commit 720711f

Browse files
committed
ci linux test using docker container.
1 parent d8893f6 commit 720711f

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

.github/workflows/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,5 @@ ENV HYPRE_DIR=$LIB_DIR/hypre/src/hypre
137137
ENV PARMETIS_DIR=$LIB_DIR/parmetis-4.0.3/build/lib/libparmetis
138138
ENV METIS_DIR=$LIB_DIR/parmetis-4.0.3/build/lib/libmetis
139139

140-
WORKDIR /home
140+
#WORKDIR /home
141+
#RUN useradd -u 1000 -m test

.github/workflows/ci.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
name: CI
2-
on:
2+
on:
33
pull_request:
44
types: [opened, labeled, synchronize]
55
branches:
66
- master
77
jobs:
88
linux:
99
runs-on: ubuntu-latest
10+
container:
11+
image: dreamer2368/librom_env:latest
12+
options: --user 1001 --privileged
13+
volumes:
14+
- /mnt:/mnt
1015
steps:
1116
- name: Set Swap Space
1217
uses: pierotofy/set-swap-space@master
13-
with:
18+
with:
1419
swap-size-gb: 10
15-
16-
- name: Install Linux dependencies
17-
run: |
18-
sudo apt update
19-
sudo apt-get install libmpich-dev libblas-dev liblapack-dev libscalapack-mpi-dev libhdf5-serial-dev
2020
- name: Check out libROM
21-
uses: actions/checkout@v2
22-
- uses: ./.github/workflows/checkout_repo
21+
uses: actions/checkout@v3
2322
- name: Build libROM
2423
run: |
2524
mkdir ${GITHUB_WORKSPACE}/build
26-
export CC=mpicc
27-
export CXX=mpicxx
28-
scripts/setup.sh
2925
cd ${GITHUB_WORKSPACE}/build
30-
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
26+
pwd
27+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
3128
make
32-
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
29+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
3330
make
3431
- name: Build baseline libROM
3532
if: ${{ github.event.label.name == 'LGTM' || contains(github.event.pull_request.labels.*.name, 'LGTM') }}
@@ -38,13 +35,11 @@ jobs:
3835
git clone https://github.com/LLNL/libROM.git
3936
cd libROM
4037
mkdir build
41-
export CC=mpicc
42-
export CXX=mpicxx
43-
scripts/setup.sh
4438
cd build
45-
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
39+
pwd
40+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
4641
make
47-
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
42+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
4843
make
4944
- uses: ./.github/workflows/run_tests
5045
mac:
@@ -69,4 +64,4 @@ jobs:
6964
make
7065
cmake -DCMAKE_BUILD_TYPE=Optimized ..
7166
make
72-
- uses: ./.github/workflows/run_tests
67+
- uses: ./.github/workflows/run_tests

.github/workflows/run_tests/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ runs:
44
- name: Run unit tests
55
run: |
66
cd ${GITHUB_WORKSPACE}/build
7+
pwd
8+
ls
9+
ls ./tests/
710
./tests/test_SVD
811
./tests/test_Vector
912
./tests/test_Matrix
@@ -21,11 +24,11 @@ runs:
2124
mpirun -n 3 --oversubscribe tests/test_GreedyCustomSampler
2225
2326
shell: bash
24-
27+
2528
- name: Run regression tests
2629
if: ${{ github.event.label.name == 'LGTM' || contains(github.event.pull_request.labels.*.name, 'LGTM') }}
2730
run: |
2831
cd ${GITHUB_WORKSPACE}
2932
./regression_tests/run_regression_tests.sh
30-
33+
3134
shell: bash

0 commit comments

Comments
 (0)