-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (54 loc) · 1.37 KB
/
build-test.yml
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
name: Build-N-Test
on:
push:
branches: master
pull_request:
branches: master
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./src
steps:
- uses: actions/checkout@v4
- name: Install brew dependencies
if: runner.os == 'macOS'
run: |
# install dependencies
brew install nlopt armadillo automake autoconf
# add paths (new brew install location)
echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix)/include" >> $GITHUB_ENV
- name: Install apt dependencies
if: runner.os == 'Linux'
run: |
# Ensure the script doesnt hang waiting for user input
export DEBIAN_FRONTEND=noninteractive
# Update system
sudo apt-get update
sudo apt-get install -y \
autotools-dev \
automake \
libtool \
liblapack-dev \
libatlas-cpp-0.6-dev \
libnlopt0 \
libnlopt-dev \
libnlopt-cxx-dev \
libarmadillo-dev
- name: autoconf
run: autoreconf -fiv
- name: configure
run: ./configure
- name: make
run: make -j
- name: make check
run: make check
- name: make installcheck
run: make installcheck