Skip to content

Commit 3fed7e0

Browse files
committed
ci linux test using docker container.
1 parent d8893f6 commit 3fed7e0

File tree

3 files changed

+29
-25
lines changed

3 files changed

+29
-25
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: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
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:
11-
- name: Set Swap Space
12-
uses: pierotofy/set-swap-space@master
13-
with:
14-
swap-size-gb: 10
16+
# - name: Set Swap Space
17+
# uses: pierotofy/set-swap-space@master
18+
# with:
19+
# swap-size-gb: 10
1520

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
21+
# - name: Install Linux dependencies
22+
# run: |
23+
# sudo apt update
24+
# sudo apt-get install libmpich-dev libblas-dev liblapack-dev libscalapack-mpi-dev libhdf5-serial-dev
2025
- name: Check out libROM
21-
uses: actions/checkout@v2
22-
- uses: ./.github/workflows/checkout_repo
26+
uses: actions/checkout@v3
2327
- name: Build libROM
2428
run: |
2529
mkdir ${GITHUB_WORKSPACE}/build
26-
export CC=mpicc
27-
export CXX=mpicxx
28-
scripts/setup.sh
2930
cd ${GITHUB_WORKSPACE}/build
30-
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
31+
pwd
32+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
3133
make
32-
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
34+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
3335
make
3436
- name: Build baseline libROM
3537
if: ${{ github.event.label.name == 'LGTM' || contains(github.event.pull_request.labels.*.name, 'LGTM') }}
@@ -38,13 +40,11 @@ jobs:
3840
git clone https://github.com/LLNL/libROM.git
3941
cd libROM
4042
mkdir build
41-
export CC=mpicc
42-
export CXX=mpicxx
43-
scripts/setup.sh
4443
cd build
45-
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
44+
pwd
45+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
4646
make
47-
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
47+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
4848
make
4949
- uses: ./.github/workflows/run_tests
5050
mac:
@@ -69,4 +69,4 @@ jobs:
6969
make
7070
cmake -DCMAKE_BUILD_TYPE=Optimized ..
7171
make
72-
- uses: ./.github/workflows/run_tests
72+
- 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)