1616
1717jobs :
1818 build :
19- name : Run Unit Tests and Build Windows GUI
19+ name : Test Build for Windows
2020 if : github.event_name != 'workflow_dispatch'
2121 runs-on : windows-2019
2222
@@ -57,105 +57,76 @@ jobs:
5757 shell : cmd
5858
5959 - name : Print Path
60- run : echo %PATH %
60+ run : echo %GITHUB_PATH %
6161 shell : cmd
62-
62+
63+ - name : Explicitly run processing-java
64+ run : |
65+ %GITHUB_WORKSPACE%\temp\processing-4.2\processing-java.exe --help
66+ shell : cmd
67+
68+ - name : Check processing-java command
69+ run : |
70+ set PATH=%PATH%;%GITHUB_WORKSPACE%\temp\processing-4.2
71+ processing-java --help
72+ shell : cmd
73+
6374 - name : Run Unit Tests
6475 run : |
65- python %GITHUB_WORKSPACE%\OpenBCI_GUI_UnitTests\run-unittests.py
76+ set PATH=%PATH%;%GITHUB_WORKSPACE%\temp\processing-4.2
77+ ls -l
78+ python %GITHUB_WORKSPACE%\GuiUnitTests\run-unittests.py
6679 shell : cmd
6780
68- - name : Build Script
81+ - name : Build without Signing
82+ if : github.event_name != 'workflow_dispatch'
6983 run : |
84+ echo %cd%
85+ ls
86+ set PATH=%PATH%;%GITHUB_WORKSPACE%\temp\processing-4.2
87+ set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64
7088 python %GITHUB_WORKSPACE%\release_script\make-release.py --no-prompts
7189 shell : cmd
72-
73- build_and_deploy :
74- name : Build, Sign, and Deploy Windows GUI
75- if : github.event_name == 'workflow_dispatch'
76- runs-on : windows-2019
7790
78- steps :
79- - name : Clone Repository
80- uses : actions/checkout@v3
81-
82- - name : Install Python 3.9
83- uses : actions/setup-python@v4
84- with :
85- python-version : ' 3.9'
86- architecture : ' x64'
87- cache : ' pip' # caching pip dependencies
88-
89- - name : Install Python Dependencies
90- run : |
91- python -m pip install requests
92- python -m pip install beautifulsoup4
93-
94- - name : Install Processing
95- run : |
96- mkdir %GITHUB_WORKSPACE%\temp
97- cd %GITHUB_WORKSPACE%\temp
98- curl -O -L --insecure https://github.com/processing/processing4/releases/download/processing-1292-4.2/processing-4.2-windows-x64.zip
99- ls -l %GITHUB_WORKSPACE%\temp
100- unzip processing-4.2-windows-x64.zip
101- ls -l %GITHUB_WORKSPACE%\temp\processing-4.2
102- mkdir %userprofile%\documents\processing\libraries
103- xcopy %GITHUB_WORKSPACE%\OpenBCI_GUI\libraries\* %userprofile%\documents\processing\libraries /s /i /q
104- ls -l %userprofile%\documents\processing\libraries
105- shell : cmd
106-
107- - name : Set Path
108- run : |
109- echo %GITHUB_WORKSPACE%\temp\processing-4.2 >> %GITHUB_PATH%
110- echo C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 >> %GITHUB_PATH%
111- ls -l "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64"
112- shell : cmd
113-
114- - name : Print Path
115- run : echo %PATH%
116- shell : cmd
117-
118- - name : Decrypt pfx files
119- run : |
120- iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
121- appveyor-tools\secure-file -decrypt $env:GITHUB_WORKSPACE\release_script\windows_only\0a2d0e9821bd184a1d969a1db3630c92-SHA2.pfx.enc -secret $env:PFX_SECRET -salt $env:PFX_SALT -out $env:GITHUB_WORKSPACE\release_script\windows_only\0a2d0e9821bd184a1d969a1db3630c92-SHA2.pfx
122- ls -l $env:GITHUB_WORKSPACE\release_script\windows_only
123- env :
124- PFX_PASS : ${{ secrets.PFX_PASS }}
125- PFX_SECRET : ${{ secrets.PFX_SECRET }}
126- PFX_SALT : ${{ secrets.PFX_SALT }}
127-
128- - name : Run Unit Tests
129- run : |
130- python %GITHUB_WORKSPACE%\OpenBCI_GUI_UnitTests\run-unittests.py
131- shell : cmd
132-
133- - name : Build Script
134- run : |
135- python %GITHUB_WORKSPACE%\release_script\make-release.py --no-prompts --pfx-password %PFX_PASS% --pfx-path %GITHUB_WORKSPACE%\release_script\windows_only\0a2d0e9821bd184a1d969a1db3630c92-SHA2.pfx
136- env :
137- PFX_PASS : ${{ secrets.PFX_PASS }}
138- PFX_SECRET : ${{ secrets.PFX_SECRET }}
139- PFX_SALT : ${{ secrets.PFX_SALT }}
140- shell : cmd
141-
142- - name : Configure AWS credentials from Production account
143- uses : aws-actions/configure-aws-credentials@v2
144- with :
145- role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
146- aws-region : ${{ env.AWS_REGION }}
147-
148- - name : Store Build on AWS
149- run : |
150- cd $GITHUB_WORKSPACE
151- ls
152- export CURRENT_BRANCH=`git branch --show-current`
153- export GUI_COMMIT_TIME=`cat temp/timestamp.txt`
154- export GUI_VERSION_STRING=`cat temp/versionstring.txt`
155- echo $GUI_COMMIT_TIME
156- echo $GUI_VERSION_STRING
157- echo $CURRENT_BRANCH
158- aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
159- aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/${GUI_VERSION_STRING} --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
160- aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
161-
91+ - name : Decrypt pfx files
92+ if : github.event_name == 'workflow_dispatch'
93+ run : |
94+ iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
95+ appveyor-tools\secure-file -decrypt $env:GITHUB_WORKSPACE\release_script\windows_only\0a2d0e9821bd184a1d969a1db3630c92-SHA2.pfx.enc -secret $env:PFX_SECRET -salt $env:PFX_SALT -out $env:GITHUB_WORKSPACE\release_script\windows_only\0a2d0e9821bd184a1d969a1db3630c92-SHA2.pfx
96+ ls -l $env:GITHUB_WORKSPACE\release_script\windows_only
97+ env :
98+ PFX_PASS : ${{ secrets.PFX_PASS }}
99+ PFX_SECRET : ${{ secrets.PFX_SECRET }}
100+ PFX_SALT : ${{ secrets.PFX_SALT }}
101+
102+ - name : Build and Sign
103+ if : github.event_name == 'workflow_dispatch'
104+ run : |
105+ python %GITHUB_WORKSPACE%\release_script\make-release.py --no-prompts --pfx-password %PFX_PASS% --pfx-path %GITHUB_WORKSPACE%\release_script\windows_only\0a2d0e9821bd184a1d969a1db3630c92-SHA2.pfx
106+ env :
107+ PFX_PASS : ${{ secrets.PFX_PASS }}
108+ PFX_SECRET : ${{ secrets.PFX_SECRET }}
109+ PFX_SALT : ${{ secrets.PFX_SALT }}
110+ shell : cmd
111+
112+ - name : Configure AWS credentials from Production account
113+ if : github.event_name == 'workflow_dispatch'
114+ uses : aws-actions/configure-aws-credentials@v2
115+ with :
116+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
117+ aws-region : ${{ env.AWS_REGION }}
118+
119+ - name : Store Build on AWS
120+ if : github.event_name == 'workflow_dispatch'
121+ run : |
122+ cd $GITHUB_WORKSPACE
123+ ls
124+ export CURRENT_BRANCH=`git branch --show-current`
125+ export GUI_COMMIT_TIME=`cat temp/timestamp.txt`
126+ export GUI_VERSION_STRING=`cat temp/versionstring.txt`
127+ echo $GUI_COMMIT_TIME
128+ echo $GUI_VERSION_STRING
129+ echo $CURRENT_BRANCH
130+ aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
131+ aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/${GUI_VERSION_STRING} --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
132+ aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_macosx.dmg"
0 commit comments