Skip to content

Commit

Permalink
comment out uploading
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
  • Loading branch information
Andrey1994 committed Nov 19, 2019
1 parent 0b2341c commit ed5ee56
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 88 deletions.
28 changes: 14 additions & 14 deletions .travis.yml
Expand Up @@ -103,21 +103,21 @@ script:
sudo -H python3 $TRAVIS_BUILD_DIR/emulator/brainflow_emulator/wifi_shield_emulator.py python3 $TRAVIS_BUILD_DIR/tests/python/brainflow_get_data.py --log --board-id 6 --ip-address 127.0.0.1 --ip-protocol 2 --ip-port 17984 ;
fi

after_success:
- sudo -H pip3 install awscli
# push libraries from docker!
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
aws s3 cp $TRAVIS_BUILD_DIR/installed_docker/lib/ s3://brainflow/$TRAVIS_COMMIT/$TRAVIS_OS_NAME --recursive ;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
aws s3 cp $TRAVIS_BUILD_DIR/installed/lib/ s3://brainflow/$TRAVIS_COMMIT/$TRAVIS_OS_NAME --recursive ;
fi
# notify that everything is ok
- echo success > ${TRAVIS_OS_NAME}_success && aws s3 cp ${TRAVIS_OS_NAME}_success s3://brainflow/$TRAVIS_COMMIT/
# after_success:
# - sudo -H pip3 install awscli
# # push libraries from docker!
# - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# aws s3 cp $TRAVIS_BUILD_DIR/installed_docker/lib/ s3://brainflow/$TRAVIS_COMMIT/$TRAVIS_OS_NAME --recursive ;
# fi
# - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# aws s3 cp $TRAVIS_BUILD_DIR/installed/lib/ s3://brainflow/$TRAVIS_COMMIT/$TRAVIS_OS_NAME --recursive ;
# fi
# # notify that everything is ok
# - echo success > ${TRAVIS_OS_NAME}_success && aws s3 cp ${TRAVIS_OS_NAME}_success s3://brainflow/$TRAVIS_COMMIT/

after_failure:
# notify Appveyor of travis test failure
echo failure > ${TRAVIS_OS_NAME}_failure && aws s3 cp ${TRAVIS_OS_NAME}_failure s3://brainflow/$TRAVIS_COMMIT/
# after_failure:
# # notify Appveyor of travis test failure
# echo failure > ${TRAVIS_OS_NAME}_failure && aws s3 cp ${TRAVIS_OS_NAME}_failure s3://brainflow/$TRAVIS_COMMIT/

notifications:
email:
Expand Down
148 changes: 74 additions & 74 deletions appveyor.yml
Expand Up @@ -70,82 +70,82 @@ test_script:
- python %APPVEYOR_BUILD_FOLDER%\emulator\brainflow_emulator\wifi_shield_emulator.py %APPVEYOR_BUILD_FOLDER%\tests\cpp\build\Release\test_get_data.exe --board-id 5 --ip-address 127.0.0.1 --ip-protocol 2 --ip-port 17983
- python %APPVEYOR_BUILD_FOLDER%\emulator\brainflow_emulator\wifi_shield_emulator.py %APPVEYOR_BUILD_FOLDER%\csharp-package\brainflow\test\bin\Release\test.exe --board-id 6 --ip-address 127.0.0.1 --ip-protocol 2 --ip-port 17984

