Skip to content

Commit

Permalink
MAINT: Add static deployment scripts. add missing deployment steps to…
Browse files Browse the repository at this point in the history
… static deployment.
  • Loading branch information
LorenzE authored and gabrielbmotta committed Nov 6, 2020
1 parent f39c413 commit a196e69
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ jobs:
Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
..\Qt5_binaries\bin\qmake -r MNECPP_CONFIG+=noTests MNECPP_CONFIG+=static
jom -j4
- name: Deploy binaries (Linux)
if: matrix.os == 'ubuntu-18.04'
run: |
./tools/deployment/deploy_linux_static
- name: Deploy binaries (MacOS)
if: matrix.os == 'macos-latest'
run: |
./tools/deployment/deploy_macos_static
- name: Deploy binaries (Windows)
if: matrix.os == 'windows-2019'
run: |
./tools/deployment/deploy_win_static.bat
Tests:
runs-on: ${{ matrix.os }}
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,7 @@ jobs:
make install -j4
- name: Deploy binaries
run: |
# Delete folders which we do not want to ship
rm -r bin/mne_rt_server_plugins
rm -r bin/mne-cpp-test-data
rm -r bin/mne_scan_plugins
rm -r bin/mne_analyze_plugins
# Creating archive of everything in the bin directory
tar cfvz mne-cpp-linux-static-x86_64.tar.gz bin/.
./tools/deployment/deploy_linux_static
- name: Deploy binaries with stable release on Github
if: endsWith(github.ref, 'master') == false
uses: svenstaro/upload-release-action@v1-release
Expand Down Expand Up @@ -158,10 +152,7 @@ jobs:
make install -j4
- name: Deploy binaries
run: |
# Delete folders which we do not want to ship
rm -r bin/mne-cpp-test-data
# Creating archive of all macos deployed applications
tar cfvz mne-cpp-macos-static-x86_64.tar.gz bin/.
./tools/deployment/deploy_macos_static
- name: Deploy binaries with stable release on Github
if: endsWith(github.ref, 'master') == false
uses: svenstaro/upload-release-action@v1-release
Expand Down Expand Up @@ -230,12 +221,7 @@ jobs:
jom -j4
- name: Deploy binaries
run: |
# Delete folders which we do not want to ship
Remove-Item 'bin/mne_rt_server_plugins' -Recurse
Remove-Item 'bin/mne-cpp-test-data' -Recurse
Remove-Item 'bin/mne_scan_plugins' -Recurse
Remove-Item 'bin/mne_analyze_plugins' -Recurse
7z a mne-cpp-windows-static-x86_64.zip ./bin
./tools/deployment/deploy_win_static.bat
- name: Deploy binaries with stable release on Github
if: endsWith(github.ref, 'master') == false
uses: svenstaro/upload-release-action@v1-release
Expand Down
1 change: 0 additions & 1 deletion bin/mne-cpp-test-data
Submodule mne-cpp-test-data deleted from 9207dc
2 changes: 1 addition & 1 deletion mne-cpp.pri
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 Authors of MNE-CPP. All rights reser
# To build MNE Scan with TMSI support run: qmake MNECPP_CONFIG+=withTmsi

# Default flags
MNECPP_CONFIG +=
MNECPP_CONFIG += static withAppBundles noExamples noTests

# Suppress untested SDK version checks on MacOS
macx {
Expand Down
8 changes: 8 additions & 0 deletions tools/deployment/deploy_linux_static
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete folders which we do not want to ship
rm -r bin/mne_rt_server_plugins
rm -r bin/mne-cpp-test-data
rm -r bin/mne_scan_plugins
rm -r bin/mne_analyze_plugins

# Creating archive of everything in the bin directory
tar cfvz mne-cpp-linux-static-x86_64.tar.gz bin/.
3 changes: 2 additions & 1 deletion tools/deployment/deploy_macos
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ rm -r bin/mne-cpp-test-data
rm -r bin/mne_scan_plugins
rm -r bin/mne_analyze_plugins
rm -r bin/mne_rt_server_plugins
rm -r bin/resources

# Creating archive of all macos deployed applications
tar cfvz mne-cpp-macos-dynamic-x86_64.tar.gz bin/. lib/.
tar cfvz mne-cpp-macos-dynamic-x86_64.tar.gz bin/.
28 changes: 28 additions & 0 deletions tools/deployment/deploy_macos_static
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This script needs to be run from the top level mne-cpp repo folder
# Solve for dependencies for mne_scan.app bundle
cp -a bin/resources/. bin/mne_scan.app/Contents/MacOS/resources

# Solve for dependencies for mne_analyze.app bundle
cp -a bin/resources/. bin/mne_analyze.app/Contents/MacOS/resources

# Solve for dependencies for mne_rt_server.app bundle
cp -a bin/resources/. bin/mne_rt_server.app/Contents/MacOS/resources

# Solve for dependencies for mne_forward_solution.app bundle
cp -a bin/resources/. bin/mne_forward_solution.app/Contents/MacOS/resources

# Solve for dependencies for mne_dipole_fit.app bundle
cp -a bin/resources/. bin/mne_dipole_fit.app/Contents/MacOS/resources

# Solve for dependencies for mne_anonymize.app bundle
cp -a bin/resources/. bin/mne_anonymize.app/Contents/MacOS/resources

# Delete folders which we do not want to ship
rm -r bin/mne-cpp-test-data
rm -r bin/mne_scan_plugins
rm -r bin/mne_analyze_plugins
rm -r bin/mne_rt_server_plugins
rm -r bin/resources

# Creating archive of all macos deployed applications
tar cfvz mne-cpp-macos-static-x86_64.tar.gz bin/.
8 changes: 8 additions & 0 deletions tools/deployment/deploy_win_static.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete folders which we do not want to ship
Remove-Item 'bin/mne_rt_server_plugins' -Recurse
Remove-Item 'bin/mne-cpp-test-data' -Recurse
Remove-Item 'bin/mne_scan_plugins' -Recurse
Remove-Item 'bin/mne_analyze_plugins' -Recurse

# Creating archive of everything in the bin directory
7z a mne-cpp-windows-static-x86_64.zip ./bin

0 comments on commit a196e69

Please sign in to comment.