-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
36 lines (31 loc) · 1.01 KB
/
action.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
name: 'Install Octave (Linux)'
description: 'Install GNU Octave on Linux'
author: 'Ray Zimmerman'
inputs:
ipopt-libs: # id of input
description: 'include installation of IPOPT libraries, if true'
required: false
default: false
runs:
using: "composite"
steps:
- name: Initialize Package Manager
run: sudo apt-get update -qq
shell: bash
- name: Install GNU Octave
run: |
sudo apt-get install -y -qq liboctave-dev octave
${{ inputs.ipopt-libs }} && sudo apt-get install -y -qq coinor-libipopt-dev
echo "ML_NAME=Octave" >> $GITHUB_ENV
echo "ML_CMD=octave-cli --no-gui --eval" >> $GITHUB_ENV
echo "ML_PATHVAR=OCTAVE_PATH" >> $GITHUB_ENV
shell: bash
- name: Set OCTAVE_VER, ML_VER
run: |
export OCTAVE_VER=`$ML_CMD "fprintf('%s', ver('octave').Version)"`
echo "OCTAVE_VER=${OCTAVE_VER}" >> $GITHUB_ENV
echo "ML_VER=${OCTAVE_VER}" >> $GITHUB_ENV
shell: bash
branding:
icon: 'zap'
color: 'yellow'