debian_stretch_x86_64_deb:
   tags:
     - debian
     - stretch
     - x86_64
   script:
     - echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
     - cd l2ork_addons
     - ./tar_em_up.sh -B
     - cd ..
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive dpkg --force-all -i pd-l2ork*.deb > /dev/null
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio -send "init dollarzero \$0" scripts/regression_tests.pd
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio scripts/external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - pd*.deb

ubuntu_14.04_i386_deb:
   tags:
     - ubuntu
     - v14.04
     - i386
   script:
     - echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
     - cd l2ork_addons
     - ./tar_em_up.sh -B
     - cd ..
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive dpkg --force-all -i pd-l2ork*.deb > /dev/null
     - cd scripts
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio -send "init dollarzero \$0" regression_tests.pd
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - pd*.deb

ubuntu_14.04_x86_64_deb:
   tags:
     - ubuntu
     - v14.04
     - x86_64
   script:
     - echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
     - cd l2ork_addons
     - ./tar_em_up.sh -B
     - cd ..
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive dpkg --force-all -i pd-l2ork*.deb > /dev/null
     - cd scripts
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio -send "init dollarzero \$0" regression_tests.pd
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - pd*.deb

ubuntu_16.04_x86_64_deb:
   tags:
     - ubuntu
     - v16.04
     - x86_64
   script:
     - echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
     - cd l2ork_addons
     - ./tar_em_up.sh -B
     - cd ..
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive dpkg --force-all -i pd-l2ork*.deb > /dev/null
     - cd scripts
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio -send "init dollarzero \$0" regression_tests.pd
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - pd*.deb

osx_10.11_x86_64_dmg:
   tags:
     - osx
     - v10.11
     - dmg
   script:
     - echo `pwd`
     - cd l2ork_addons
     - ./tar_em_up.sh -X
     - cd ../scripts
     - ../packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork -noprefs -nostdpath -nogui -noaudio -send "init dollarzero \$0" regression_tests.pd
     - ../packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork -noprefs -nostdpath -nogui -noaudio external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - Pd*.dmg

osx_10.8_x86_64_dmg:
   tags:
     - osx
     - v10.8
     - dmg
   script:
     - echo `pwd`
     - cd l2ork_addons
     - osx_version=10.8 ./tar_em_up.sh -X
     - cd ../scripts
     - ../packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork -noprefs -nostdpath -nogui -noaudio -send "init dollarzero \$0" regression_tests.pd
     - ../packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork -noprefs -nostdpath -nogui -noaudio external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - Pd*.dmg

windows_i386_innosetup:
  tags:
    - windows
    - i386
  script:
    - echo `pwd`
    - cd l2ork_addons
    - ./tar_em_up.sh -Z
    - cd ../scripts
    - ../packages/win32_inno/build/bin/pd.exe -noprefs -nostdpath -nogui -noaudio -send "init dollarzero \$0" regression_tests.pd
    - ../packages/win32_inno/build/bin/pd.exe -noprefs -nostdpath -nogui -noaudio external-tests.pd
  artifacts:
    name: "$CI_RUNNER_DESCRIPTION"
    expire_in: 1 day
    paths:
      - Purr*.exe

raspbian_stretch_armv7l_deb:
   tags:
     - raspbian
     - arm 
     - stretch
   script:
     - echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
     - echo `pwd`
     - cd l2ork_addons
     - ./tar_em_up.sh -r
     - cd ..
     - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive dpkg --force-all -i pd-l2ork*.deb > /dev/null
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio -send "init dollarzero \$0" scripts/regression_tests.pd
     - valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio scripts/external-tests.pd
   artifacts:
     name: "$CI_RUNNER_DESCRIPTION"
     expire_in: 1 day
     paths:
       - pd*.deb
