-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,198 changed files
with
617,889 additions
and
10 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath "com.android.tools.build:gradle:7.0.2" | ||
// classpath 'com.netflix.nebula:gradle-lint-plugin:latest.release' // not working gradle > 7 | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
} | ||
|
||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
maven { url 'https://maven.google.com' } | ||
maven { url 'https://jitpack.io' } | ||
|
||
} | ||
gradle.projectsEvaluated { | ||
tasks.withType(JavaCompile) { | ||
options.compilerArgs << "-Xlint:all,cast,deprecation,divzero,empty,fallthrough,finally,overrides,path,serial,unchecked" | ||
} | ||
} | ||
// plugin not working with gradle > 7 | ||
// apply plugin: 'nebula.lint' | ||
// gradleLint.rules = ['all-dependency'] | ||
// add as many rules here as you'd like | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} |
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 |
---|---|---|
@@ -1,36 +1,76 @@ | ||
plugins { | ||
id 'com.android.library' | ||
id 'com.android.application' | ||
} | ||
|
||
// | ||
// Uncomment the blocks "externalNativeBuild" and "externalNativeBuild.cmake" for building the app | ||
// with liblsl (LSL) from the source code using CMake. Make sure you have liblsl's source code | ||
// (https://github.com/sccn/liblsl/releases/latest -> Source code) on /app-root/liblsl or the path | ||
// you specified on the block "externalNativeBuild.cmake" -> path "./liblsl-path/CMakeLists.txt" | ||
// | ||
// In case of an external CMake installation (https://cmake.org/download/ -> Binary distributions), | ||
// specify cmake.dir=path on local.properties, e.g. cmake.dir=/home/user/Android/SDK/cmake/3.18.0 | ||
// Otherwise you can install CMake using Android Studio's menu via Tools -> SDK Manager -> SDK Tools | ||
// Also note that you will need CMake version >=3.12.0 to make the build. If your Gradle version is | ||
// >= 7 you will need CMake <= 3.18.0 to make it work. | ||
// | ||
// Comment these blocks for building the app using the compiled library (liblsl.so). Make sure you | ||
// copy the build library on /app-root/builder/src/main/jniLibs/ | ||
// By compiling liblsl from source, CMake generates it for all Android architectures. The outcome is | ||
// stored on /app-root/builder/build/intermediates/cmake/debug/obj/ | ||
// Just copy all the folders (arm64-v8a, armeabi-v7a, x86, and x86_64) on the "jniLibs" folder and | ||
// the build will succeed. | ||
// | ||
// IMPORTANT to use LSL on your code: | ||
// - Take the the last version of LSL.java: | ||
// https://github.com/labstreaminglayer/liblsl-Java/blob/master/src/edu/ucsd/sccn/LSL.java | ||
// And copy it inside your app module source code folder (don't forget your package import at the | ||
// top -> package your.package.app.name;). E.g.: /app-root/module/src/main/java/path-to-the-source/ | ||
// - Ensure you include the following permission on your AndroidManifest.xml: | ||
// <uses-permission android:name="android.permission.INTERNET" /> | ||
// | ||
|
||
android { | ||
buildToolsVersion '30.0.3' | ||
compileSdk 30 | ||
|
||
defaultConfig { | ||
minSdk 24 | ||
targetSdk 30 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
versionName '1.15.0' | ||
consumerProguardFiles "consumer-rules.pro" | ||
|
||
externalNativeBuild { | ||
cmake { | ||
arguments "-DANDROID_CPP_FEATURES=rtti exceptions", "-DLSL_NO_FANCY_LIBNAME=1", "-DANDROID_PLATFORM=24" | ||
targets "lsl" | ||
} | ||
} | ||
} | ||
|
||
externalNativeBuild.cmake { | ||
version "3.12.0+" | ||
path "./liblsl/CMakeLists.txt" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
debuggable true | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation 'com.android.support:appcompat-v7:28.0.0' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'com.android.support.test:runner:1.0.2' | ||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' | ||
implementation 'androidx.appcompat:appcompat:1.4.0-alpha03' | ||
implementation 'net.java.dev.jna:jna:5.9.0@aar' | ||
implementation 'com.google.android.material:material:1.4.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.1' | ||
} |
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 @@ | ||
version: 1.14.{build} | ||
pull_requests: | ||
do_not_increment_build_number: true | ||
shallow_clone: true | ||
environment: | ||
matrix: | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
LSLARCH: Win32 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
LSLARCH: x64 | ||
build_script: | ||
- cmd: cmake -DCMAKE_INSTALL_PREFIX=install DCMAKE_BUILD_TYPE=Release -Dlslgitrevision=%APPVEYOR_REPO_COMMIT% -Dlslgitbranch=%APPVEYOR_REPO_BRANCH% -S . -B build -T v140,host=x86 -A %LSLARCH% | ||
- sh: cmake -DCMAKE_INSTALL_PREFIX=install DCMAKE_BUILD_TYPE=Release -Dlslgitrevision=${APPVEYOR_REPO_COMMIT} -Dlslgitbranch=${APPVEYOR_REPO_BRANCH} -S . -B build | ||
- cmake -DLSL_UNITTESTS=ON -DLSL_BUILD_EXAMPLES=ON build | ||
- cmd: cmake --build build --config Release -j --target package | ||
- sh: /usr/bin/time -v cmake --build build -j 3 --target package | ||
- sh: cmake -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON build | ||
- cd build | ||
- sh: sudo dpkg -i *.deb | ||
- sh: cpack -G DEB | ||
- sh: ifconfig | ||
- cmd: testing\Release\lsl_test_internal.exe --wait-for-keypress never | ||
- cmd: set PATH=Release;%PATH% && testing\Release\lsl_test_exported.exe --wait-for-keypress never | ||
- sh: sudo route add -net 224.0.0.0 netmask 240.0.0.0 lo | ||
- sh: testing/lsl_test_internal --wait-for-keypress never | ||
- sh: testing/lsl_test_exported --wait-for-keypress never | ||
artifacts: | ||
- path: 'build/*.zip' | ||
- path: 'build/*.deb' | ||
deploy: | ||
provider: GitHub | ||
auth_token: | ||
secure: XzGnVTRjZI2AuQzR5A6qPgZViAAbBVq7/VhM7O8kyTmjIkvUjH1RrwWiFLuinsus | ||
force_update: true | ||
on: | ||
APPVEYOR_REPO_TAG: true | ||
|
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,7 @@ | ||
**/* | ||
!build/*.deb | ||
!build/*.tar.bz2 | ||
!build/*.dmg | ||
!build/*.7z | ||
!build/*.so | ||
!build/install/** |
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,14 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
ColumnLimit: 100 | ||
UseTab: Always | ||
TabWidth: 4 | ||
IndentWidth: 4 | ||
AccessModifierOffset: -4 | ||
AllowShortBlocksOnASingleLine: true | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: true | ||
AllowShortLoopsOnASingleLine: true | ||
AlignAfterOpenBracket: false | ||
MaxEmptyLinesToKeep: 2 | ||
... |
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,8 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = tab | ||
|
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,132 @@ | ||
name: C/C++ CI | ||
|
||
on: | ||
push: | ||
branches: ['*'] | ||
tags: | ||
paths_ignore: ['docs/**', '.travis.yml'] | ||
pull_request: | ||
release: | ||
types: ['created'] | ||
workflow_dispatch: | ||
inputs: | ||
cmakeextra: | ||
description: 'Extra CMake options' | ||
required: false | ||
default: '' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {name: "ubuntu-20.04", os: "ubuntu-20.04", cmake_extra: "-DLSL_BUNDLED_PUGIXML=OFF"} | ||
- {name: "ubuntu-18.04", os: "ubuntu-latest", docker: "ubuntu:18.04" } | ||
- {name: "windows-x64", os: "windows-latest", cmake_extra: "-T v140,host=x86"} | ||
- {name: "windows-32", os: "windows-latest", cmake_extra: "-T v140,host=x86 -A Win32"} | ||
- {name: "macOS-latest", os: "macOS-latest"} | ||
|
||
# runs all steps in the container configured in config.docker or as subprocesses when empty | ||
container: ${{ matrix.config.docker }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up build environment in container | ||
run: | | ||
apt update | ||
apt install -y --no-install-recommends g++ git python3-pip ninja-build file dpkg-dev lsb-release sudo curl | ||
python3 -m pip install cmake | ||
if: ${{ matrix.config.docker }} | ||
|
||
- name: Configure CMake | ||
run: | | ||
if [[ "${{ matrix.config.os }}" == "ubuntu-20.04" ]]; then | ||
sudo apt-get install libpugixml-dev | ||
fi | ||
cmake --version | ||
cmake -S . -B build \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=${PWD}/install \ | ||
-DLSL_UNITTESTS=ON \ | ||
-DLSL_BUILD_EXAMPLES=ON \ | ||
-DCPACK_PACKAGE_DIRECTORY=${PWD}/package \ | ||
-Dlslgitrevision=${{ github.sha }} \ | ||
-Dlslgitbranch=${{ github.ref }} \ | ||
${{ matrix.config.cmake_extra }} | ||
echo ${PWD} | ||
- name: make | ||
run: cmake --build build --target install --config Release -j | ||
|
||
- name: package | ||
run: | | ||
echo $GITHUB_REF | ||
cmake --build build --target package --config Release -j | ||
echo $PWD | ||
ls -la | ||
# On Debian / Ubuntu the dependencies can only be resolved for | ||
# already installed packages. Therefore, we have built all | ||
# packages without dependencies in the previous step, | ||
# install them and rebuild them with dependency discovery enabled | ||
if [[ "${{ matrix.config.os }}" == ubuntu-* ]]; then | ||
cmake -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON . | ||
sudo dpkg -i package/*.deb | ||
cmake --build build --target package --config Release -j | ||
dpkg -I package/liblsl*.deb | ||
fi | ||
cmake -E remove_directory package/_CPack_Packages | ||
- name: upload install dir | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: build-${{ matrix.config.name }} | ||
path: install | ||
|
||
- name: upload package | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: pkg-${{ matrix.config.name }} | ||
path: package | ||
- name: print network config | ||
run: | | ||
which ifconfig && ifconfig | ||
if [ `which ip` ]; then | ||
ip link | ||
ip addr | ||
ip route | ||
ip -6 route | ||
fi | ||
# run internal tests, ignore test failures on docker (missing IPv6 connectivity) | ||
- name: unit tests (internal functions) | ||
run: 'install/bin/lsl_test_internal --order rand --wait-for-keypress never --durations yes || test ! -z "${{ matrix.config.docker }}"' | ||
timeout-minutes: 5 | ||
|
||
- name: unit tests (exported functions) | ||
run: install/bin/lsl_test_exported --order rand --wait-for-keypress never --durations yes | ||
timeout-minutes: 5 | ||
if: ${{ success() || failure() }} | ||
- name: upload to release page | ||
if: github.event_name == 'release' | ||
env: | ||
TOKEN: "token ${{ secrets.GITHUB_TOKEN }}" | ||
TAG: ${{ github.event.release.tag_name }} | ||
UPLOAD_URL: ${{ github.event.release.upload_url }} | ||
run: | | ||
# Do try this at home! The REST API is documented at | ||
# https://docs.github.com/en/free-pro-team@latest/rest and you can get a personal | ||
# access token at https://github.com/settings/tokens | ||
# (set TOKEN to "bearer abcdef1234") | ||
# you can get the UPLOAD_URL with a short bash snippet; make sure to set the env var TAG: | ||
# UPLOAD_URL=$(curl -H 'Accept: application/vnd.github.v3+json' $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/tags/$TAG | jq -r .upload_url) | ||
UPLOAD_URL=${UPLOAD_URL%\{*} # remove "{name,label}" suffix | ||
for pkg in package/*.*; do | ||
NAME=$(basename $pkg) | ||
MIME=$(file --mime-type $pkg|cut -d ' ' -f2) | ||
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: $TOKEN" -H "Content-Type: $MIME" --data-binary @$pkg $UPLOAD_URL?name=$NAME | ||
done |
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,12 @@ | ||
/build*/ | ||
/CMakeLists.txt.user | ||
/CMakeLists.json | ||
/CMakeSettings.json | ||
/docs/liblsl_* | ||
/docs/_build | ||
/.vs/ | ||
.DS_Store | ||
/out/ | ||
# CLion | ||
.idea/ | ||
/cmake-build-*/ |
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,9 @@ | ||
version: 2 | ||
sphinx: | ||
configuration: docs/conf.py | ||
# formats: all | ||
python: | ||
version: 3 | ||
install: | ||
- requirements: docs/requirements.txt | ||
system_packages: true |
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,31 @@ | ||
language: cpp | ||
env: | ||
CMakeArgs="" | ||
# https://docs.travis-ci.com/user/reference/osx/#macos-version | ||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode10.1 | ||
env: OSXVER=MacOS10.13 | ||
before_script: | ||
- brew update | ||
- brew upgrade cmake | ||
script: | ||
- cmake --version | ||
- cmake -S . -B build ${CMakeArgs} -DLSL_UNITTESTS=ON -DLSL_EXAMPLES=ON | ||
- cd build | ||
- cmake --build . --config Release -j --target install | ||
- testing/lsl_test_internal || true | ||
- testing/lsl_test_exported | ||
- cpack | ||
- cd .. | ||
deploy: | ||
provider: releases | ||
skip_cleanup: true | ||
api_key: | ||
secure: MAin7yY6lRQNC7gLeE/aDGA90a2TZPjAwQGofyuGvih5T0p3OdKxFn64/lFzEWqb3x74MEu6I4AMteL/wjkminlHGn8fd1bSLtp+2TvnKFnaCuxuhlCNX4BmP741MHEmNMTo8qA+StuxDxwfHh8KVjuFxOkiLV9FolSpxZ3jhl8mBi3IMDodilyfsCniAw/WzekfATkJwmhQ9co642rkTwBKZ7goxdXJmewjEjBsiFn2SUT2+MCcy7NltjYvPdSrUH1LyhVKcSJch7lXqFnlGI21mJxlYdOhd9rA6wOYRZ1hzBRpqAWzE8kbDapMMOfLWrLQP+t5U3WZrt5e7Na/iuopYgzofgfzGr4xK0NwHUuHpc8C1Fair3nOke8IGNDraVHcZazEsBwxv5ekCUTOUFr5lka+ukcznP7PDw2ksIbpOR7bb9G2ubkQT4bDzIfMMOJSPzUbeTN+ds6xiVXukndMsXVW1rkZXk7O4uA60hGWBpX8okddask81Fk6jIBXdJomiRySDfd1DvP16vDGOfei2GZFX8iSvvATQIEE8CCL750vgUuEPPeRvyug2m6+CerAjvH73fmtGiKDmeaQNz+eBnbBpMphKCUvKRpSjSsBPNsQH/epPo34JnUczfzVbZGNNv87OeHDz7POe5YY6+PSwJbfIusPTMY6VdI/g9U= | ||
file: build/*.tar.* | ||
file_glob: true | ||
on: | ||
repo: sccn/liblsl | ||
tags: true |
Oops, something went wrong.