Skip to content

Commit

Permalink
GitHub-CI: Install Octave packages and run their test suites.
Browse files Browse the repository at this point in the history
* .github/workflows/make-alpine.yaml, .github/workflows/make-cygwin.yaml,
.github/workflows/make-macos.yaml, .github/workflows/make-mingw.yaml,
.github/workflows/make-ubuntu.yaml: Install Octave packages and run their test
suites. The selected Octave packages are "control" (which builds .oct files and
uses a Fortran compiler) and "stk" (which builds .mex files). No additional
dependencies are required for these two packages. Further packages can be added
in the future if the need arises.
  • Loading branch information
mmuetzel committed Nov 11, 2024
1 parent 7f6faee commit c908499
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/make-alpine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,27 @@ jobs:
mkoctfile --link-stand-alone embedded.cc -o embedded
LD_LIBRARY_PATH="/usr/local/lib/octave/$(octave --eval "disp(version())")" ./embedded
- name: test Octave packages
env:
# colon separated list of packages
PACKAGE_NAMES: "control:stk"
run: |
unset CC
unset CXX
IFS=:
for package in "${PACKAGE_NAMES}"; do
printf " \033[0;32m==>\033[0m Octave package \033[0;32m${package}\033[0m\n"
echo "::group::Install ${package}"
octave --eval "pkg install -verbose -forge ${package}"
echo "::endgroup::"
echo "::group::Test ${package}"
octave --eval "pkg test ${package}"
echo "::endgroup::"
echo "::group::Test log for ${package}"
cat ${GITHUB_WORKSPACE}/fntests.log
echo "::endgroup::"
done
- name: analyze test suite results
# Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
run: |
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/make-cygwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,28 @@ jobs:
mkoctfile --link-stand-alone embedded.cc -o embedded
./embedded.exe
- name: test Octave packages
env:
# colon separated list of packages
PACKAGE_NAMES: "control:stk"
run: |
unset CC
unset CXX
export PATH=$(echo "$PATH" | sed -e "s|/usr/lib/ccache/bin:||g")
IFS=':' read -r -a packages <<< "${PACKAGE_NAMES}"
for package in "${packages[@]}"; do
printf " \033[0;32m==>\033[0m Octave package \033[0;32m${package}\033[0m\n"
echo "::group::Install ${package}"
octave --eval "pkg install -verbose -forge ${package}"
echo "::endgroup::"
echo "::group::Test ${package}"
octave --eval "pkg test ${package}"
echo "::endgroup::"
echo "::group::Test log for ${package}"
cat ${GITHUB_WORKSPACE}/fntests.log
echo "::endgroup::"
done
- name: analyze test suite results
# Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
run: |
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/make-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,29 @@ jobs:
mkoctfile --link-stand-alone embedded.cc -o embedded
./embedded
- name: test Octave packages
env:
# colon separated list of packages
PACKAGE_NAMES: "control:stk"
run: |
unset CC
unset CXX
export F77=gfortran
export PATH="/Users/runner/usr/bin:$PATH"
IFS=':' read -r -a packages <<< "${PACKAGE_NAMES}"
for package in "${packages[@]}"; do
printf " \033[0;32m==>\033[0m Octave package \033[0;32m${package}\033[0m\n"
echo "::group::Install ${package}"
octave --eval "pkg install -verbose -forge ${package}"
echo "::endgroup::"
echo "::group::Test ${package}"
octave --eval "pkg test ${package}"
echo "::endgroup::"
echo "::group::Test log for ${package}"
cat ${GITHUB_WORKSPACE}/fntests.log
echo "::endgroup::"
done
- name: analyze test suite results
# Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
run: |
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/make-mingw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,30 @@ jobs:
mkoctfile --link-stand-alone embedded.cc -o embedded
./embedded.exe
- name: test Octave packages
continue-on-error: ${{ matrix.allow-error }}
env:
# colon separated list of packages
PACKAGE_NAMES: "control:stk"
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"
IFS=':' read -r -a packages <<< "${PACKAGE_NAMES}"
for package in "${packages[@]}"; do
printf " \033[0;32m==>\033[0m Octave package \033[0;32m${package}\033[0m\n"
echo "::group::Install ${package}"
octave --eval "pkg install -verbose -forge ${package}"
echo "::endgroup::"
echo "::group::Test ${package}"
octave --eval "pkg test ${package}"
echo "::endgroup::"
echo "::group::Test log for ${package}"
cat ${GITHUB_WORKSPACE}/fntests.log
echo "::endgroup::"
done
- name: analyze test suite results
# Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
run: |
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/make-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ jobs:
LD_LIBRARY_PATH="/usr/local/lib/octave/$(octave --eval "disp(version())")" \
./embedded
- name: test Octave packages
env:
# colon separated list of packages
PACKAGE_NAMES: "control:stk"
run: |
unset CC
unset CXX
IFS=':' read -r -a packages <<< "${PACKAGE_NAMES}"
for package in "${packages[@]}"; do
printf " \033[0;32m==>\033[0m Octave package \033[0;32m${package}\033[0m\n"
echo "::group::Install ${package}"
octave --eval "pkg install -verbose -forge ${package}"
echo "::endgroup::"
echo "::group::Test ${package}"
octave --eval "pkg test ${package}"
echo "::endgroup::"
echo "::group::Test log for ${package}"
cat ${GITHUB_WORKSPACE}/fntests.log
echo "::endgroup::"
done
- name: analyze test suite results
# Make sure the test summary lists 0 "FAIL"s and no "REGRESSION"
run: |
Expand Down

0 comments on commit c908499

Please sign in to comment.