Skip to content

Commit 8be9208

Browse files
committed
fix github action packages and commands
1 parent cfd782f commit 8be9208

File tree

1 file changed

+54
-11
lines changed

1 file changed

+54
-11
lines changed

.github/workflows/test.yml

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,58 @@ 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@v4
15+
16+
- name: Set up CMake
17+
uses: jwlawson/actions-setup-cmake@v2
18+
with:
19+
cmake-version: '3.21.x'
20+
21+
- name: Set up GCC and G++
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y build-essential libblas-dev liblapack-dev
25+
26+
- name: Use cmake
27+
run: cmake --version
28+
29+
- name: Cache CMake build
30+
uses: actions/cache@v3
1531
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
32+
path: |
33+
~/.cache/CMake
34+
./hiop/build
35+
key: ${{ runner.os }}-cmake-${{ github.sha }}
36+
restore-keys: |
37+
${{ runner.os }}-cmake-
38+
39+
- name: Configure CMake
40+
run: |
41+
mkdir -p ${{ runner.workspace }}/hiop/build
42+
cd ${{ runner.workspace }}/hiop/build
43+
cmake ${{ runner.workspace }}/hiop \
44+
-DHIOP_USE_RAJA=OFF \
45+
-DHIOP_USE_MPI=OFF \
46+
-DCMAKE_BUILD_TYPE=Debug \
47+
-DHIOP_BUILD_SHARED=ON \
48+
-DHIOP_BUILD_STATIC=ON \
49+
-DCMAKE_INSTALL_PREFIX=.. \
50+
-DHIOP_WITH_KRON_REDUCTION=OFF \
51+
-DHIOP_SPARSE=OFF
52+
53+
- name: Build hiop
54+
run: |
55+
cd ${{ runner.workspace }}/hiop/build
56+
make -j4
57+
58+
- name: Install hiop
59+
run: |
60+
cd ${{ runner.workspace }}/hiop/build
61+
make install
62+
63+
- name: Run Tests
64+
run: |
65+
cd ${{ runner.workspace }}/hiop/build
66+
make test
67+

0 commit comments

Comments
 (0)