From 34e65fad1338ab05b6f9ddd145ef2bb3e45c267b Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Fri, 26 Apr 2024 11:18:27 -0500 Subject: [PATCH] Switch to setup-matlab for macOS testing --- .github/workflows/install-test.yml | 44 ++++++++++++++++-------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/install-test.yml b/.github/workflows/install-test.yml index 443b581..935bde8 100644 --- a/.github/workflows/install-test.yml +++ b/.github/workflows/install-test.yml @@ -68,26 +68,30 @@ jobs: environment-file: tests/environment.yml auto-activate-base: false miniconda-version: 'latest' - - name: Cache MATLAB runtime installer - id: cache-installer - uses: actions/cache@v1 +# - name: Cache MATLAB runtime installer +# id: cache-installer +# uses: actions/cache@v1 +# with: +# path: installer +# key: ${{ runner.os }}-matlab-R2020a-installer +# - name: Download MATLAB runtime installer +# if: steps.cache-installer.outputs.cache-hit != 'true' +# run: wget --quiet --directory-prefix=installer http://ssd.mathworks.com/supportfiles/downloads/R2020a/Release/2/deployment_files/installer/complete/maci64/MATLAB_Runtime_R2020a_Update_2_maci64.dmg.zip +# - name: Install MATLAB runtime +# run: | +# unzip -d . -q installer/MATLAB_Runtime_R2020a_Update_2_maci64.dmg.zip +# hdiutil mount MATLAB_Runtime_R2020a_Update_2_maci64.dmg +# cp -R /Volumes/MATLAB_Runtime_R2020a_Update_2_maci64 . +# hdiutil unmount /Volumes/MATLAB_Runtime_R2020a_Update_2_maci64 +# sudo ./MATLAB_Runtime_R2020a_Update_2_maci64/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX -mode silent -agreeToLicense yes +# MATLAB_RUNTIME_PATH=/Applications/MATLAB/MATLAB_Runtime/v98 +# echo "MATLAB_RUNTIME_PATH=$MATLAB_RUNTIME_PATH" >> $GITHUB_ENV +# echo "DYLD_LIBRARY_PATH=$MATLAB_RUNTIME_PATH/runtime/maci64:$MATLAB_RUNTIME_PATH/sys/os/maci64:$MATLAB_RUNTIME_PATH/bin/maci64" >> $GITHUB_ENV +# echo "$MATLAB_RUNTIME_PATH/bin/maci64" >> $GITHUB_PATH + - name: Set up MATLAB + uses: matlab-actions/setup-matlab@v2 with: - path: installer - key: ${{ runner.os }}-matlab-R2020a-installer - - name: Download MATLAB runtime installer - if: steps.cache-installer.outputs.cache-hit != 'true' - run: wget --quiet --directory-prefix=installer http://ssd.mathworks.com/supportfiles/downloads/R2020a/Release/2/deployment_files/installer/complete/maci64/MATLAB_Runtime_R2020a_Update_2_maci64.dmg.zip - - name: Install MATLAB runtime - run: | - unzip -d . -q installer/MATLAB_Runtime_R2020a_Update_2_maci64.dmg.zip - hdiutil mount MATLAB_Runtime_R2020a_Update_2_maci64.dmg - cp -R /Volumes/MATLAB_Runtime_R2020a_Update_2_maci64 . - hdiutil unmount /Volumes/MATLAB_Runtime_R2020a_Update_2_maci64 - sudo ./MATLAB_Runtime_R2020a_Update_2_maci64/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX -mode silent -agreeToLicense yes - MATLAB_RUNTIME_PATH=/Applications/MATLAB/MATLAB_Runtime/v98 - echo "MATLAB_RUNTIME_PATH=$MATLAB_RUNTIME_PATH" >> $GITHUB_ENV - echo "DYLD_LIBRARY_PATH=$MATLAB_RUNTIME_PATH/runtime/maci64:$MATLAB_RUNTIME_PATH/sys/os/maci64:$MATLAB_RUNTIME_PATH/bin/maci64" >> $GITHUB_ENV - echo "$MATLAB_RUNTIME_PATH/bin/maci64" >> $GITHUB_PATH + release: R2020a # must match the release used to compile the code - name: Download SINGE run: | wget --quiet https://github.com/gitter-lab/SINGE/releases/download/$SINGE_VERSION/SINGE_mac.tgz @@ -95,6 +99,6 @@ jobs: - name: Run and test SINGE shell: bash -l {0} run: | - bash SINGE.sh $MATLAB_RUNTIME_PATH standalone data1/X_SCODE_data.mat data1/gene_list.mat Output tests/example_hyperparameters.txt + bash SINGE.sh ${{ steps.setup-matlab.outputs.matlabroot }} standalone data1/X_SCODE_data.mat data1/gene_list.mat Output tests/example_hyperparameters.txt ls -l Output bash tests/compare_example_output.sh Output tests/reference/latest 1e-02 1e-02