-
Notifications
You must be signed in to change notification settings - Fork 29
71 lines (56 loc) · 2.16 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
70
71
name: Octave
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: update
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get update
- name: add linux dependencies
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get install swig liboctave-dev
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
# build dependencies
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWITH_BZIP2=ON -DWITH_CHECK=OFF -DWITH_EXPAT=ON -DWITH_LIBXML=OFF -DWITH_OCTAVE=ON -DWITH_STABLE_PACKAGES=ON $GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Install Strip
working-directory: ${{runner.workspace}}/build
run: cmake --install . --prefix instdir --strip
- name: Pack
working-directory: ${{runner.workspace}}/build/instdir
run: cmake -E tar cvzf ../octave_${{ matrix.os }}.tar.gz .
- name: Test
working-directory: ${{runner.workspace}}/build/instdir/lib/octave/site/oct/x86_64-pc-linux-gnu/test
shell: bash
run: LD_LIBRARY_PATH=../../../../.. octave --eval "runTests()"
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{runner.workspace}}/build/octave_${{ matrix.os }}.tar.gz
name: octave_${{ matrix.os }}.tar.gz