Skip to content

Commit

Permalink
build octave mex with octave 8.3 on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 15, 2023
1 parent edbeae9 commit e50dc6b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
octave_test:
name: Octave tests
strategy:
# tested octave versions: ubuntu-20.04 = 5.2, ubuntu-22.04 = 6.4, macos-11 = 8.1, windows-2019 = 7.3
# tested octave versions: ubuntu-20.04 = 5.2, ubuntu-22.04 = 6.4, macos-11 = 8.1, windows-2019 = 8.3
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-11, windows-2019]
runs-on: ${{ matrix.os }}
Expand All @@ -24,10 +24,10 @@ jobs:
[[ "$RUNNER_OS" == "Linux" ]] && sudo apt-get update && sudo apt-get install -y liboctave-dev
[[ "$RUNNER_OS" == "macOS" ]] && brew install octave
if [[ "$RUNNER_OS" == "Windows" ]]; then
curl --retry 3 -kL http://cdimage.debian.org/mirror/gnu.org/gnu/octave/windows/octave-7.3.0-w64-64.7z --output octave_7.3.0.7z
7z x octave_7.3.0.7z -ooctave -y
curl --retry 3 -kL http://cdimage.debian.org/mirror/gnu.org/gnu/octave/windows/octave-8.3.0-w64-64.7z --output octave_8.3.0.7z
7z x octave_8.3.0.7z -ooctave -y
echo 'C:\msys64\mingw64\bin' >> $GITHUB_PATH
echo "$PWD/octave/octave-7.3.0-w64-64/mingw64/bin" >> $GITHUB_PATH
echo "$PWD/octave/octave-8.3.0-w64-64/mingw64/bin" >> $GITHUB_PATH
fi
- name: Install msys2 libraries (Windows only)
if: ${{ runner.os == 'Windows' }}
Expand Down Expand Up @@ -65,14 +65,14 @@ jobs:
if: ${{ runner.os == 'Windows' }}
shell: msys2 {0}
run: |
export PATH="/mingw64/bin":"$PWD/octave/octave-7.3.0-w64-64/mingw64/bin":$PATH
export PATH="/mingw64/bin":"$PWD/octave/octave-8.3.0-w64-64/mingw64/bin":$PATH
which gcc
gcc -v
make -C src oct CC=gcc CXX=g++ USERLINKOPT="-static-libgcc -static-libstdc++ -fstack-protector -L/mingw64/lib -Wl,-Bstatic -lz -lwinpthread -Wl,-Bdynamic -v -s '$PWD/octave/octave-7.3.0-w64-64/mingw64/lib/octave/7.3.0/liboctinterp.dll.a'"
make -C src oct CC=gcc CXX=g++ USERLINKOPT="-static-libgcc -static-libstdc++ -fstack-protector -L/mingw64/lib -Wl,-Bstatic -lz -lwinpthread -Wl,-Bdynamic -v -s '$PWD/octave/octave-8.3.0-w64-64/mingw64/lib/octave/8.3.0/liboctinterp.dll.a'"
cp /mingw64/bin/zlib1.dll .
objdump -p zipmat.mex | grep "DLL Name:"
strip zipmat.mex
echo "$PWD/octave/octave-7.3.0-w64-64/mingw64/bin" >> $GITHUB_PATH
echo "$PWD/octave/octave-8.3.0-w64-64/mingw64/bin" >> $GITHUB_PATH
- name: Build octave mex (Linux and Mac)
if: ${{ runner.os != 'Windows' }}
run: |
Expand All @@ -89,7 +89,7 @@ jobs:
run: |
octave-cli --version
if [ "$RUNNER_OS" == "Windows" ]; then
export PATH="$PWD/octave/octave-7.3.0-w64-64/mingw64/bin":$PATH
export PATH="$PWD/octave/octave-8.3.0-w64-64/mingw64/bin":$PATH
fi
if [ "$RUNNER_OS" == "Linux" ]; then
octave-cli --eval "addpath(pwd);cd test;run_zmat_test"
Expand Down

0 comments on commit e50dc6b

Please sign in to comment.