Skip to content

Commit d35c6b5

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

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-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: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
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
27+
# - uses: ./.github/workflows/checkout_repo
2328
- name: Build libROM
2429
run: |
2530
mkdir ${GITHUB_WORKSPACE}/build
26-
export CC=mpicc
27-
export CXX=mpicxx
28-
scripts/setup.sh
2931
cd ${GITHUB_WORKSPACE}/build
30-
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
32+
pwd
33+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
3134
make
32-
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
35+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
3336
make
3437
- name: Build baseline libROM
3538
if: ${{ github.event.label.name == 'LGTM' || contains(github.event.pull_request.labels.*.name, 'LGTM') }}
@@ -38,13 +41,11 @@ jobs:
3841
git clone https://github.com/LLNL/libROM.git
3942
cd libROM
4043
mkdir build
41-
export CC=mpicc
42-
export CXX=mpicxx
43-
scripts/setup.sh
4444
cd build
45-
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=On ..
45+
pwd
46+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Debug -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
4647
make
47-
cmake -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=On ..
48+
cmake .. -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DCMAKE_BUILD_TYPE=Optimized -DUSE_MFEM=${USE_MFEM} -DMFEM_USE_GSLIB=${MFEM_USE_GSLIB}
4849
make
4950
- uses: ./.github/workflows/run_tests
5051
mac:
@@ -69,4 +70,4 @@ jobs:
6970
make
7071
cmake -DCMAKE_BUILD_TYPE=Optimized ..
7172
make
72-
- uses: ./.github/workflows/run_tests
73+
- 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)