Skip to content

Commit

Permalink
Switch to setup-matlab for macOS testing
Browse files Browse the repository at this point in the history
  • Loading branch information
agitter committed Apr 26, 2024
1 parent b2a5a67 commit 34e65fa
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,33 +68,37 @@ 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
tar -xf SINGE_mac.tgz
- 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

0 comments on commit 34e65fa

Please sign in to comment.