diff --git a/.github/workflows/aa_test_aaq.yml b/.github/workflows/aa_test_aaq.yml new file mode 100644 index 000000000..035551401 --- /dev/null +++ b/.github/workflows/aa_test_aaq.yml @@ -0,0 +1,99 @@ +# This is a basic workflow to help you get started with Actions + +name: Testing aaq + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Default settings +defaults: + run: + shell: bash + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + aatest_ds000114_aaq: + name: Testing aaq (batch) on fMRI + + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 51200 + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' + + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf + + - name: Check out repository under $GITHUB_WORKSPACE + uses: actions/checkout@v2 + + - name: Set up Python 2.7 + uses: actions/setup-python@v2 + with: + # Semantic version range syntax or exact version of a Python version + python-version: '2.7' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + + - name: Set up MATLAB + uses: matlab-actions/setup-matlab@v1 + with: + # MATLAB release to set up R2020a + release: R2020a + + - name: Install tools under $HOME/tools (SPM) + run: | + source $GITHUB_WORKSPACE/.github/workflows/tools_install.sh + env: + LOAD_FSL: 0 + LOAD_FREESURFER: 0 + + - name: Retrive test data under $HOME/data/aa_demo + run: | + mkdir -p $HOME/data/aa_demo + aws s3 cp s3://openneuro.org/ds000114 $HOME/data/aa_demo/ds000114 --quiet --recursive --exclude "*" --include "task-*" --no-sign-request + aws s3 cp s3://openneuro.org/ds000114 $HOME/data/aa_demo/ds000114 --quiet --recursive --exclude "*" --include "dwi*" --no-sign-request + aws s3 cp s3://openneuro.org/ds000114/sub-01 $HOME/data/aa_demo/ds000114/sub-01 --quiet --recursive --no-sign-request + aws s3 cp s3://openneuro.org/ds000114/sub-02 $HOME/data/aa_demo/ds000114/sub-02 --quiet --recursive --no-sign-request + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_EC2_METADATA_DISABLED: true + + - name: Configure aa + run: | + echo "Free space:" + df -h + mkdir $HOME/.aa + cp $GITHUB_WORKSPACE/.github/workflows/aap_parameters_defaults_GitHub.xml $HOME/.aa/aap_parameters_user.xml + mkdir $HOME/projects + + - name: Run script + uses: matlab-actions/run-command@v1 + with: + command: addpath(getenv('GITHUB_WORKSPACE')); aa_ver5; SPM = spmClass(fullfile(getenv('HOME'),'tools','spm12')); SPM.load; aa_test('glob','aatest_ds000114_aaq','haltonerror',true) + + - name: Archive results + uses: actions/upload-artifact@v2 + with: + name: aatest_ds000114_aaq + path: | + ~/projects/ diff --git a/developer/testscripts/aatest_ds000114_aaq.m b/developer/testscripts/aatest_ds000114_aaq.m new file mode 100755 index 000000000..a210f5573 --- /dev/null +++ b/developer/testscripts/aatest_ds000114_aaq.m @@ -0,0 +1,47 @@ +function aatest_ds000114_aaq(parameterfile, deleteprevious, wheretoprocess) + +% developer PR test script +% +% description: test aaq (batch) +% dataset: ds000114 + +% ------------------------------------------------------------------------- +% init +% ------------------------------------------------------------------------- + +aap = aa_test_inittest(mfilename('fullpath'), parameterfile, deleteprevious, wheretoprocess); + +% ------------------------------------------------------------------------- +% analysis options - batch +% ------------------------------------------------------------------------- + +aap.options.wheretoprocess = 'matlab_pct'; % localsingle +aap.directory_conventions.poolprofile = 'local'; +aap.options.aaparallel.numberofworkers = 2; +aap.options.aaparallel.memory = 2; +aap.options.aaparallel.walltime = 1; +aap.options.aaworkermaximumretry = 0; % do not retry; it would remove files +aap.options.aaworkerGUI = 0; + +% ------------------------------------------------------------------------- +% BIDS +% ------------------------------------------------------------------------- + +% anatomy data is in session 3 +aap = aas_processBIDS(aap,[],{'finger_foot_lips','line_bisection'},{'sub-01','sub-02'}); + +% ------------------------------------------------------------------------- +% run +% ------------------------------------------------------------------------- + +aa_doprocessing(aap); + +% if directory_conventions.reportname is undefined, skip reporting + +if isfield(aap.directory_conventions,'reportname') && ~isempty(aap.directory_conventions.reportname) + aa_report(fullfile(aas_getstudypath(aap),aap.directory_conventions.analysisid)); +end + + +aa_close(aap); + diff --git a/developer/testscripts/aatest_ds000114_aaq.xml b/developer/testscripts/aatest_ds000114_aaq.xml new file mode 100755 index 000000000..5c09d56b4 --- /dev/null +++ b/developer/testscripts/aatest_ds000114_aaq.xml @@ -0,0 +1,23 @@ + + + + + + aamod_study_init + + +
+ + aamod_structuralfromnifti + aamod_diffusionfromnifti + aamod_epifromnifti + + aamod_reorienttomiddle_structural + aamod_reorienttomiddle_diffusion + aamod_reorienttomiddle_epi + aamod_tsdiffana + +
+ +
+