deploy_script:
- python -m pip install wheel > wheel_install.txt
- python -m pip install twine > twine_install.txt
- python -m pip install awscli > awscli_install.txt
# upload to S3 in all cases, we will always be able to download libs
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\installed32\inc\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/inc --recursive
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\installed32\lib\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/lib32 --recursive
- aws s3 cp %APPVEYOR_BUILD_FOLDER%\installed64\lib\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/lib64 --recursive
# download files from travis using S3 create package and publish it
- ps: >-
cd $env:APPVEYOR_BUILD_FOLDER\csharp-package\brainflow\brainflow;
If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "master") {
(gc .\brainflow.nuspec).replace('VERSION_PLACEHOLDER',$env:APPVEYOR_REPO_TAG_NAME) | Out-File -encoding ASCII brainflow.nuspec
}
Else {
(gc .\brainflow.nuspec).replace('VERSION_PLACEHOLDER','1.0.0') | Out-File -encoding ASCII brainflow.nuspec
}
nuget pack brainflow.csproj -properties Configuration=Release -IncludeReferencedProjects;
aws s3 cp %APPVEYOR_BUILD_FOLDER%\csharp-package\brainflow\brainflow s3://brainflow/%APPVEYOR_REPO_COMMIT%/nuget --recursive;
# deploy_script:
# - python -m pip install wheel > wheel_install.txt
# - python -m pip install twine > twine_install.txt
# - python -m pip install awscli > awscli_install.txt
# # upload to S3 in all cases, we will always be able to download libs
# - aws s3 cp %APPVEYOR_BUILD_FOLDER%\installed32\inc\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/inc --recursive
# - aws s3 cp %APPVEYOR_BUILD_FOLDER%\installed32\lib\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/lib32 --recursive
# - aws s3 cp %APPVEYOR_BUILD_FOLDER%\installed64\lib\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/lib64 --recursive
# # download files from travis using S3 create package and publish it
# - ps: >-
# cd $env:APPVEYOR_BUILD_FOLDER\csharp-package\brainflow\brainflow;
# If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "master") {
# (gc .\brainflow.nuspec).replace('VERSION_PLACEHOLDER',$env:APPVEYOR_REPO_TAG_NAME) | Out-File -encoding ASCII brainflow.nuspec
# }
# Else {
# (gc .\brainflow.nuspec).replace('VERSION_PLACEHOLDER','1.0.0') | Out-File -encoding ASCII brainflow.nuspec
# }
# nuget pack brainflow.csproj -properties Configuration=Release -IncludeReferencedProjects;
# aws s3 cp %APPVEYOR_BUILD_FOLDER%\csharp-package\brainflow\brainflow s3://brainflow/%APPVEYOR_REPO_COMMIT%/nuget --recursive;

