-
Notifications
You must be signed in to change notification settings - Fork 61
60 lines (47 loc) · 2.61 KB
/
ubuntu-cminpack-install.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Install cminpack on Ubuntu through CMake
run-name: Build, test and install cminpack on Ubuntu through CMake
on: [push, pull_request]
jobs:
cminpack-ubuntu:
name: cminpack (GCC toolchain + CMake)
runs-on: ubuntu-latest
strategy:
matrix:
BUILD_SHARED_LIBS: [ 'ON' , 'OFF' ]
CMAKE_BUILD_TYPE: [ 'Release', 'Debug', 'RelWithDebInfo', 'MinSizeRel' ]
CMINPACK_PRECISION: [ 'd' ] # seems to be the only precision that the current tests reference work
USE_BLAS: [ 'OFF' ]
include:
- BUILD_SHARED_LIBS: 'ON'
CMAKE_BUILD_TYPE: 'RelWithDebInfo'
CMINPACK_PRECISION: 'd'
USE_BLAS: 'ON'
env:
CMINPACK_BUILD_DIR: $RUNNER_TEMP/cminpack-build-shared-libs-${{ matrix.BUILD_SHARED_LIBS }}-build-type-${{ matrix.CMAKE_BUILD_TYPE }}-precision-${{ matrix.CMINPACK_PRECISION }}
CMINPACK_INSTALL_DIR: $RUNNER_TEMP/cminpack-install-shared-libs-${{ matrix.BUILD_SHARED_LIBS }}-build-type-${{ matrix.CMAKE_BUILD_TYPE }}-precision-${{ matrix.CMINPACK_PRECISION }}
steps:
- name: Install BLAS
run: sudo apt-get install -y libopenblas-dev
if: ${{ matrix.USE_BLAS == 'ON' }}
- name: Checkout repository to cminpack directory
uses: actions/checkout@v4
with:
path: cminpack
- name: Configure cminpack build
run: cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED_LIBS }} -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} -DCMINPACK_PRECISION=${{ matrix.CMINPACK_PRECISION }} -DUSE_BLAS=${{ matrix.USE_BLAS }} --install-prefix ${{ env.CMINPACK_INSTALL_DIR }} -S cminpack -B ${{ env.CMINPACK_BUILD_DIR }}
- name: Build cminpack
run: cmake --build ${{ env.CMINPACK_BUILD_DIR }} --config ${{ matrix.CMAKE_BUILD_TYPE }}
- name: Test cminpack
run: ctest --test-dir ${{ env.CMINPACK_BUILD_DIR }} --build-config ${{ matrix.CMAKE_BUILD_TYPE }}
if: ${{ matrix.USE_BLAS == 'OFF' }}
- name: Test cminpack with BLAS
run: ctest --test-dir ${{ env.CMINPACK_BUILD_DIR }} --build-config ${{ matrix.CMAKE_BUILD_TYPE }} --exclude-regex tlmdifc
if: ${{ matrix.USE_BLAS == 'ON' }}
- name: Install cminpack
run: cmake --install ${{ env.CMINPACK_BUILD_DIR }} --config ${{ matrix.CMAKE_BUILD_TYPE }}
- name: Delete checkout directory
run: rm -rf $RUNNER_TEMP/cminpack
- name: Delete build directory
run: rm -rf ${{ env.CMINPACK_BUILD_DIR }}
- name: Delete install directory
run: rm -rf ${{ env.CMINPACK_INSTALL_DIR }}