diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index c4185f14e..5f1b8a756 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7110f009..77eec51fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: +on: pull_request: types: [opened, labeled, synchronize] branches: @@ -7,29 +7,26 @@ on: 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') }} @@ -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: @@ -69,4 +64,4 @@ jobs: make cmake -DCMAKE_BUILD_TYPE=Optimized .. make - - uses: ./.github/workflows/run_tests \ No newline at end of file + - uses: ./.github/workflows/run_tests diff --git a/.github/workflows/run_tests/action.yml b/.github/workflows/run_tests/action.yml index a07f14d62..80115f56b 100644 --- a/.github/workflows/run_tests/action.yml +++ b/.github/workflows/run_tests/action.yml @@ -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 @@ -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