-
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 #73 from datajoint/external-storage
Add serialize/deserialize operations and bugfixes
- Loading branch information
Showing
22 changed files
with
1,434 additions
and
194 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -9,4 +9,4 @@ win.* | |
macos* | ||
*.prj | ||
matlab.prf | ||
*.mltbx | ||
*.mltbx |
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,105 @@ | ||
# docker-compose -f LNX-docker-compose.yml --env-file LNX.env up --build --exit-code-from app | ||
version: '2.4' | ||
x-net: &net | ||
networks: | ||
- main | ||
services: | ||
db: | ||
<<: *net | ||
image: datajoint/mysql:${MYSQL_TAG} | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=simple | ||
fakeservices.datajoint.io: | ||
<<: *net | ||
image: raphaelguzman/nginx:v0.0.10 | ||
environment: | ||
- ADD_db_TYPE=DATABASE | ||
- ADD_db_ENDPOINT=db:3306 | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
app: | ||
<<: *net | ||
environment: | ||
- MATLAB_LICENSE | ||
- MATLAB_USER | ||
- DJ_HOST=fakeservices.datajoint.io | ||
- DJ_USER=root | ||
- DJ_PASS=simple | ||
- DJ_TEST_HOST=fakeservices.datajoint.io | ||
- DJ_TEST_USER=datajoint | ||
- DJ_TEST_PASSWORD=datajoint | ||
image: raphaelguzman/matlab:${MATLAB_VERSION}-MIN | ||
depends_on: | ||
fakeservices.datajoint.io: | ||
condition: service_healthy | ||
user: ${MATLAB_UID}:${MATLAB_GID} | ||
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 | ||
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
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
Binary file not shown.
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
Binary file not shown.
Oops, something went wrong.