-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from datajoint/stage-external-storage
Add Toolbox packaging
- Loading branch information
Showing
26 changed files
with
427 additions
and
256 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Integration Tests | ||
on: | ||
push: | ||
branches: | ||
- '**' # every branch | ||
- '!stage*' # exclude branches beginning with stage | ||
pull_request: | ||
branches: | ||
- '**' # every branch | ||
- '!stage*' # exclude branches beginning with stage | ||
jobs: | ||
CI: | ||
if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
matlab_version: ["R2019a"] | ||
mysql_version: ["8.0.18", "5.7", "5.6"] | ||
include: | ||
- matlab_version: "R2018b" | ||
mysql_version: "5.7" | ||
- matlab_version: "R2016b" | ||
mysql_version: "5.7" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run primary tests | ||
env: | ||
MATLAB_UID: "1001" | ||
MATLAB_GID: "116" | ||
MATLAB_USER: ${{ secrets.matlab_user }} | ||
MATLAB_HOSTID: ${{ secrets.matlab_hostid }} | ||
MATLAB_VERSION: ${{ matrix.matlab_version }} | ||
MYSQL_TAG: ${{ matrix.mysql_version }} | ||
MATLAB_LICENSE: ${{ secrets[format('matlab_license_{0}', matrix.matlab_version)] }} | ||
DOCKER_CLIENT_TIMEOUT: "120" | ||
COMPOSE_HTTP_TIMEOUT: "120" | ||
run: | | ||
docker-compose -f LNX-docker-compose.yml up --build --exit-code-from app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,7 @@ notebook | |
.vscode | ||
win.* | ||
.DS_Store | ||
macos.* | ||
macos* | ||
*.prj | ||
matlab.prf | ||
*.mltbx |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ services: | |
- MYSQL_ROOT_PASSWORD=simple | ||
fakeservices.datajoint.io: | ||
<<: *net | ||
image: raphaelguzman/nginx:v0.0.8 | ||
image: raphaelguzman/nginx:v0.0.10 | ||
environment: | ||
- ADD_db_TYPE=DATABASE | ||
- ADD_db_ENDPOINT=db:3306 | ||
|
@@ -21,7 +21,6 @@ services: | |
app: | ||
<<: *net | ||
environment: | ||
- DISPLAY | ||
- MATLAB_LICENSE | ||
- MATLAB_USER | ||
- DJ_HOST=fakeservices.datajoint.io | ||
|
@@ -35,19 +34,72 @@ services: | |
fakeservices.datajoint.io: | ||
condition: service_healthy | ||
user: ${MATLAB_UID}:${MATLAB_GID} | ||
working_dir: /src | ||
command: > | ||
/bin/bash -c " | ||
matlab -nodisplay -r \"\ | ||
feature('DefaultCharacterSet','UTF-8');\ | ||
res=run(tests.Main);\ | ||
working_dir: /main | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
set -e | ||
export ORIG_DIR=$$(pwd) | ||
mkdir ~/Documents | ||
cd /src | ||
# Verify all mex have been updated | ||
if [ "distribution/mexa64/mym.mexa64" -nt "distribution/mexmaci64/mym.mexmaci64" ]; then | ||
echo "MACOS64 Mex binary appears outdated. Failing check..." | ||
exit 1 | ||
fi | ||
if [ "distribution/mexa64/mym.mexa64" -nt "distribution/mexw64/mym.mexw64" ]; then | ||
echo "WIN64 Mex binary appears outdated. Failing check..." | ||
exit 1 | ||
fi | ||
# Compile mym, package into toolbox, and install | ||
matlab -nodisplay -r " | ||
try\ | ||
websave([tempdir 'GHToolbox.mltbx'],\ | ||
['https://github.com/datajoint/GHToolbox' \ | ||
'/releases/download/' subsref(webread(['https://api.github.com/repos' \ | ||
'/datajoint/GHToolbox' \ | ||
'/releases/latest']),\ | ||
substruct('.', 'tag_name')) \ | ||
'/GHToolbox.mltbx']);\ | ||
matlab.addons.toolbox.installToolbox([tempdir 'GHToolbox.mltbx']);\ | ||
origDir = pwd;\ | ||
cd('distribution/mexa64');\ | ||
docs = help('mym');\ | ||
cd(origDir);\ | ||
ghtb.package('mym',\ | ||
'Raphael Guzman',\ | ||
'[email protected]',\ | ||
['MySQL API for MATLAB with support for BLOB objects'],\ | ||
docs,\ | ||
{'.vscode', '.git', '.gitignore', 'build', 'lib', 'maria-plugin',\ | ||
'mex_compilation', 'mysql-connector', 'notebook', 'src', 'zlib',\ | ||
'*.txt', '*.env', '*.prf', '*.md', '*.yml', 'tests', '.github',\ | ||
'distribution/mexa64/libmysqlclient.so.18.4.'},\ | ||
@() strjoin(arrayfun(@(x) num2str(x),\ | ||
cell2mat(struct2cell(mym('version'))),\ | ||
'uni', false),\ | ||
'.'),\ | ||
{'distribution/mexa64', 'distribution/mexmaci64',\ | ||
'distribution/mexw64', 'mym.m'},\ | ||
'toolboxVersionDir', 'distribution/mexa64',\ | ||
'toolboxRootDir', '.');\ | ||
matlab.addons.toolbox.installToolbox('mym.mltbx');\ | ||
cd(getenv('ORIG_DIR'));\ | ||
addpath('tests');\ | ||
res=run(Main);\ | ||
disp(res);\ | ||
if all([res.Passed]) exit, else exit(1), end;\ | ||
\"; | ||
" | ||
,\ | ||
catch ME,\ | ||
disp(getReport(ME, 'extended'));\ | ||
exit(1);\ | ||
,\ | ||
end;\ | ||
" | ||
mac_address: $MATLAB_HOSTID | ||
volumes: | ||
- ./tests:/main/tests | ||
- .:/src | ||
- /tmp/.X11-unix:/tmp/.X11-unix:rw | ||
networks: | ||
main: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.