-
Notifications
You must be signed in to change notification settings - Fork 13
69 lines (57 loc) · 1.89 KB
/
octave.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
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build Octave interface and upload to release
on:
pull_request:
push:
branches:
- main
release:
types:
- published
jobs:
build_test_release:
name: package, install and release Octave interface
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install Octave (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install --no-install-recommends octave liboctave-dev
- name: Install Octave (macOS)
if: runner.os == 'macOS'
run: brew install octave
- name: Install Octave (Windows)
if: runner.os == 'Windows'
run: choco install octave.portable
- name: Package interface
working-directory: interfaces/octave
run: octave package_piqp.m
- name: Install pkg
working-directory: interfaces/octave
run: octave --eval "pkg install piqp-octave.tar.gz"
- name: Load pkg
working-directory: interfaces/octave
run: octave --eval "pkg load piqp; piqp('sparse')"
- name: Upload artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
path: ./interfaces/octave/piqp-octave.tar.gz
- name: Upload tarballs
if: runner.os == 'Linux' && github.event_name == 'release' && github.event.action == 'published'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./interfaces/octave/piqp-octave.tar.gz
asset_name: piqp-octave.tar.gz
asset_content_type: application/gzip