Skip to content

Update README.txt

Update README.txt #401

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
# Trigger the workflow by cron. The default time zone of GitHub Actions is UTC.
schedule:
- cron: '0 17 * * 5'
# Trigger the workflow when it is manually triggered
workflow_dispatch:
jobs:
build:
name: Install and test MatCUTEst
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
matlab: [latest]
list: [full, customized, test]
#list: [new]
steps:
- name: Run `sudo apt update`
run: sudo apt update # Otherwise, free-disk-space or other actions relying on `apt` may fail
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
# all of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false # Important, or the runner may be shut down due to memory starvation.
- name: Check out repository
uses: actions/checkout@v4.1.2
with:
submodules: recursive
- name: Miscellaneous setup
run: bash .github/scripts/misc_setup
- name: Clone PRIMA
uses: actions/checkout@v4.1.2
with:
repository: libprima/prima
path: prima
submodules: recursive
- name: Install 7z
run: sudo apt install p7zip-full
- name: Link gfortran for MATLAB on Linux
if: startsWith(matrix.os, 'ubuntu')
run: bash .github/scripts/link_gfortran ${{ env.GFORTRAN_VERSION }}
- name: Install epstopdf and ghostscript
if: startsWith(matrix.os, 'ubuntu')
run: bash .github/scripts/install_epstopdf && bash .github/scripts/install_ghostscript
- name: Check MATLAB
id: check_matlab
run: if type 'matlab' &> /dev/null ; then echo "::set-output name=has_matlab::true" ; fi
- name: Set up MATLAB
if: ${{ steps.check_matlab.outputs.has_matlab != 'true' }}
uses: matlab-actions/setup-matlab@v2.1.2
with:
release: ${{ matrix.matlab }}
cache: true
products: Parallel_Computing_Toolbox
- name: Install MatCUTEst
run: |
sed 's|matlab -batch.*$|printf "Skip the mexification for GitHub Actions.\\n"|g' -i ./INSTALL
sed 's|rm -rf.*|printf "Skip removing files for GitHub Actions.\\n"|g' -i ./INSTALL
bash ./INSTALL < install_matcutest_input.pc64.lnx
- name: Mexify MatCUTEst
uses: matlab-actions/run-command@v2.1.1
with:
command: |
ver;
root_dir = cd()
cd(fullfile(root_dir, 'mtools'));
setup path; % Make *_list() available.
if strcmpi('${{ matrix.list }}', 'full')
setup;
else
options = struct();
options.list = ${{ matrix.list }}_list();
setup(options);
end
cd(getenv('HOME'));
help matcutest
which macup
copyfile(fullfile(root_dir, 'cutest', 'probinfo', 'problist'), fullfile(root_dir, '${{ matrix.list }}.problist'));
- name: Generate MatCUTEst_compiled
run: |
sed 's|rm -rf.*|printf "Skip removing files for GitHub Actions.\\n"|g' -i ./make_compiled_version
sed 's|.*git\s*clone.*|printf "Skip gitting for GitHub Actions.\\n"|g' -i ./make_compiled_version
sed 's|.*git\s*add.*|printf "Skip gitting for GitHub Actions.\\n"|g' -i ./make_compiled_version
bash ./make_compiled_version
for FILE in $(ls matcutest.7z*) ; do
cp "$FILE" ${{ matrix.list }}."$FILE"
done
ls ${{ matrix.list }}.*
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.list }}
path: |
${{ matrix.list }}.*
- name: Test MatCUTEst
uses: matlab-actions/run-command@v2.1.1
with:
command: |
ver;
root_dir = cd()
cd(fullfile(root_dir, 'mtools')); setup path;
cd(getenv('HOME'));
help matcutest
which macup
req = []; req.blacklist = github_black_list(); req.maxdim=20000; req.maxcon=40000;
badlist = chcup(secup(req), 1)
if ~isempty(badlist)
error('Some problems did not pass the checking.');
end
%cd(fullfile(root_dir, 'prima', 'matlab', 'tests'));
%opt.blacklist = {};
%profile('uobyqa', 'small', 'seq', opt);
%profile('newuoa', 'small', 'seq', opt);
%profile('bobyqa', 'small', 'seq', 'b', opt);
%profile('lincoa', 'small', 'seq', 'l', opt);
%profile('cobyla', 'small', 'seq', 'n', opt);
- name: Uninstall MatCUTEst
run: rm -rf cutest mtools
- name: Install MatCUTEst_compiled
run: |
DIR=$HOME/local && mkdir -p $DIR
mv matcutest.7z* $DIR
cd $DIR || exit 1
if [[ -f matcutest.7z.001 ]] ; then
7z x matcutest.7z.001
else
7z x matcutest.7z
fi
- name: Test MatCUTEst_compiled
uses: matlab-actions/run-command@v2.1.1
with:
command: |
ver;
root_dir = cd()
home_dir = getenv('HOME');
cd(fullfile(home_dir, 'local', 'matcutest', 'mtools')); setup;
cd(home_dir)
help matcutest
which macup
req = []; req.blacklist = github_black_list(); req.maxdim=20000; req.maxcon=40000;
badlist = chcup(secup(req), 1)
if ~isempty(badlist)
error('Some problems did not pass the checking.');
end
cd(fullfile(root_dir, 'prima', 'matlab', 'tests'));
opt.blacklist = {};
profile('uobyqa', 'small', 'seq', opt);
profile('newuoa', 'small', 'seq', opt);
profile('bobyqa', 'small', 'seq', 'b', opt);
profile('lincoa', 'small', 'seq', 'l', opt);
profile('cobyla', 'small', 'seq', 'n', opt);