diff --git a/.github/workflows/make-alpine.yaml b/.github/workflows/make-alpine.yaml
new file mode 100644
index 0000000000..daeb4c4c7c
--- /dev/null
+++ b/.github/workflows/make-alpine.yaml
@@ -0,0 +1,257 @@
+name: make
+on: [push]
+concurrency: ci-alpine-${{ github.ref }}
+
+jobs:
+
+ alpine:
+ runs-on: ubuntu-latest
+
+ name: Alpine (x86, musl)
+
+ defaults:
+ run:
+ # Use emulated shell as default
+ shell: alpine.sh {0}
+
+ env:
+ LIBGL_ALWAYS_SOFTWARE: "1"
+
+ steps:
+ - name: get CPU information
+ shell: bash
+ run: |
+ cat /proc/cpuinfo
+
+ - name: checkout repository
+ uses: actions/checkout@v4
+
+ - name: install dependencies
+ uses: jirutka/setup-alpine@v1
+ with:
+ # For available CPU architectures, see:
+ # https://github.com/marketplace/actions/setup-alpine-linux-environment
+ arch: x86
+ # QScintilla-Qt6 is currently not distributed by Alpine Linux. When
+ # it is, consider switching to Qt6 packages:
+ # qt6-qt5compat-dev
+ # qt6-qttools-dev
+ # The following packages are only needed to buid and install gl2ps:
+ # cmake
+ # wget
+ # libpng
+ # sudo
+ packages: >
+ build-base
+ autoconf
+ automake
+ m4
+ git
+ ccache
+ coreutils
+ gfortran
+ flex
+ gperf
+ icoutils
+ mesa-dri-gallium
+ libtool
+ libltdl
+ rsvg-convert
+ texlive-dvi
+ arpack-dev
+ bison
+ curl-dev
+ fftw-dev
+ fltk-dev
+ fontconfig-dev
+ freetype-dev
+ ghostscript-dev
+ glpk-dev
+ glu-dev
+ gnuplot
+ graphicsmagick-dev
+ hdf5-dev
+ lcms2-dev
+ libsm-dev
+ libsndfile-dev
+ openblas-dev
+ pcre2-dev
+ perl
+ portaudio-dev
+ qhull-dev
+ qrupdate-dev
+ qscintilla-dev
+ qt5-qttools-dev
+ qscintilla-dev
+ rapidjson-dev
+ readline-dev
+ suitesparse-dev
+ texinfo
+ xvfb-run
+ xz-dev
+ zlib-dev
+ bzip2
+ gzip
+ tar
+ zip
+ cmake
+ wget
+ libpng
+ sudo
+
+ - name: prepare ccache
+ # create key with human readable timestamp
+ # used in action/cache/restore and action/cache/save steps
+ id: ccache-prepare
+ run: |
+ echo "key=ccache:alpine:x86:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
+
+ - name: restore ccache
+ # setup the github cache used to maintain the ccache from one job to the next
+ uses: actions/cache/restore@v4
+ with:
+ # location of the ccache of the chroot in the root file system
+ path: /home/runner/rootfs/alpine-latest-x86/home/runner/.ccache
+ key: ${{ steps.ccache-prepare.outputs.key }}
+ restore-keys: |
+ ccache:alpine:x86:${{ github.ref }}
+ ccache:alpine:x86:refs/heads/default
+
+ - name: configure ccache
+ run: |
+ test -d ~/.ccache || mkdir ~/.ccache
+ echo "max_size = 1G" >> ~/.ccache/ccache.conf
+ echo "compression = true" >> ~/.ccache/ccache.conf
+ ccache --version
+ ccache -p
+ ccache -s
+ echo "/usr/lib/ccache/bin" >> $GITHUB_PATH
+
+ - name: build gl2ps
+ # gl2ps is currently not distributed by Alpine Linux.
+ # We need it for printing.
+ run: |
+ mkdir -p gl2ps && cd gl2ps
+ printf "::group::\033[0;32m==>\033[0m Download tarball\n"
+ wget -O gl2ps-1.4.2.tgz https://geuz.org/gl2ps/src/gl2ps-1.4.2.tgz
+ echo "::endgroup::"
+ printf "::group::\033[0;32m==>\033[0m Unpack tarball\n"
+ tar zxvf gl2ps-1.4.2.tgz
+ echo "::endgroup::"
+ printf "::group::\033[0;32m==>\033[0m Configure\n"
+ mkdir -p build && cd build
+ cmake -DCMAKE_BUILD_TYPE=Release ../gl2ps-1.4.2
+ echo "::endgroup::"
+ printf "::group::\033[0;32m==>\033[0m Build\n"
+ cmake --build .
+ echo "::endgroup::"
+ printf "::group::\033[0;32m==>\033[0m Install\n"
+ sudo cmake --install .
+ echo "::endgroup::"
+
+ - name: bootstrap
+ run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
+
+ - name: configure
+ timeout-minutes: 30
+ run: |
+ echo $PATH
+ echo which ccache
+ which ccache
+ which gcc
+ echo gcc --version
+ gcc --version
+ which g++
+ echo g++ --version
+ g++ --version
+ which gfortran
+ echo gfortran --version
+ gfortran --version
+ mkdir .build
+ cd .build && ../configure
+
+ - name: build
+ # Parallel make seems to fail intermittently when creating the figures
+ # for the manual. The error message says it fails to connect to a
+ # display. Maybe an xvfb issue?
+ # Use single job make for now which seems to work more reliably.
+ run: |
+ XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build all V=1
+
+ - name: ccache status
+ run: ccache -s
+
+ - name: save ccache
+ # Save the cache after we are done (successfully) building
+ uses: actions/cache/save@v4
+ with:
+ path: /home/runner/rootfs/alpine-latest-x86/home/runner/.ccache
+ key: ${{ steps.ccache-prepare.outputs.key }}
+
+ - name: check
+ timeout-minutes: 60
+ run: |
+ XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
+ make -C ./.build check-tree-evaluator | tee ./test-suite.log
+
+ - name: display test suite log
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: check with bytecode interpreter
+ timeout-minutes: 60
+ run: |
+ mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
+ XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
+ make -C ./.build check-bytecode-evaluator | tee ./test-suite-bci.log
+
+ - name: display test suite log with bytecode interpreter
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: difference between logs with and without bytecode interpreter
+ continue-on-error: true
+ run: |
+ echo "::group::diff test-suite.log"
+ echo "diff -urN ./test-suite.log ./test-suite-bci.log"
+ diff -urN ./test-suite.log ./test-suite-bci.log || true
+ echo "::endgroup::"
+ echo "::group::diff fntests.log"
+ echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
+ diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
+ echo "::endgroup::"
+
+ - name: test history file creation
+ # see bug #62365
+ # Pipe to an interactive session to trigger appending the command to
+ # the history. This will trigger the creation of a history file.
+ run: |
+ echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
+ [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
+
+ - name: install
+ run: |
+ sudo make -C ./.build install
+
+ - name: test stand-alone executable
+ run: |
+ cd examples/code
+ mkoctfile --link-stand-alone embedded.cc -o embedded
+ LD_LIBRARY_PATH="/usr/local/lib/octave/$(octave --eval "disp(version())")" ./embedded
+
+ - name: analyze test suite results
+ # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
+ run: |
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] \
+ || echo "::warning::At least one test failed"
+ [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] \
+ || echo "::warning::At least one regression in test suite"
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] \
+ || echo "::warning::At least one test failed with bytecode interpreter"
+ [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] \
+ || echo "::warning::At least one regression in test suite with bytecode interpreter"
+ echo Finished analyzing test suite results.
diff --git a/.github/workflows/make-macos.yaml b/.github/workflows/make-macos.yaml
new file mode 100644
index 0000000000..bbc512518a
--- /dev/null
+++ b/.github/workflows/make-macos.yaml
@@ -0,0 +1,240 @@
+name: make
+on: [push]
+concurrency: ci-macos-${{ github.ref }}
+
+jobs:
+
+ macos:
+ runs-on: ${{ matrix.os }}
+
+ name: ${{ matrix.os }} Qt${{ matrix.qt }}
+
+ strategy:
+ # Allow other runners in the matrix to continue if some fail
+ fail-fast: false
+
+ matrix:
+ # For available GitHub-hosted runners, see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
+ os: [macos-14]
+ # Most (or all) homebrew packages are compiled with clang and link
+ # against libc++. So we also use clang to avoid issues with symbols
+ # that don't match.
+ # compiler: [real-gcc, clang]
+ compiler: [clang]
+ qt: [6]
+ include:
+ # - compiler: real-gcc
+ # cc: "/usr/local/bin/gcc-10"
+ # cxx: "/usr/local/bin/g++-10"
+ # cppflags: "-I/usr/local/opt/hdf5/include -I/usr/local/opt/gl2ps/include -I/usr/local/opt/glpk/include -I/usr/local/opt/pcre/include -I/usr/local/opt/qscintilla2/include -I/usr/local/opt/suite-sparse/include -I/usr/local/opt/sundials/include"
+ # ldflags: "-L/usr/local/opt/hdf5/lib -L/usr/local/opt/gl2ps/lib -L/usr/local/opt/glpk/lib -L/usr/local/opt/pcre/lib -L/usr/local/opt/qscintilla2/lib -L/usr/local/opt/suite-sparse/lib -L/usr/local/opt/sundials/lib"
+ - compiler: clang
+ cc: "clang"
+ cxx: "clang++"
+ # Qt6 doesn't install pkg-config files on macOS by default. See: https://bugreports.qt.io/browse/QTBUG-86080
+ # Homebrew installs "unofficial" .pc files for it in a non-default location.
+ qt-pkg-config-path: opt/qt@6/libexec/lib/pkgconfig
+
+ env:
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+
+ steps:
+ - name: checkout repository
+ uses: actions/checkout@v4
+
+ - name: install dependencies
+ # This step sometimes takes long and still recovers. But sometimes it
+ # seems to hang indefinitely.
+ # Use a pretty long timeout (but still less than the default 6 hours).
+ timeout-minutes: 75
+
+ # Homebrew's Python conflicts with the Python that comes pre-installed
+ # on the GitHub runners. Some of Octave's dependencies depend on
+ # different versions of Homebrew's Python. Enforce using the ones from
+ # Homebrew to avoid errors on updates.
+ # See: https://github.com/orgs/Homebrew/discussions/3928
+
+ # It looks like "gfortran" isn't working correctly unless "gcc" is
+ # re-installed.
+
+ # See also: https://formulae.brew.sh/formula/octave#default
+ # The packages are listed in (alphabetically sorted) blocks:
+ # The first block is for "direct" dependencies.
+ # The second block is for additional dependencies needed when building from a release tarball.
+ # The third block is for additional dependencies needed when building from a repository checkout.
+ run: |
+ brew update
+ brew install --overwrite python@3.11 python@3.12
+ brew reinstall gcc
+ brew install arpack epstool fftw fig2dev fltk fontconfig freetype \
+ ghostscript gl2ps glpk gnuplot graphicsmagick hdf5 libsndfile \
+ libtool openblas pcre2 portaudio pstoedit qhull qrupdate \
+ qscintilla2 qt@${{ matrix.qt }} rapidjson readline suite-sparse sundials texinfo \
+ ccache gnu-sed openjdk pkg-config \
+ automake autoconf bison gettext icoutils librsvg mactex-no-gui
+ eval "$(/usr/libexec/path_helper)"
+ HOMEBREW_PREFIX=$(brew --prefix)
+ echo "HOMEBREW_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
+ echo "/Library/TeX/texbin" >> $GITHUB_PATH
+ echo "${HOMEBREW_PREFIX}/opt/qt@${{ matrix.qt }}/bin" >> $GITHUB_PATH
+ echo "${HOMEBREW_PREFIX}/opt/texinfo/bin" >> $GITHUB_PATH
+ echo "${HOMEBREW_PREFIX}/opt/bison/bin" >> $GITHUB_PATH
+ echo "${HOMEBREW_PREFIX}/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
+
+ - name: prepare ccache
+ # create key with human readable timestamp
+ # used in action/cache/restore and action/cache/save steps
+ id: ccache-prepare
+ run: |
+ echo "key=ccache:${{ matrix.os }}:${{ matrix.compiler }}:qt${{ matrix.qt }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
+
+ - name: restore ccache
+ # setup the github cache used to maintain the ccache from one job to the next
+ uses: actions/cache/restore@v4
+ id: restore-ccache
+ with:
+ path: /Users/runner/Library/Caches/ccache
+ key: ${{ steps.ccache-prepare.outputs.key }}
+ restore-keys: |
+ ccache:${{ matrix.os }}:${{ matrix.compiler }}:qt${{ matrix.qt }}:${{ github.ref }}
+ ccache:${{ matrix.os }}:${{ matrix.compiler }}:qt${{ matrix.qt }}:refs/heads/default
+
+ - name: configure ccache
+ # The cache doesn't seem to compress well on macOS. Is it already compressed?
+ # Limit the maximum size to avoid exceeding the total cache limits.
+ run: |
+ test -d /Users/runner/Library/Preferences/ccache || mkdir /Users/runner/Library/Preferences/ccache
+ echo "max_size = 0.9G" >> /Users/runner/Library/Preferences/ccache/ccache.conf
+ ccache -s
+ echo "${HOMEBREW_PREFIX}/opt/ccache/libexec" >> $GITHUB_PATH
+
+ - name: bootstrap
+ run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
+
+ - name: configure
+ timeout-minutes: 30
+ env:
+ MY_CPPFLAGS: ${{ matrix.cppflags }}
+ MY_LDFLAGS: ${{ matrix.ldflags }}
+ # This is a hodgepodge of configure flags put together from the
+ # buildbot rules:
+ # https://hg.octave.org/octave-buildbot/file/tip/master.cfg#l543
+ # And the homebrew formula:
+ # https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/octave.rb
+ # Amended with additional flags that seem to be needed.
+ # Not all of those might be needed or be correct.
+ run: |
+ echo $PATH
+ echo which ccache
+ which ccache
+ which $CC
+ echo $CC --version
+ $CC --version
+ which $CXX
+ echo $CXX --version
+ $CXX --version
+ which gfortran
+ echo gfortran --version
+ gfortran --version
+ mkdir .build
+ cd .build && ../configure \
+ CXX="${CXX} ${{ matrix.cxx-compiler-flags }}" \
+ F77="ccache gfortran" \
+ CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/gettext/include -I${HOMEBREW_PREFIX}/opt/icu4c/include -I${HOMEBREW_PREFIX}/opt/qt@${{ matrix.qt }}/include -I${HOMEBREW_PREFIX}/opt/readline/include -I${HOMEBREW_PREFIX}/opt/sqlite/include $MY_CPPFLAGS -I${HOMEBREW_PREFIX}/include" \
+ CXXFLAGS="-O2 -g" \
+ LDFLAGS="-L${HOMEBREW_PREFIX}/opt/bison/lib -L${HOMEBREW_PREFIX}/opt/gettext/lib -L${HOMEBREW_PREFIX}/opt/icu4c/lib -L${HOMEBREW_PREFIX}/opt/readline/lib -L${HOMEBREW_PREFIX}/opt/sqlite/lib $MY_LDFLAGS -L${HOMEBREW_PREFIX}/lib" \
+ PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/openblas/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/icu4c/lib/pkgconfig:${HOMEBREW_PREFIX}/${{ matrix.qt-pkg-config-path }}" \
+ --with-qt=${{ matrix.qt }} \
+ QCOLLECTIONGENERATOR="qhelpgenerator" \
+ --with-x=no \
+ --with-blas="-L${HOMEBREW_PREFIX}/opt/openblas/lib -lopenblas" \
+ --with-java-homedir="${HOMEBREW_PREFIX}/opt/openjdk" \
+ --prefix="${HOME}/usr"
+
+ - name: build
+ run: make -C ./.build all -j3 V=1
+
+ - name: ccache status
+ run: ccache -s
+
+ - name: save ccache
+ # Save the cache after we are done (successfully) building
+ uses: actions/cache/save@v4
+ with:
+ path: /Users/runner/Library/Caches/ccache
+ key: ${{ steps.ccache-prepare.outputs.key }}
+
+ - name: check
+ # Continuing on error in this step means that jobs will be "green" even
+ # if the test suite crashes. But if we don't continue, we'll loose the
+ # ccache and other jobs will be cancelled, too.
+ # It would be nice if we could mark the job as "yellow" (and continue)
+ # in that case. The second best thing is to display a warning in the
+ # job summary (see below).
+ continue-on-error: true
+ timeout-minutes: 60
+ run: |
+ echo 'makeinfo_program ("${HOMEBREW_PREFIX}/opt/texinfo/bin/makeinfo");' >> ./scripts/startup/site-rcfile
+ make -C ./.build check-tree-evaluator | tee ./test-suite.log
+
+ - name: display test suite log
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: check with bytecode interpreter
+ timeout-minutes: 60
+ run: |
+ mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
+ make -C ./.build check-bytecode-evaluator | tee ./test-suite-bci.log
+
+ - name: display test suite log with bytecode interpreter
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: difference between logs with and without bytecode interpreter
+ continue-on-error: true
+ run: |
+ echo "::group::diff test-suite.log"
+ echo "diff -urN ./test-suite.log ./test-suite-bci.log"
+ diff -urN ./test-suite.log ./test-suite-bci.log || true
+ echo "::endgroup::"
+ echo "::group::diff fntests.log"
+ echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
+ diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
+ echo "::endgroup::"
+
+ - name: test history file creation
+ # see bug #62365
+ # Pipe to an interactive session to trigger appending the command to
+ # the history. This will trigger the creation of a history file.
+ run: |
+ echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
+ [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
+
+ - name: install
+ run: |
+ mkdir -p /Users/runner/usr
+ make -C ./.build install
+
+ - name: test stand-alone executable
+ run: |
+ unset CC
+ unset CXX
+ cd examples/code
+ PATH="/Users/runner/usr/bin:$PATH" \
+ mkoctfile --link-stand-alone embedded.cc -o embedded
+ ./embedded
+
+ - name: analyze test suite results
+ # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
+ run: |
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || exit 1
+ [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || exit 1
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] || exit 1
+ [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] || exit 1
+ echo No unknown failing tests.
diff --git a/.github/workflows/make-mingw.yaml b/.github/workflows/make-mingw.yaml
new file mode 100644
index 0000000000..7adc4e5a9b
--- /dev/null
+++ b/.github/workflows/make-mingw.yaml
@@ -0,0 +1,266 @@
+name: make
+on: [push]
+concurrency: ci-mingw-${{ github.ref }}
+
+jobs:
+
+ mingw:
+ runs-on: ${{ matrix.os }}
+
+ name: mingw-w64 ${{ matrix.msystem }}
+
+ defaults:
+ run:
+ # Use MSYS2 as default shell
+ shell: msys2 {0}
+
+ strategy:
+ # Allow other runners in the matrix to continue if some fail
+ fail-fast: false
+
+ matrix:
+ # For available GitHub-hosted runners, see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
+ os: [windows-latest]
+ msystem: [MINGW64]
+ include:
+ - msystem: MINGW64
+ mingw-prefix: mingw64
+ target-prefix: mingw-w64-x86_64
+ cc: gcc
+ cxx: g++
+ f77: gfortran
+ extra-config-flags: ""
+ ccache-max: 0.9G
+ allow-error: false
+
+ env:
+ CHERE_INVOKING: 1
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+ F77: ${{ matrix.f77 }}
+ # perl uses cmd shell by default
+ PERL5SHELL: bash -l -c
+
+ steps:
+ - name: get CPU name
+ # The runners for the 32-bit target sometimes get stuck in configure
+ # when using the Fortran compiler.
+ # Does that error depend on the processor of the selected runner?
+ shell: pwsh
+ run : |
+ Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name
+
+ - name: install MSYS2 build environment
+ uses: msys2/setup-msys2@v2
+ with:
+ update: true
+
+ # Use pre-installed version to save disc space on partition with source.
+ # We need that space for building.
+ release: false
+
+ # The packages are listed in (alphabetically sorted) blocks:
+ # The first block is for mandatory dependencies.
+ # The second block is for optional dependencies needed when building from a release tarball.
+ # The third block is for additional dependencies needed when building from a repository checkout.
+ # The fourth block is for additional run-time dependencies (to run test suite) that aren't needed to build.
+ install: >-
+ base-devel
+ ${{ matrix.target-prefix }}-autotools
+ ${{ matrix.target-prefix }}-cc
+ ${{ matrix.target-prefix }}-fc
+ ${{ matrix.target-prefix }}-gperf
+ ${{ matrix.target-prefix }}-openblas
+ ${{ matrix.target-prefix }}-pcre2
+
+ ${{ matrix.target-prefix }}-arpack
+ ${{ matrix.target-prefix }}-curl
+ ${{ matrix.target-prefix }}-fftw
+ ${{ matrix.target-prefix }}-fltk
+ ${{ matrix.target-prefix }}-gl2ps
+ ${{ matrix.target-prefix }}-glpk
+ ${{ matrix.target-prefix }}-ghostscript
+ ${{ matrix.target-prefix }}-gnuplot
+ ${{ matrix.target-prefix }}-graphicsmagick
+ ${{ matrix.target-prefix }}-hdf5
+ ${{ matrix.target-prefix }}-libsndfile
+ ${{ matrix.target-prefix }}-portaudio
+ ${{ matrix.target-prefix }}-qhull
+ ${{ matrix.target-prefix }}-qrupdate
+ ${{ matrix.target-prefix }}-qscintilla
+ ${{ matrix.target-prefix }}-qt5-base
+ ${{ matrix.target-prefix }}-qt5-imageformats
+ ${{ matrix.target-prefix }}-qt5-svg
+ ${{ matrix.target-prefix }}-qt5-tools
+ ${{ matrix.target-prefix }}-rapidjson
+ ${{ matrix.target-prefix }}-suitesparse
+ ${{ matrix.target-prefix }}-sundials
+
+ git
+ ${{ matrix.target-prefix }}-ccache
+ ${{ matrix.target-prefix }}-icoutils
+ ${{ matrix.target-prefix }}-librsvg
+ ${{ matrix.target-prefix }}-texinfo
+
+ unzip
+ zip
+
+ msystem: ${{ matrix.msystem }}
+
+ - name: checkout repository
+ uses: actions/checkout@v4
+
+ - name: prepare ccache
+ # create key with human readable timestamp
+ # used in action/cache/restore and action/cache/save steps
+ id: ccache-prepare
+ run: |
+ echo "ccachedir=$(cygpath -m $(ccache -k cache_dir))" >> $GITHUB_OUTPUT
+ echo "key=ccache:${{ matrix.os }}:${{ matrix.msystem }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
+ echo "timestamp=$(date +"%Y-%m-%d_%H-%M-%S")" >> $GITHUB_OUTPUT
+
+ - name: restore ccache
+ # Setup the github cache used to maintain the ccache from one job to the next
+ uses: actions/cache/restore@v4
+ with:
+ path: ${{ steps.ccache-prepare.outputs.ccachedir }}
+ key: ${{ steps.ccache-prepare.outputs.key }}
+ restore-keys: |
+ ccache:${{ matrix.os }}:${{ matrix.msystem }}:${{ github.ref }}
+ ccache:${{ matrix.os }}:${{ matrix.msystem }}:refs/heads/default
+
+ - name: configure ccache
+ # Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota.
+ run: |
+ which ccache
+ test -d ${{ steps.ccache-prepare.outputs.ccachedir }} || mkdir -p ${{ steps.ccache-prepare.outputs.ccachedir }}
+ echo "max_size = ${{ matrix.ccache-max }}" > ${{ steps.ccache-prepare.outputs.ccachedir }}/ccache.conf
+ echo "compression = true" >> ${{ steps.ccache-prepare.outputs.ccachedir }}/ccache.conf
+ ccache -p
+ ccache -s
+ # create ccache helper script for Fortran compiler
+ echo -e '#!/bin/bash\nccache '$MINGW_PREFIX'/bin/'$F77' "$@"' > $MINGW_PREFIX/lib/ccache/bin/$F77
+ # prepend path to ccache helper scripts to PATH
+ echo 'export PATH="$MINGW_PREFIX/lib/ccache/bin:$PATH"' >> ~/.bash_profile
+
+ - name: bootstrap
+ run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
+
+ - name: configure
+ # configure sometimes hangs while compiling 32bit Fortran.
+ # It should take much less than 30 minutes. Cancel the step if it takes longer.
+ timeout-minutes: 30
+ # FIXME: Fix building with Java support. Override JAVA_HOME for now.
+ # FIXME: How do we get a working TeX environment in MSYS2? Disable building the documentation for now.
+ run: |
+ echo $PATH
+ which $CC
+ echo $CC --version
+ $CC --version
+ which ${CXX% *}
+ echo ${CXX% *} --version
+ ${CXX% *} --version
+ which $F77
+ echo $F77 --version
+ $F77 --version
+ mkdir .build
+ cd .build && ../configure \
+ JAVA_HOME="" \
+ --disable-docs \
+ ${{ matrix.extra-config-flags }}
+
+ - name: build
+ # Spawning processes seems to have a big overhead on this platform. Use a somewhat larger number of parallel processes to compensate for that.
+ run: |
+ make -C ./.build all -j8 V=1
+
+ - name: ccache status
+ continue-on-error: true
+ run: ccache -s
+
+ - name: save ccache
+ # Save the cache after we are done (successfully) building
+ uses: actions/cache/save@v4
+ with:
+ path: ${{ steps.ccache-prepare.outputs.ccachedir }}
+ key: ${{ steps.ccache-prepare.outputs.key }}
+
+ - name: check
+ # Continuing on error in this step means that jobs will be "green" even
+ # if the test suite crashes. But if we don't continue, we'll loose the
+ # ccache and other jobs will be cancelled, too.
+ # It would be nice if we could mark the job as "yellow" (and continue)
+ # in that case. The second best thing is to display a warning in the
+ # job summary (see below).
+ continue-on-error: true
+ timeout-minutes: 60
+
+ # mkoctfile seems to have trouble when gcc is called via ccache. So,
+ # remove the directory with the ccache wrappers from PATH.
+
+ run: |
+ export PATH=$(echo "$PATH" | sed -e "s|$MINGW_PREFIX/lib/ccache/bin:||g")
+ make -C ./.build check-tree-evaluator RUN_OCTAVE_OPTIONS="--no-gui-libs" | tee ./test-suite.log
+
+ - name: display test suite log
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: check with bytecode interpreter
+ timeout-minutes: 60
+ run: |
+ mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
+ make -C ./.build check-bytecode-evaluator RUN_OCTAVE_OPTIONS="--no-gui-libs" | tee ./test-suite-bci.log
+
+ - name: display test suite log with bytecode interpreter
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: difference between logs with and without bytecode interpreter
+ continue-on-error: true
+ run: |
+ echo "::group::diff test-suite.log"
+ echo "diff -urN ./test-suite.log ./test-suite-bci.log"
+ diff -urN ./test-suite.log ./test-suite-bci.log || true
+ echo "::endgroup::"
+ echo "::group::diff fntests.log"
+ echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
+ diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
+ echo "::endgroup::"
+
+ - name: test history file creation
+ # see bug #62365
+ # Pipe to an interactive session to trigger appending the command to
+ # the history. This will trigger the creation of a history file.
+ run: |
+ echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
+ [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
+
+ - name: install
+ run: |
+ mkdir -p /c/octave/pkg
+ make -C ./.build DESTDIR=/c/octave/pkg install
+
+ - name: test stand-alone executable
+ continue-on-error: ${{ matrix.allow-error }}
+ run: |
+ unset CC
+ unset CXX
+ export PATH=$(echo "$PATH" | sed -e "s|$MINGW_PREFIX/lib/ccache/bin:||g")
+ export PATH="/c/octave/pkg/${{ matrix.mingw-prefix }}/bin:$PATH"
+ cd examples/code
+ mkoctfile --link-stand-alone embedded.cc -o embedded
+ ./embedded.exe
+
+ - name: analyze test suite results
+ # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
+ run: |
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || echo "::warning::At least one test failed"
+ [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || echo "::warning::At least one regression in test suite"
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] || echo "::warning::At least one test failed with bytecode interpreter"
+ [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] || echo "::warning::At least one regression in test suite with bytecode interpreter"
+ echo Finished analyzing test suite results.
diff --git a/.github/workflows/make-ubuntu.yaml b/.github/workflows/make-ubuntu.yaml
new file mode 100644
index 0000000000..cb52abc613
--- /dev/null
+++ b/.github/workflows/make-ubuntu.yaml
@@ -0,0 +1,199 @@
+name: make
+on: [push]
+concurrency: ci-ubuntu-${{ github.ref }}
+
+jobs:
+
+ ubuntu:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ # Allow other runners in the matrix to continue if some fail
+ fail-fast: false
+
+ matrix:
+ # For available GitHub-hosted runners, see:
+ # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
+ os: [ubuntu-24.04]
+ compiler: [gcc, clang]
+ include:
+ - compiler: gcc
+ compiler-pkgs: "g++ gcc"
+ cc: "gcc"
+ cxx: "g++"
+ extra-config-flags: ""
+ - compiler: clang
+ compiler-pkgs: "clang libc++-dev libc++abi-dev"
+ cc: "clang"
+ cxx: "clang++ -stdlib=libc++"
+ extra-config-flags: "--without-spqr --without-magick"
+ # Clang seems to generally require less cache size (smaller object files?).
+ - ccache-max: 1.2G
+ - os: ubuntu-24.04
+ compiler: gcc
+ ccache-max: 1.2G
+ - os: ubuntu-24.04
+ compiler: clang
+ ccache-max: 400M
+
+ name: ${{ matrix.os }} ${{ matrix.compiler }}
+
+ env:
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+
+ steps:
+ - name: checkout repository
+ uses: actions/checkout@v4
+
+ - name: install dependencies
+ env:
+ COMPILER_PKGS: ${{ matrix.compiler-pkgs }}
+ run: |
+ sudo apt -qq update
+ sudo apt install -y $COMPILER_PKGS autoconf automake bison ccache \
+ dvipng epstool fig2dev flex gfortran gnuplot-x11 gperf gzip \
+ icoutils libarpack2-dev libblas-dev libcurl4-gnutls-dev \
+ libfftw3-dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev \
+ libgl1-mesa-dev libgl2ps-dev libglpk-dev libgraphicsmagick++1-dev \
+ libhdf5-dev liblapack-dev libosmesa6-dev libpcre2-dev \
+ libqhull-dev libqscintilla2-qt5-dev libqrupdate-dev \
+ libreadline-dev librsvg2-bin libsndfile1-dev libsuitesparse-dev \
+ libsundials-dev libtool libxft-dev make openjdk-8-jdk \
+ perl portaudio19-dev pstoedit qtbase5-dev qttools5-dev \
+ qttools5-dev-tools rapidjson-dev rsync tar texinfo \
+ texlive-latex-extra xvfb zlib1g-dev
+
+ - name: prepare ccache
+ # create key with human readable timestamp
+ # used in action/cache/restore and action/cache/save steps
+ id: ccache-prepare
+ run: |
+ echo "key=ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
+
+ - name: restore ccache
+ # setup the github cache used to maintain the ccache from one job to the next
+ uses: actions/cache/restore@v4
+ with:
+ path: ~/.ccache
+ key: ${{ steps.ccache-prepare.outputs.key }}
+ restore-keys: |
+ ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}
+ ccache:${{ matrix.os }}:${{ matrix.compiler }}:refs/heads/default
+
+ - name: configure ccache
+ env:
+ CCACHE_MAX: ${{ matrix.ccache-max }}
+ run: |
+ test -d ~/.ccache || mkdir ~/.ccache
+ echo "max_size = $CCACHE_MAX" >> ~/.ccache/ccache.conf
+ ccache -s
+ echo "/usr/lib/ccache" >> $GITHUB_PATH
+
+ - name: bootstrap
+ run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
+
+ - name: configure
+ timeout-minutes: 30
+ run: |
+ echo $PATH
+ echo which ccache
+ which ccache
+ which $CC
+ echo $CC --version
+ $CC --version
+ which ${CXX% *}
+ echo ${CXX% *} --version
+ ${CXX% *} --version
+ which gfortran
+ echo gfortran --version
+ gfortran --version
+ mkdir .build
+ cd .build && ../configure \
+ CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/include/suitesparse" \
+ LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial" \
+ ${{ matrix.extra-config-flags }}
+
+ - name: build
+ # Parallel make seems to fail intermittently when creating the figures
+ # for the manual. The error message says it fails to connect to a
+ # display. Maybe an xvfb issue?
+ # Use single job make for now which seems to work more reliably.
+ run: XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build all V=1
+
+ - name: ccache status
+ run: ccache -s
+
+ - name: save ccache
+ # Save the cache after we are done (successfully) building
+ uses: actions/cache/save@v4
+ with:
+ path: ~/.ccache
+ key: ${{ steps.ccache-prepare.outputs.key }}
+
+ - name: check
+ timeout-minutes: 60
+ run: |
+ XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
+ make -C ./.build check-tree-evaluator | tee ./test-suite.log
+
+ - name: display test suite log
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: check with bytecode interpreter
+ timeout-minutes: 60
+ run: |
+ mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
+ XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
+ make -C ./.build check-bytecode-evaluator | tee ./test-suite-bci.log
+
+ - name: display test suite log with bytecode interpreter
+ continue-on-error: true
+ # Displaying the log shouldn't take long. Cancel the step if it does.
+ timeout-minutes: 5
+ run: cat ./.build/test/fntests.log
+
+ - name: difference between logs with and without bytecode interpreter
+ continue-on-error: true
+ run: |
+ echo "::group::diff test-suite.log"
+ echo "diff -urN ./test-suite.log ./test-suite-bci.log"
+ diff -urN ./test-suite.log ./test-suite-bci.log || true
+ echo "::endgroup::"
+ echo "::group::diff fntests.log"
+ echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
+ diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
+ echo "::endgroup::"
+
+ - name: test history file creation
+ # see bug #62365
+ # Pipe to an interactive session to trigger appending the command to
+ # the history. This will trigger the creation of a history file.
+ run: |
+ echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
+ [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
+
+ - name: install
+ run: |
+ sudo make -C ./.build install
+
+ - name: test stand-alone executable
+ run: |
+ unset CC
+ unset CXX
+ cd examples/code
+ mkoctfile --link-stand-alone embedded.cc -o embedded
+ LD_LIBRARY_PATH="/usr/local/lib/octave/$(octave --eval "disp(version())")" \
+ ./embedded
+
+ - name: analyze test suite results
+ # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
+ run: |
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || exit 1
+ [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || exit 1
+ [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] || exit 1
+ [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] || exit 1
+ echo No unknown failing tests.
diff --git a/.github/workflows/make.yaml b/.github/workflows/make.yaml
deleted file mode 100644
index 4ce84fc9d5..0000000000
--- a/.github/workflows/make.yaml
+++ /dev/null
@@ -1,954 +0,0 @@
-name: make
-on: [push]
-concurrency: ci-${{ github.ref }}
-
-jobs:
-
- ubuntu:
- runs-on: ${{ matrix.os }}
-
- strategy:
- # Allow other runners in the matrix to continue if some fail
- fail-fast: false
-
- matrix:
- # For available GitHub-hosted runners, see:
- # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
- os: [ubuntu-24.04]
- compiler: [gcc, clang]
- include:
- - compiler: gcc
- compiler-pkgs: "g++ gcc"
- cc: "gcc"
- cxx: "g++"
- extra-config-flags: ""
- - compiler: clang
- compiler-pkgs: "clang libc++-dev libc++abi-dev"
- cc: "clang"
- cxx: "clang++ -stdlib=libc++"
- extra-config-flags: "--without-spqr --without-magick"
- # Clang seems to generally require less cache size (smaller object files?).
- - ccache-max: 1.2G
- - os: ubuntu-24.04
- compiler: gcc
- ccache-max: 1.2G
- - os: ubuntu-24.04
- compiler: clang
- ccache-max: 400M
-
- name: ${{ matrix.os }} ${{ matrix.compiler }}
-
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
-
- steps:
- - name: checkout repository
- uses: actions/checkout@v4
-
- - name: install dependencies
- env:
- COMPILER_PKGS: ${{ matrix.compiler-pkgs }}
- run: |
- sudo apt -qq update
- sudo apt install -y $COMPILER_PKGS autoconf automake bison ccache \
- dvipng epstool fig2dev flex gfortran gnuplot-x11 gperf gzip \
- icoutils libarpack2-dev libblas-dev libcurl4-gnutls-dev \
- libfftw3-dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev \
- libgl1-mesa-dev libgl2ps-dev libglpk-dev libgraphicsmagick++1-dev \
- libhdf5-dev liblapack-dev libosmesa6-dev libpcre2-dev \
- libqhull-dev libqscintilla2-qt5-dev libqrupdate-dev \
- libreadline-dev librsvg2-bin libsndfile1-dev libsuitesparse-dev \
- libsundials-dev libtool libxft-dev make openjdk-8-jdk \
- perl portaudio19-dev pstoedit qtbase5-dev qttools5-dev \
- qttools5-dev-tools rapidjson-dev rsync tar texinfo \
- texlive-latex-extra xvfb zlib1g-dev
-
- - name: prepare ccache
- # create key with human readable timestamp
- # used in action/cache/restore and action/cache/save steps
- id: ccache-prepare
- run: |
- echo "key=ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
-
- - name: restore ccache
- # setup the github cache used to maintain the ccache from one job to the next
- uses: actions/cache/restore@v4
- with:
- path: ~/.ccache
- key: ${{ steps.ccache-prepare.outputs.key }}
- restore-keys: |
- ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}
- ccache:${{ matrix.os }}:${{ matrix.compiler }}:refs/heads/default
-
- - name: configure ccache
- env:
- CCACHE_MAX: ${{ matrix.ccache-max }}
- run: |
- test -d ~/.ccache || mkdir ~/.ccache
- echo "max_size = $CCACHE_MAX" >> ~/.ccache/ccache.conf
- ccache -s
- echo "/usr/lib/ccache" >> $GITHUB_PATH
-
- - name: bootstrap
- run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
-
- - name: configure
- timeout-minutes: 30
- run: |
- echo $PATH
- echo which ccache
- which ccache
- which $CC
- echo $CC --version
- $CC --version
- which ${CXX% *}
- echo ${CXX% *} --version
- ${CXX% *} --version
- which gfortran
- echo gfortran --version
- gfortran --version
- mkdir .build
- cd .build && ../configure \
- CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/include/suitesparse" \
- LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial" \
- ${{ matrix.extra-config-flags }}
-
- - name: build
- # Parallel make seems to fail intermittently when creating the figures
- # for the manual. The error message says it fails to connect to a
- # display. Maybe an xvfb issue?
- # Use single job make for now which seems to work more reliably.
- run: XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build all V=1
-
- - name: ccache status
- run: ccache -s
-
- - name: save ccache
- # Save the cache after we are done (successfully) building
- uses: actions/cache/save@v4
- with:
- path: ~/.ccache
- key: ${{ steps.ccache-prepare.outputs.key }}
-
- - name: check
- timeout-minutes: 60
- run: |
- XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
- make -C ./.build check-tree-evaluator | tee ./test-suite.log
-
- - name: display test suite log
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: check with bytecode interpreter
- timeout-minutes: 60
- run: |
- mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
- XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
- make -C ./.build check-bytecode-evaluator | tee ./test-suite-bci.log
-
- - name: display test suite log with bytecode interpreter
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: difference between logs with and without bytecode interpreter
- continue-on-error: true
- run: |
- echo "::group::diff test-suite.log"
- echo "diff -urN ./test-suite.log ./test-suite-bci.log"
- diff -urN ./test-suite.log ./test-suite-bci.log || true
- echo "::endgroup::"
- echo "::group::diff fntests.log"
- echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
- diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
- echo "::endgroup::"
-
- - name: test history file creation
- # see bug #62365
- # Pipe to an interactive session to trigger appending the command to
- # the history. This will trigger the creation of a history file.
- run: |
- echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
- [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
-
- - name: install
- run: |
- sudo make -C ./.build install
-
- - name: test stand-alone executable
- run: |
- unset CC
- unset CXX
- cd examples/code
- mkoctfile --link-stand-alone embedded.cc -o embedded
- LD_LIBRARY_PATH="/usr/local/lib/octave/$(octave --eval "disp(version())")" \
- ./embedded
-
- - name: analyze test suite results
- # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
- run: |
- [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || exit 1
- [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || exit 1
- [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] || exit 1
- [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] || exit 1
- echo No unknown failing tests.
-
-
- alpine:
- runs-on: ubuntu-latest
-
- name: Alpine (x86, musl)
-
- defaults:
- run:
- # Use emulated shell as default
- shell: alpine.sh {0}
-
- env:
- LIBGL_ALWAYS_SOFTWARE: "1"
-
- steps:
- - name: get CPU information
- shell: bash
- run: |
- cat /proc/cpuinfo
-
- - name: checkout repository
- uses: actions/checkout@v4
-
- - name: install dependencies
- uses: jirutka/setup-alpine@v1
- with:
- # For available CPU architectures, see:
- # https://github.com/marketplace/actions/setup-alpine-linux-environment
- arch: x86
- # QScintilla-Qt6 is currently not distributed by Alpine Linux. When
- # it is, consider switching to Qt6 packages:
- # qt6-qt5compat-dev
- # qt6-qttools-dev
- # The following packages are only needed to buid and install gl2ps:
- # cmake
- # wget
- # libpng
- # sudo
- # ARPACK as distributed for Alpine latest-stable seems to be broken:
- # arpack-dev
- packages: >
- build-base
- autoconf
- automake
- m4
- git
- ccache
- coreutils
- gfortran
- flex
- gperf
- icoutils
- mesa-dri-gallium
- libtool
- libltdl
- rsvg-convert
- texlive-dvi
- bison
- curl-dev
- fftw-dev
- fltk-dev
- fontconfig-dev
- freetype-dev
- ghostscript-dev
- glpk-dev
- glu-dev
- gnuplot
- graphicsmagick-dev
- hdf5-dev
- lcms2-dev
- libsm-dev
- libsndfile-dev
- openblas-dev
- pcre2-dev
- perl
- portaudio-dev
- qhull-dev
- qrupdate-dev
- qscintilla-dev
- qt5-qttools-dev
- qscintilla-dev
- rapidjson-dev
- readline-dev
- suitesparse-dev
- texinfo
- texmf-dist-lang
- texmf-dist-latexrecommended
- texmf-dist-plaingeneric
- xvfb-run
- xz-dev
- zlib-dev
- bzip2
- gzip
- tar
- zip
- cmake
- wget
- libpng
- sudo
-
- - name: prepare ccache
- # create key with human readable timestamp
- # used in action/cache/restore and action/cache/save steps
- id: ccache-prepare
- run: |
- echo "key=ccache:alpine:x86:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
-
- - name: restore ccache
- # setup the github cache used to maintain the ccache from one job to the next
- uses: actions/cache/restore@v4
- with:
- # location of the ccache of the chroot in the root file system
- path: /home/runner/rootfs/alpine-latest-x86/home/runner/.ccache
- key: ${{ steps.ccache-prepare.outputs.key }}
- restore-keys: |
- ccache:alpine:x86:${{ github.ref }}
- ccache:alpine:x86:refs/heads/default
-
- - name: configure ccache
- run: |
- test -d ~/.ccache || mkdir ~/.ccache
- echo "max_size = 1G" >> ~/.ccache/ccache.conf
- echo "compression = true" >> ~/.ccache/ccache.conf
- ccache --version
- ccache -p
- ccache -s
- echo "/usr/lib/ccache/bin" >> $GITHUB_PATH
-
- - name: build gl2ps
- # gl2ps is currently not distributed by Alpine Linux.
- # We need it for printing.
- run: |
- mkdir -p gl2ps && cd gl2ps
- printf "::group::\033[0;32m==>\033[0m Download tarball\n"
- wget -O gl2ps-1.4.2.tgz https://geuz.org/gl2ps/src/gl2ps-1.4.2.tgz
- echo "::endgroup::"
- printf "::group::\033[0;32m==>\033[0m Unpack tarball\n"
- tar zxvf gl2ps-1.4.2.tgz
- echo "::endgroup::"
- printf "::group::\033[0;32m==>\033[0m Configure\n"
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release ../gl2ps-1.4.2
- echo "::endgroup::"
- printf "::group::\033[0;32m==>\033[0m Build\n"
- cmake --build .
- echo "::endgroup::"
- printf "::group::\033[0;32m==>\033[0m Install\n"
- sudo cmake --install .
- echo "::endgroup::"
-
- - name: bootstrap
- run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
-
- - name: configure
- timeout-minutes: 30
- run: |
- echo $PATH
- echo which ccache
- which ccache
- which gcc
- echo gcc --version
- gcc --version
- which g++
- echo g++ --version
- g++ --version
- which gfortran
- echo gfortran --version
- gfortran --version
- mkdir .build
- cd .build && ../configure
-
- - name: build
- # Parallel make seems to fail intermittently when creating the figures
- # for the manual. The error message says it fails to connect to a
- # display. Maybe an xvfb issue?
- # Use single job make for now which seems to work more reliably.
- run: |
- XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build all V=1
-
- - name: ccache status
- run: ccache -s
-
- - name: save ccache
- # Save the cache after we are done (successfully) building
- uses: actions/cache/save@v4
- with:
- path: /home/runner/rootfs/alpine-latest-x86/home/runner/.ccache
- key: ${{ steps.ccache-prepare.outputs.key }}
-
- - name: check
- timeout-minutes: 60
- run: |
- XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
- make -C ./.build check-tree-evaluator | tee ./test-suite.log
-
- - name: display test suite log
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: check with bytecode interpreter
- timeout-minutes: 60
- run: |
- mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
- XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a \
- make -C ./.build check-bytecode-evaluator | tee ./test-suite-bci.log
-
- - name: display test suite log with bytecode interpreter
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: difference between logs with and without bytecode interpreter
- continue-on-error: true
- run: |
- echo "::group::diff test-suite.log"
- echo "diff -urN ./test-suite.log ./test-suite-bci.log"
- diff -urN ./test-suite.log ./test-suite-bci.log || true
- echo "::endgroup::"
- echo "::group::diff fntests.log"
- echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
- diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
- echo "::endgroup::"
-
- - name: test history file creation
- # see bug #62365
- # Pipe to an interactive session to trigger appending the command to
- # the history. This will trigger the creation of a history file.
- run: |
- echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
- [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
-
- - name: install
- run: |
- sudo make -C ./.build install
-
- - name: test stand-alone executable
- run: |
- cd examples/code
- mkoctfile --link-stand-alone embedded.cc -o embedded
- LD_LIBRARY_PATH="/usr/local/lib/octave/$(octave --eval "disp(version())")" ./embedded
-
- - name: analyze test suite results
- # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
- run: |
- [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] \
- || echo "::warning::At least one test failed"
- [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] \
- || echo "::warning::At least one regression in test suite"
- [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] \
- || echo "::warning::At least one test failed with bytecode interpreter"
- [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] \
- || echo "::warning::At least one regression in test suite with bytecode interpreter"
- echo Finished analyzing test suite results.
-
-
- macos:
- runs-on: ${{ matrix.os }}
-
- name: ${{ matrix.os }} Qt${{ matrix.qt }}
-
- strategy:
- # Allow other runners in the matrix to continue if some fail
- fail-fast: false
-
- matrix:
- # For available GitHub-hosted runners, see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
- os: [macos-14]
- # Most (or all) homebrew packages are compiled with clang and link
- # against libc++. So we also use clang to avoid issues with symbols
- # that don't match.
- # compiler: [real-gcc, clang]
- compiler: [clang]
- qt: [6]
- include:
- # - compiler: real-gcc
- # cc: "/usr/local/bin/gcc-10"
- # cxx: "/usr/local/bin/g++-10"
- # cppflags: "-I/usr/local/opt/hdf5/include -I/usr/local/opt/gl2ps/include -I/usr/local/opt/glpk/include -I/usr/local/opt/pcre/include -I/usr/local/opt/qscintilla2/include -I/usr/local/opt/suite-sparse/include -I/usr/local/opt/sundials/include"
- # ldflags: "-L/usr/local/opt/hdf5/lib -L/usr/local/opt/gl2ps/lib -L/usr/local/opt/glpk/lib -L/usr/local/opt/pcre/lib -L/usr/local/opt/qscintilla2/lib -L/usr/local/opt/suite-sparse/lib -L/usr/local/opt/sundials/lib"
- - compiler: clang
- cc: "clang"
- cxx: "clang++"
- # Qt6 doesn't install pkg-config files on macOS by default. See: https://bugreports.qt.io/browse/QTBUG-86080
- # Homebrew installs "unofficial" .pc files for it in a non-default location.
- qt-pkg-config-path: opt/qt@6/libexec/lib/pkgconfig
-
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
-
- steps:
- - name: checkout repository
- uses: actions/checkout@v4
-
- - name: install dependencies
- # This step sometimes takes long and still recovers. But sometimes it
- # seems to hang indefinitely.
- # Use a pretty long timeout (but still less than the default 6 hours).
- timeout-minutes: 75
-
- # Homebrew's Python conflicts with the Python that comes pre-installed
- # on the GitHub runners. Some of Octave's dependencies depend on
- # different versions of Homebrew's Python. Enforce using the ones from
- # Homebrew to avoid errors on updates.
- # See: https://github.com/orgs/Homebrew/discussions/3928
-
- # It looks like "gfortran" isn't working correctly unless "gcc" is
- # re-installed.
-
- # See also: https://formulae.brew.sh/formula/octave#default
- # The packages are listed in (alphabetically sorted) blocks:
- # The first block is for "direct" dependencies.
- # The second block is for additional dependencies needed when building from a release tarball.
- # The third block is for additional dependencies needed when building from a repository checkout.
- run: |
- brew update
- brew install --overwrite python@3.11 python@3.12
- brew reinstall gcc
- brew install arpack epstool fftw fig2dev fltk fontconfig freetype \
- ghostscript gl2ps glpk gnuplot graphicsmagick hdf5 libsndfile \
- libtool openblas pcre2 portaudio pstoedit qhull qrupdate \
- qscintilla2 qt@${{ matrix.qt }} rapidjson readline suite-sparse sundials texinfo \
- ccache gnu-sed openjdk pkg-config \
- automake autoconf bison gettext icoutils librsvg mactex-no-gui
- eval "$(/usr/libexec/path_helper)"
- HOMEBREW_PREFIX=$(brew --prefix)
- echo "HOMEBREW_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
- echo "/Library/TeX/texbin" >> $GITHUB_PATH
- echo "${HOMEBREW_PREFIX}/opt/qt@${{ matrix.qt }}/bin" >> $GITHUB_PATH
- echo "${HOMEBREW_PREFIX}/opt/texinfo/bin" >> $GITHUB_PATH
- echo "${HOMEBREW_PREFIX}/opt/bison/bin" >> $GITHUB_PATH
- echo "${HOMEBREW_PREFIX}/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
-
- - name: prepare ccache
- # create key with human readable timestamp
- # used in action/cache/restore and action/cache/save steps
- id: ccache-prepare
- run: |
- echo "key=ccache:${{ matrix.os }}:${{ matrix.compiler }}:qt${{ matrix.qt }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
-
- - name: restore ccache
- # setup the github cache used to maintain the ccache from one job to the next
- uses: actions/cache/restore@v4
- id: restore-ccache
- with:
- path: /Users/runner/Library/Caches/ccache
- key: ${{ steps.ccache-prepare.outputs.key }}
- restore-keys: |
- ccache:${{ matrix.os }}:${{ matrix.compiler }}:qt${{ matrix.qt }}:${{ github.ref }}
- ccache:${{ matrix.os }}:${{ matrix.compiler }}:qt${{ matrix.qt }}:refs/heads/default
-
- - name: configure ccache
- # The cache doesn't seem to compress well on macOS. Is it already compressed?
- # Limit the maximum size to avoid exceeding the total cache limits.
- run: |
- test -d /Users/runner/Library/Preferences/ccache || mkdir /Users/runner/Library/Preferences/ccache
- echo "max_size = 0.9G" >> /Users/runner/Library/Preferences/ccache/ccache.conf
- ccache -s
- echo "${HOMEBREW_PREFIX}/opt/ccache/libexec" >> $GITHUB_PATH
-
- - name: bootstrap
- run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
-
- - name: configure
- timeout-minutes: 30
- env:
- MY_CPPFLAGS: ${{ matrix.cppflags }}
- MY_LDFLAGS: ${{ matrix.ldflags }}
- # This is a hodgepodge of configure flags put together from the
- # buildbot rules:
- # https://hg.octave.org/octave-buildbot/file/tip/master.cfg#l543
- # And the homebrew formula:
- # https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/octave.rb
- # Amended with additional flags that seem to be needed.
- # Not all of those might be needed or be correct.
- run: |
- echo $PATH
- echo which ccache
- which ccache
- which $CC
- echo $CC --version
- $CC --version
- which $CXX
- echo $CXX --version
- $CXX --version
- which gfortran
- echo gfortran --version
- gfortran --version
- mkdir .build
- cd .build && ../configure \
- CXX="${CXX} ${{ matrix.cxx-compiler-flags }}" \
- F77="ccache gfortran" \
- CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/gettext/include -I${HOMEBREW_PREFIX}/opt/icu4c/include -I${HOMEBREW_PREFIX}/opt/qt@${{ matrix.qt }}/include -I${HOMEBREW_PREFIX}/opt/readline/include -I${HOMEBREW_PREFIX}/opt/sqlite/include $MY_CPPFLAGS -I${HOMEBREW_PREFIX}/include" \
- CXXFLAGS="-O2 -g" \
- LDFLAGS="-L${HOMEBREW_PREFIX}/opt/bison/lib -L${HOMEBREW_PREFIX}/opt/gettext/lib -L${HOMEBREW_PREFIX}/opt/icu4c/lib -L${HOMEBREW_PREFIX}/opt/readline/lib -L${HOMEBREW_PREFIX}/opt/sqlite/lib $MY_LDFLAGS -L${HOMEBREW_PREFIX}/lib" \
- PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/openblas/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/icu4c/lib/pkgconfig:${HOMEBREW_PREFIX}/${{ matrix.qt-pkg-config-path }}" \
- --with-qt=${{ matrix.qt }} \
- QCOLLECTIONGENERATOR="qhelpgenerator" \
- --with-x=no \
- --with-blas="-L${HOMEBREW_PREFIX}/opt/openblas/lib -lopenblas" \
- --with-java-homedir="${HOMEBREW_PREFIX}/opt/openjdk" \
- --prefix="${HOME}/usr"
-
- - name: build
- run: make -C ./.build all -j3 V=1
-
- - name: ccache status
- run: ccache -s
-
- - name: save ccache
- # Save the cache after we are done (successfully) building
- uses: actions/cache/save@v4
- with:
- path: /Users/runner/Library/Caches/ccache
- key: ${{ steps.ccache-prepare.outputs.key }}
-
- - name: check
- # Continuing on error in this step means that jobs will be "green" even
- # if the test suite crashes. But if we don't continue, we'll loose the
- # ccache and other jobs will be cancelled, too.
- # It would be nice if we could mark the job as "yellow" (and continue)
- # in that case. The second best thing is to display a warning in the
- # job summary (see below).
- continue-on-error: true
- timeout-minutes: 60
- run: |
- echo 'makeinfo_program ("${HOMEBREW_PREFIX}/opt/texinfo/bin/makeinfo");' >> ./scripts/startup/site-rcfile
- make -C ./.build check-tree-evaluator | tee ./test-suite.log
-
- - name: display test suite log
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: check with bytecode interpreter
- timeout-minutes: 60
- run: |
- mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
- make -C ./.build check-bytecode-evaluator | tee ./test-suite-bci.log
-
- - name: display test suite log with bytecode interpreter
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: difference between logs with and without bytecode interpreter
- continue-on-error: true
- run: |
- echo "::group::diff test-suite.log"
- echo "diff -urN ./test-suite.log ./test-suite-bci.log"
- diff -urN ./test-suite.log ./test-suite-bci.log || true
- echo "::endgroup::"
- echo "::group::diff fntests.log"
- echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
- diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
- echo "::endgroup::"
-
- - name: test history file creation
- # see bug #62365
- # Pipe to an interactive session to trigger appending the command to
- # the history. This will trigger the creation of a history file.
- run: |
- echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
- [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
-
- - name: install
- run: |
- mkdir -p /Users/runner/usr
- make -C ./.build install
-
- - name: test stand-alone executable
- run: |
- unset CC
- unset CXX
- cd examples/code
- PATH="/Users/runner/usr/bin:$PATH" \
- mkoctfile --link-stand-alone embedded.cc -o embedded
- ./embedded
-
- - name: analyze test suite results
- # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
- run: |
- [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || exit 1
- [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || exit 1
- [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] || exit 1
- [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] || exit 1
- echo No unknown failing tests.
-
-
- mingw:
- runs-on: ${{ matrix.os }}
-
- name: mingw-w64 ${{ matrix.msystem }}
-
- defaults:
- run:
- # Use MSYS2 as default shell
- shell: msys2 {0}
-
- strategy:
- # Allow other runners in the matrix to continue if some fail
- fail-fast: false
-
- matrix:
- # For available GitHub-hosted runners, see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
- os: [windows-latest]
- msystem: [MINGW64]
- include:
- - msystem: MINGW64
- mingw-prefix: mingw64
- target-prefix: mingw-w64-x86_64
- cc: gcc
- cxx: g++
- f77: gfortran
- extra-config-flags: ""
- ccache-max: 0.9G
- allow-error: false
-
- env:
- CHERE_INVOKING: 1
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- F77: ${{ matrix.f77 }}
- # perl uses cmd shell by default
- PERL5SHELL: bash -l -c
-
- steps:
- - name: get CPU name
- # The runners for the 32-bit target sometimes get stuck in configure
- # when using the Fortran compiler.
- # Does that error depend on the processor of the selected runner?
- shell: pwsh
- run : |
- Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name
-
- - name: install MSYS2 build environment
- uses: msys2/setup-msys2@v2
- with:
- update: true
-
- # Use pre-installed version to save disc space on partition with source.
- # We need that space for building.
- release: false
-
- # The packages are listed in (alphabetically sorted) blocks:
- # The first block is for mandatory dependencies.
- # The second block is for optional dependencies needed when building from a release tarball.
- # The third block is for additional dependencies needed when building from a repository checkout.
- # The fourth block is for additional run-time dependencies (to run test suite) that aren't needed to build.
- install: >-
- base-devel
- ${{ matrix.target-prefix }}-autotools
- ${{ matrix.target-prefix }}-cc
- ${{ matrix.target-prefix }}-fc
- ${{ matrix.target-prefix }}-gperf
- ${{ matrix.target-prefix }}-openblas
- ${{ matrix.target-prefix }}-pcre2
-
- ${{ matrix.target-prefix }}-arpack
- ${{ matrix.target-prefix }}-curl
- ${{ matrix.target-prefix }}-fftw
- ${{ matrix.target-prefix }}-fltk
- ${{ matrix.target-prefix }}-gl2ps
- ${{ matrix.target-prefix }}-glpk
- ${{ matrix.target-prefix }}-ghostscript
- ${{ matrix.target-prefix }}-gnuplot
- ${{ matrix.target-prefix }}-graphicsmagick
- ${{ matrix.target-prefix }}-hdf5
- ${{ matrix.target-prefix }}-libsndfile
- ${{ matrix.target-prefix }}-portaudio
- ${{ matrix.target-prefix }}-qhull
- ${{ matrix.target-prefix }}-qrupdate
- ${{ matrix.target-prefix }}-qscintilla
- ${{ matrix.target-prefix }}-qt5-base
- ${{ matrix.target-prefix }}-qt5-imageformats
- ${{ matrix.target-prefix }}-qt5-svg
- ${{ matrix.target-prefix }}-qt5-tools
- ${{ matrix.target-prefix }}-rapidjson
- ${{ matrix.target-prefix }}-suitesparse
- ${{ matrix.target-prefix }}-sundials
-
- git
- ${{ matrix.target-prefix }}-ccache
- ${{ matrix.target-prefix }}-icoutils
- ${{ matrix.target-prefix }}-librsvg
- ${{ matrix.target-prefix }}-texinfo
-
- unzip
- zip
-
- msystem: ${{ matrix.msystem }}
-
- - name: checkout repository
- uses: actions/checkout@v4
-
- - name: prepare ccache
- # create key with human readable timestamp
- # used in action/cache/restore and action/cache/save steps
- id: ccache-prepare
- run: |
- echo "ccachedir=$(cygpath -m $(ccache -k cache_dir))" >> $GITHUB_OUTPUT
- echo "key=ccache:${{ matrix.os }}:${{ matrix.msystem }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
- echo "timestamp=$(date +"%Y-%m-%d_%H-%M-%S")" >> $GITHUB_OUTPUT
-
- - name: restore ccache
- # Setup the github cache used to maintain the ccache from one job to the next
- uses: actions/cache/restore@v4
- with:
- path: ${{ steps.ccache-prepare.outputs.ccachedir }}
- key: ${{ steps.ccache-prepare.outputs.key }}
- restore-keys: |
- ccache:${{ matrix.os }}:${{ matrix.msystem }}:${{ github.ref }}
- ccache:${{ matrix.os }}:${{ matrix.msystem }}:refs/heads/default
-
- - name: configure ccache
- # Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota.
- run: |
- which ccache
- test -d ${{ steps.ccache-prepare.outputs.ccachedir }} || mkdir -p ${{ steps.ccache-prepare.outputs.ccachedir }}
- echo "max_size = ${{ matrix.ccache-max }}" > ${{ steps.ccache-prepare.outputs.ccachedir }}/ccache.conf
- echo "compression = true" >> ${{ steps.ccache-prepare.outputs.ccachedir }}/ccache.conf
- ccache -p
- ccache -s
- # create ccache helper script for Fortran compiler
- echo -e '#!/bin/bash\nccache '$MINGW_PREFIX'/bin/'$F77' "$@"' > $MINGW_PREFIX/lib/ccache/bin/$F77
- # prepend path to ccache helper scripts to PATH
- echo 'export PATH="$MINGW_PREFIX/lib/ccache/bin:$PATH"' >> ~/.bash_profile
-
- - name: bootstrap
- run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
-
- - name: configure
- # configure sometimes hangs while compiling 32bit Fortran.
- # It should take much less than 30 minutes. Cancel the step if it takes longer.
- timeout-minutes: 30
- # FIXME: Fix building with Java support. Override JAVA_HOME for now.
- # FIXME: How do we get a working TeX environment in MSYS2? Disable building the documentation for now.
- run: |
- echo $PATH
- which $CC
- echo $CC --version
- $CC --version
- which ${CXX% *}
- echo ${CXX% *} --version
- ${CXX% *} --version
- which $F77
- echo $F77 --version
- $F77 --version
- mkdir .build
- cd .build && ../configure \
- JAVA_HOME="" \
- --disable-docs \
- ${{ matrix.extra-config-flags }}
-
- - name: build
- # Spawning processes seems to have a big overhead on this platform. Use a somewhat larger number of parallel processes to compensate for that.
- run: |
- make -C ./.build all -j8 V=1
-
- - name: ccache status
- continue-on-error: true
- run: ccache -s
-
- - name: save ccache
- # Save the cache after we are done (successfully) building
- uses: actions/cache/save@v4
- with:
- path: ${{ steps.ccache-prepare.outputs.ccachedir }}
- key: ${{ steps.ccache-prepare.outputs.key }}
-
- - name: check
- # Continuing on error in this step means that jobs will be "green" even
- # if the test suite crashes. But if we don't continue, we'll loose the
- # ccache and other jobs will be cancelled, too.
- # It would be nice if we could mark the job as "yellow" (and continue)
- # in that case. The second best thing is to display a warning in the
- # job summary (see below).
- continue-on-error: true
- timeout-minutes: 60
-
- # mkoctfile seems to have trouble when gcc is called via ccache. So,
- # remove the directory with the ccache wrappers from PATH.
-
- run: |
- export PATH=$(echo "$PATH" | sed -e "s|$MINGW_PREFIX/lib/ccache/bin:||g")
- make -C ./.build check-tree-evaluator RUN_OCTAVE_OPTIONS="--no-gui-libs" | tee ./test-suite.log
-
- - name: display test suite log
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: check with bytecode interpreter
- timeout-minutes: 60
- run: |
- mv ./.build/test/fntests.log ./.build/test/fntests-no-bci.log
- make -C ./.build check-bytecode-evaluator RUN_OCTAVE_OPTIONS="--no-gui-libs" | tee ./test-suite-bci.log
-
- - name: display test suite log with bytecode interpreter
- continue-on-error: true
- # Displaying the log shouldn't take long. Cancel the step if it does.
- timeout-minutes: 5
- run: cat ./.build/test/fntests.log
-
- - name: difference between logs with and without bytecode interpreter
- continue-on-error: true
- run: |
- echo "::group::diff test-suite.log"
- echo "diff -urN ./test-suite.log ./test-suite-bci.log"
- diff -urN ./test-suite.log ./test-suite-bci.log || true
- echo "::endgroup::"
- echo "::group::diff fntests.log"
- echo "diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log"
- diff -urN ./.build/test/fntests-no-bci.log ./.build/test/fntests.log || true
- echo "::endgroup::"
-
- - name: test history file creation
- # see bug #62365
- # Pipe to an interactive session to trigger appending the command to
- # the history. This will trigger the creation of a history file.
- run: |
- echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i
- [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed"
-
- - name: install
- run: |
- mkdir -p /c/octave/pkg
- make -C ./.build DESTDIR=/c/octave/pkg install
-
- - name: test stand-alone executable
- continue-on-error: ${{ matrix.allow-error }}
- run: |
- unset CC
- unset CXX
- export PATH=$(echo "$PATH" | sed -e "s|$MINGW_PREFIX/lib/ccache/bin:||g")
- export PATH="/c/octave/pkg/${{ matrix.mingw-prefix }}/bin:$PATH"
- cd examples/code
- mkoctfile --link-stand-alone embedded.cc -o embedded
- ./embedded.exe
-
- - name: analyze test suite results
- # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
- run: |
- [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || echo "::warning::At least one test failed"
- [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || echo "::warning::At least one regression in test suite"
- [ -n "$(grep -e "FAIL\s*0" ./test-suite-bci.log)" ] || echo "::warning::At least one test failed with bytecode interpreter"
- [ -z "$(grep -e "REGRESSION" ./test-suite-bci.log)" ] || echo "::warning::At least one regression in test suite with bytecode interpreter"
- echo Finished analyzing test suite results.
diff --git a/libmex/liboctmex-build-info.h b/libmex/liboctmex-build-info.h
new file mode 100644
index 0000000000..a22d2fd264
--- /dev/null
+++ b/libmex/liboctmex-build-info.h
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2024 The Octave Project Developers
+//
+// See the file COPYRIGHT.md in the top-level directory of this
+// distribution or .
+//
+// This file is part of Octave.
+//
+// Octave is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Octave is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Octave; see the file COPYING. If not, see
+// .
+//
+////////////////////////////////////////////////////////////////////////
+
+#if ! defined (octave_liboctmex_build_info_h)
+#define octave_liboctmex_build_info_h 1
+
+#include "octave-config.h"
+
+#include
+
+extern OCTMEX_API std::string liboctmex_hg_id ();
+
+#endif
diff --git a/libmex/liboctmex-build-info.in.cc b/libmex/liboctmex-build-info.in.cc
new file mode 100644
index 0000000000..b1becc03cd
--- /dev/null
+++ b/libmex/liboctmex-build-info.in.cc
@@ -0,0 +1,38 @@
+// %NO_EDIT_WARNING%
+
+////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2024 The Octave Project Developers
+//
+// See the file COPYRIGHT.md in the top-level directory of this
+// distribution or .
+//
+// This file is part of Octave.
+//
+// Octave is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Octave is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Octave; see the file COPYING. If not, see
+// .
+//
+////////////////////////////////////////////////////////////////////////
+
+#if defined (HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#include "liboctmex-build-info.h"
+
+std::string
+liboctmex_hg_id ()
+{
+ return "%OCTAVE_HG_ID%";
+}
diff --git a/libmex/module.mk b/libmex/module.mk
index 8154f7d7d9..656391ea56 100644
--- a/libmex/module.mk
+++ b/libmex/module.mk
@@ -1,7 +1,5 @@
DIRSTAMP_FILES += %reldir%/$(octave_dirstamp)
-%canon_reldir%_EXTRA_DIST =
-
%canon_reldir%_CLEANFILES =
%canon_reldir%_DISTCLEANFILES =
%canon_reldir%_MAINTAINERCLEANFILES =
@@ -24,16 +22,26 @@ octlib_LTLIBRARIES += %reldir%/liboctmex.la
%canon_reldir%_pkgconfig_DATA = %reldir%/octmex.pc
+LIBOCTMEX_BUILT_NODISTFILES = \
+ %reldir%/liboctmex-build-info.cc
+
+%canon_reldir%_EXTRA_DIST = \
+ %reldir%/liboctmex-build-info.in.cc
+
LIBMEX_INC = \
%reldir%/mex.h \
%reldir%/mexproto.h
octinclude_HEADERS += \
+ %reldir%/liboctmex-build-info.h \
$(LIBMEX_INC)
%canon_reldir%_liboctmex_la_SOURCES = \
%reldir%/mex.cc
+nodist_%canon_reldir%_liboctmex_la_SOURCES = \
+ %reldir%/liboctmex-build-info.cc
+
%canon_reldir%_liboctmex_la_LIBADD = \
libinterp/liboctinterp.la \
liboctave/liboctave.la
@@ -53,8 +61,14 @@ octinclude_HEADERS += \
-bindir $(bindir) \
$(WARN_LDFLAGS)
+%reldir%/liboctmex-build-info.cc: %reldir%/liboctmex-build-info.in.cc HG-ID | %reldir%/$(octave_dirstamp)
+ $(AM_V_GEN)$(build-info-commands)
+
EXTRA_DIST += $(%canon_reldir%_EXTRA_DIST)
+%canon_reldir%_CLEANFILES += \
+ $(LIBOCTMEX_BUILT_NODISTFILES)
+
%canon_reldir%_DISTCLEANFILES += \
$(%canon_reldir%_pkgconfig_DATA)
diff --git a/run-octave.in b/run-octave.in
index acd554d6d1..8cb9268386 100644
--- a/run-octave.in
+++ b/run-octave.in
@@ -134,15 +134,6 @@ if [ "$ADDRESS_SANITIZER_ENABLED" = yes ]; then
export ASAN_OPTIONS
fi
-case "%host_os%" in
- msdosmsvc | mingw* | cygwin*)
- PATH="$builddir/libmex/.libs:${PATH}"; export PATH ;;
- darwin*)
- DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$builddir/libmex/.libs"; export DYLD_LIBRARY_PATH ;;
- *)
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$builddir/libmex/.libs"; export LD_LIBRARY_PATH ;;
-esac
-
exec $builddir/libtool --mode=execute $driver \
"$octave_executable" --no-init-path --path="$LOADPATH" \
--image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \
diff --git a/src/main-cli.cc b/src/main-cli.cc
index fc21e8473d..ea1ca539d7 100644
--- a/src/main-cli.cc
+++ b/src/main-cli.cc
@@ -44,6 +44,8 @@
#include "liboctinterp-build-info.h"
+#include "liboctmex-build-info.h"
+
#include "oct-env.h"
#include "signal-wrappers.h"
@@ -64,6 +66,7 @@ check_hg_versions ()
std::string octave_id = octave_hg_id ();
std::string liboctave_id = liboctave_hg_id ();
std::string liboctinterp_id = liboctinterp_hg_id ();
+ std::string liboctmex_id = liboctmex_hg_id ();
if (octave_id != liboctave_id)
{
@@ -85,6 +88,16 @@ check_hg_versions ()
ok = false;
}
+ if (octave_id != liboctmex_id)
+ {
+ std::cerr << "octave hg id ("
+ << octave_id
+ << ") does not match liboctmex hg id ("
+ << liboctmex_id
+ << ')' << std::endl;
+ ok = false;
+ }
+
if (! ok)
exit (1);
}
diff --git a/src/main-gui.cc b/src/main-gui.cc
index 4c08d42186..b908629f74 100644
--- a/src/main-gui.cc
+++ b/src/main-gui.cc
@@ -46,6 +46,8 @@
#include "liboctgui-build-info.h"
+#include "liboctmex-build-info.h"
+
#include "oct-env.h"
#include "octave.h"
@@ -68,6 +70,7 @@ check_hg_versions ()
std::string liboctave_id = liboctave_hg_id ();
std::string liboctinterp_id = liboctinterp_hg_id ();
std::string liboctgui_id = liboctgui_hg_id ();
+ std::string liboctmex_id = liboctmex_hg_id ();
if (octave_id != liboctave_id)
{
@@ -99,6 +102,16 @@ check_hg_versions ()
ok = false;
}
+ if (octave_id != liboctmex_id)
+ {
+ std::cerr << "octave hg id ("
+ << octave_id
+ << ") does not match liboctmex hg id ("
+ << liboctmex_id
+ << ')' << std::endl;
+ ok = false;
+ }
+
if (! ok)
exit (1);
}
diff --git a/src/module.mk b/src/module.mk
index c916332fe5..20e500f1aa 100644
--- a/src/module.mk
+++ b/src/module.mk
@@ -15,6 +15,7 @@ SRC_DIR_CPPFLAGS = \
-Iliboctave/wrappers -I$(srcdir)/liboctave/wrappers \
-Ilibinterp -I$(srcdir)/libinterp \
-Ilibinterp/corefcn -I$(srcdir)/libinterp/corefcn \
+ -Ilibmex -I$(srcdir)/libmex \
-I$(srcdir)/src
EXTRA_DIST += \
@@ -56,6 +57,7 @@ if AMCOND_BUILD_QT_GUI
endif
OCTAVE_CORE_LIBS = \
+ libmex/liboctmex.la \
libinterp/liboctinterp.la \
liboctave/liboctave.la \
libgnu/libgnu.la