From 299b920f8b183a1c70106da9944ed8af1da446aa Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Wed, 13 Nov 2024 22:46:03 -0500 Subject: [PATCH] [ci] add install octave using dmg --- .github/workflows/build_all.yml | 12 ++++++++++-- src/Makefile | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 3c81e79..de79b68 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -31,14 +31,22 @@ jobs: if: ${{ matrix.os == 'ubuntu-24.04' }} run: sudo apt-get update && sudo apt-get install -y ocl-icd-libopencl1 opencl-headers ocl-icd-opencl-dev octave-dev upx-ucl - name: Install dependencies (MacOS only) - if: ${{ runner.os == 'macOS' }} + if: ${{ runner.os == 'macOS' && matrix.os == 'macos-12' }} + run: | + curl -L -o Octave-9.2-Intel.dmg --insecure https://github.com/octave-app/octave-app/releases/download/v9.2/Octave-9.2-Intel.dmg + xattr -c Octave-*.dmg + sudo hdiutil attach Octave-9.2-Intel.dmg + sudo cp -a /Volumes/Octave\ 9.2/Octave-9.2.app /Applications + echo "/Applications/Octave-9.2.app/Contents/Resources/usr/Cellar/octave-octapp@9.2.0/9.2.0/bin" >> $GITHUB_PATH + - name: Install dependencies (MacOS only) + if: ${{ runner.os == 'macOS' && matrix.os != 'macos-12' }} run: | brew install octave #brew install upx - name: Install dependencies (Windows only) if: ${{ runner.os == 'Windows' }} run: | - choco install octave.portable --version=8.3.0 + choco install octave.portable --version=9.2.0 choco install upx choco install mingw --version=8.1.0 echo 'C:\ProgramData\chocolatey\lib\octave.portable\tools\octave\mingw64\bin' >> $GITHUB_PATH diff --git a/src/Makefile b/src/Makefile index 402d7fe..f927abf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -160,7 +160,7 @@ OCT_LDFLAGS := $(shell mkoctfile -p LDFLAGS) oct: BINARY=mcxcl.mex oct: AR=XTRA_CFLAGS=' ' XTRA_CXXFLAGS=' ' CXXFLAGS='-std=c++11 $(CPPOPT) $(MEXCCOPT) $(USERCCOPT)' LDFLAGS='$(OCT_LDFLAGS) -g -L$(LIBOPENCLDIR) $(LIBOPENCL)' mkoctfile -v -oct: LINKOPT=--mex -DMATLAB_MEX_FILE mcxlabcl.cpp $(INCLUDEDIRS) +oct: LINKOPT=--mex -DMATLAB_MEX_FILE mcxlabcl.cpp $(INCLUDEDIRS) $(MEXLINKOPT) OBJS := $(addsuffix $(OBJSUFFIX), $(FILES)) CLSOURCE := $(addsuffix $(CLHEADER), $(CLPROGRAM))