Skip to content

Commit 15e5856

Browse files
committed
test
1 parent 21262f0 commit 15e5856

File tree

1 file changed

+53
-12
lines changed

1 file changed

+53
-12
lines changed

.github/workflows/test.yml

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: tests
1+
name: tests
22

33
on: [push]
44

@@ -10,15 +10,56 @@ jobs:
1010
os: [ubuntu-latest]
1111

1212
steps:
13-
- uses: actions/checkout@master
14-
- uses: ashutoshvarma/action-cmake-build@master
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up CMake
17+
uses: actions/setup-cmake@v2
1518
with:
16-
source-dir: ${{ runner.workspace }}/hiop
17-
build-dir: ${{ runner.workspace }}/hiop/build
18-
cc: gcc
19-
cxx: g++
20-
build-type: Debug
21-
configure-options: -DHIOP_USE_RAJA=OFF -DHIOP_USE_MPI=OFF -DCMAKE_BUILD_TYPE=Debug -DHIOP_BUILD_SHARED=ON -DHIOP_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX=.. -DHIOP_WITH_KRON_REDUCTION=OFF -DHIOP_SPARSE=OFF
22-
run-test: true
23-
install-build: true
24-
parallel: 4
19+
cmake-version: '3.21.1' # Specify the CMake version
20+
21+
- name: Set up dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y build-essential
25+
sudo apt-get install -y libopenmpi-dev # Or other dependencies
26+
27+
- name: Cache CMake build
28+
uses: actions/cache@v2
29+
with:
30+
path: |
31+
~/.cache/CMake
32+
./hiop/build
33+
key: ${{ runner.os }}-cmake-${{ github.sha }}
34+
restore-keys: |
35+
${{ runner.os }}-cmake-
36+
37+
- name: Configure CMake
38+
run: |
39+
mkdir -p ${{ runner.workspace }}/hiop/build
40+
cd ${{ runner.workspace }}/hiop/build
41+
cmake ${{ runner.workspace }}/hiop \
42+
-DHIOP_USE_RAJA=OFF \
43+
-DHIOP_USE_MPI=OFF \
44+
-DCMAKE_BUILD_TYPE=Debug \
45+
-DHIOP_BUILD_SHARED=ON \
46+
-DHIOP_BUILD_STATIC=ON \
47+
-DCMAKE_INSTALL_PREFIX=.. \
48+
-DHIOP_WITH_KRON_REDUCTION=OFF \
49+
-DHIOP_SPARSE=OFF
50+
51+
- name: Build hiop
52+
run: |
53+
cd ${{ runner.workspace }}/hiop/build
54+
make -j4
55+
56+
- name: Install hiop
57+
run: |
58+
cd ${{ runner.workspace }}/hiop/build
59+
make install
60+
61+
- name: Run Tests
62+
run: |
63+
cd ${{ runner.workspace }}/hiop/build
64+
make test
65+

0 commit comments

Comments
 (0)