$lin = $false;
$osx = $false;
for ($i=0; $i -lt 30; $i++) {
# wait 30 minutes or until mac and linux binaries appear in s3
aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/linux_success;
$lin = $?;
aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/osx_success;
$osx = $?
if($lin -and $osx) {break}
# stop waiting if linux or mac tests fail
aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/linux_failure;
$lin_fail = $?;
aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/osx_failure;
$osx_fail = $?
if($lin_fail -or $osx_fail) {
write-output "Skip deployment, travis build failed"
break
}
Start-Sleep -s 60;
echo "not found"
}
If ($lin -and $osx) {
write-output "Binaries found - running deployment"
New-Item $env:APPVEYOR_BUILD_FOLDER\linux -itemtype directory
New-Item $env:APPVEYOR_BUILD_FOLDER\osx -itemtype directory
aws s3 cp s3://brainflow/$env:APPVEYOR_REPO_COMMIT/linux/ $env:APPVEYOR_BUILD_FOLDER\linux\ --recursive
ls $env:APPVEYOR_BUILD_FOLDER\linux
aws s3 cp s3://brainflow/$env:APPVEYOR_REPO_COMMIT/osx/ $env:APPVEYOR_BUILD_FOLDER\osx\ --recursive
ls $env:APPVEYOR_BUILD_FOLDER\osx
cd $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\linux\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\src\main\resources" -Recurse
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\osx\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\src\main\resources" -Recurse
ls $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\src\main\resources;
mvn package > mvn_final_stdout.txt
#upload .jars to aws
aws s3 cp %APPVEYOR_BUILD_FOLDER%\java-package\brainflow\target\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/jars --recursive
# $lin = $false;
# $osx = $false;
# for ($i=0; $i -lt 30; $i++) {
# # wait 30 minutes or until mac and linux binaries appear in s3
# aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/linux_success;
# $lin = $?;
# aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/osx_success;
# $osx = $?
# if($lin -and $osx) {break}
# # stop waiting if linux or mac tests fail
# aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/linux_failure;
# $lin_fail = $?;
# aws s3 ls s3://brainflow/$env:APPVEYOR_REPO_COMMIT/osx_failure;
# $osx_fail = $?
# if($lin_fail -or $osx_fail) {
# write-output "Skip deployment, travis build failed"
# break
# }
# Start-Sleep -s 60;
# echo "not found"
# }
# If ($lin -and $osx) {
# write-output "Binaries found - running deployment"
# New-Item $env:APPVEYOR_BUILD_FOLDER\linux -itemtype directory
# New-Item $env:APPVEYOR_BUILD_FOLDER\osx -itemtype directory
# aws s3 cp s3://brainflow/$env:APPVEYOR_REPO_COMMIT/linux/ $env:APPVEYOR_BUILD_FOLDER\linux\ --recursive
# ls $env:APPVEYOR_BUILD_FOLDER\linux
# aws s3 cp s3://brainflow/$env:APPVEYOR_REPO_COMMIT/osx/ $env:APPVEYOR_BUILD_FOLDER\osx\ --recursive
# ls $env:APPVEYOR_BUILD_FOLDER\osx
# cd $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow
# Copy-Item "$env:APPVEYOR_BUILD_FOLDER\linux\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\src\main\resources" -Recurse
# Copy-Item "$env:APPVEYOR_BUILD_FOLDER\osx\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\src\main\resources" -Recurse
# ls $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\src\main\resources;
# mvn package > mvn_final_stdout.txt
# #upload .jars to aws
# aws s3 cp %APPVEYOR_BUILD_FOLDER%\java-package\brainflow\target\ s3://brainflow/%APPVEYOR_REPO_COMMIT%/jars --recursive

If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "master") {
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\linux\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\python-package\brainflow\lib" -Recurse
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\osx\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\python-package\brainflow\lib" -Recurse
ls $env:APPVEYOR_BUILD_FOLDER\python-package\brainflow\lib
cd $env:APPVEYOR_BUILD_FOLDER\python-package
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*.whl --user Andrey1994 --password $env:PYPI_PASSWORD
cd $env:APPVEYOR_BUILD_FOLDER\tools
.\github-release.exe release --user Andrey1994 --repo brainflow --tag $env:APPVEYOR_REPO_TAG_NAME
.\github-release.exe upload --user Andrey1994 --repo brainflow --tag $env:APPVEYOR_REPO_TAG_NAME --name brainflow.jar --file $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\target\brainflow.jar
.\github-release.exe upload --user Andrey1994 --repo brainflow --tag $env:APPVEYOR_REPO_TAG_NAME --name brainflow-jar-with-dependencies.jar --file $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\target\brainflow-jar-with-dependencies.jar
}
Else {
write-output "Skip deployment for non tag"
}
}
Else {
write-output "Failed to wait for mac and linux libs"
}
# If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "master") {
# Copy-Item "$env:APPVEYOR_BUILD_FOLDER\linux\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\python-package\brainflow\lib" -Recurse
# Copy-Item "$env:APPVEYOR_BUILD_FOLDER\osx\*" -Destination "$env:APPVEYOR_BUILD_FOLDER\python-package\brainflow\lib" -Recurse
# ls $env:APPVEYOR_BUILD_FOLDER\python-package\brainflow\lib
# cd $env:APPVEYOR_BUILD_FOLDER\python-package
# python setup.py sdist bdist_wheel
# twine upload --skip-existing dist/*.whl --user Andrey1994 --password $env:PYPI_PASSWORD
# cd $env:APPVEYOR_BUILD_FOLDER\tools
# .\github-release.exe release --user Andrey1994 --repo brainflow --tag $env:APPVEYOR_REPO_TAG_NAME
# .\github-release.exe upload --user Andrey1994 --repo brainflow --tag $env:APPVEYOR_REPO_TAG_NAME --name brainflow.jar --file $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\target\brainflow.jar
# .\github-release.exe upload --user Andrey1994 --repo brainflow --tag $env:APPVEYOR_REPO_TAG_NAME --name brainflow-jar-with-dependencies.jar --file $env:APPVEYOR_BUILD_FOLDER\java-package\brainflow\target\brainflow-jar-with-dependencies.jar
# }
# Else {
# write-output "Skip deployment for non tag"
# }
# }
# Else {
# write-output "Failed to wait for mac and linux libs"
# }

on_finish:
- appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build32\brainflow_build32_stdout.txt
Expand Down

0 comments on commit ed5ee56

Please sign in to comment.