1+ name : Build GUI for Windows
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ branches : [master, development]
7+ push :
8+ branches : [master, development]
9+
10+ permissions :
11+ id-token : write
12+ contents : read
13+
14+ env :
15+ AWS_REGION : us-east-1
16+
17+ jobs :
18+ build :
19+ name : Build for Windows
20+ runs-on : windows-2019
21+
22+ steps :
23+ - name : Clone Repository
24+ uses : actions/checkout@v3
25+
26+ - name : Install Python 3.9
27+ uses : actions/setup-python@v4
28+ with :
29+ python-version : ' 3.9'
30+ architecture : ' x64'
31+ cache : ' pip' # caching pip dependencies
32+
33+ - name : Install Python Dependencies
34+ run : |
35+ python -m pip install requests
36+ python -m pip install beautifulsoup4
37+
38+ - name : Install Processing
39+ run : |
40+ mkdir %GITHUB_WORKSPACE%\temp
41+ cd %GITHUB_WORKSPACE%\temp
42+ curl -O -L --insecure https://github.com/processing/processing4/releases/download/processing-1292-4.2/processing-4.2-windows-x64.zip
43+ ls -l %GITHUB_WORKSPACE%\temp
44+ unzip processing-4.2-windows-x64.zip
45+ ls -l %GITHUB_WORKSPACE%\temp\processing-4.2
46+ mkdir %userprofile%\documents\processing\libraries
47+ xcopy %GITHUB_WORKSPACE%\OpenBCI_GUI\libraries\* %userprofile%\documents\processing\libraries /s /i /q
48+ ls -l %userprofile%\documents\processing\libraries
49+ shell : cmd
50+
51+ - name : Set Path
52+ run : |
53+ echo %GITHUB_WORKSPACE%\temp\processing-4.2 >> %GITHUB_PATH%
54+ echo C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 >> %GITHUB_PATH%
55+ ls -l "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64"
56+ shell : cmd
57+
58+ - name : Print Path
59+ run : echo %GITHUB_PATH%
60+ shell : cmd
61+
62+ - name : Explicitly run processing-java
63+ run : |
64+ %GITHUB_WORKSPACE%\temp\processing-4.2\processing-java.exe --help
65+ shell : cmd
66+
67+ - name : Check processing-java command
68+ run : |
69+ set PATH=%PATH%;%GITHUB_WORKSPACE%\temp\processing-4.2
70+ processing-java --help
71+ shell : cmd
72+
73+ - name : Run Unit Tests
74+ run : |
75+ set PATH=%PATH%;%GITHUB_WORKSPACE%\temp\processing-4.2
76+ ls -l
77+ python %GITHUB_WORKSPACE%\GuiUnitTests\run-unittests.py
78+ shell : cmd
79+
80+ - name : Build without Signing
81+ if : ${{ true }}
82+ run : |
83+ echo %cd%
84+ ls
85+ set PATH=%PATH%;%GITHUB_WORKSPACE%\temp\processing-4.2
86+ set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64
87+ type nul > temp/versionstring.txt
88+ type nul > temp/timestamp.txt
89+ python %GITHUB_WORKSPACE%\release_script\make-release.py --no-prompts
90+ shell : cmd
91+
92+ - name : Decrypt pfx files
93+ if : ${{ false }}
94+ run : |
95+ iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
96+ 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
97+ ls -l $env:GITHUB_WORKSPACE\release_script\windows_only
98+ env :
99+ PFX_PASS : ${{ secrets.PFX_PASS }}
100+ PFX_SECRET : ${{ secrets.PFX_SECRET }}
101+ PFX_SALT : ${{ secrets.PFX_SALT }}
102+
103+ - name : Build and Sign
104+ if : ${{ false }}
105+ run : |
106+ 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
107+ env :
108+ PFX_PASS : ${{ secrets.PFX_PASS }}
109+ PFX_SECRET : ${{ secrets.PFX_SECRET }}
110+ PFX_SALT : ${{ secrets.PFX_SALT }}
111+ shell : cmd
112+
113+ - name : Configure AWS credentials from Production account
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 : Get branch names
120+ id : branch-name
121+ uses : tj-actions/branch-names@v7
122+
123+ - name : Store Build on AWS
124+ run : |
125+ cd ${{ github.workspace }}
126+ ls
127+ echo "${{ steps.branch-name.outputs.head_ref_branch }}"
128+ set S3_BRANCH_FOLDER=s3://openbci-public-gui-v6/${{ steps.branch-name.outputs.head_ref_branch }}
129+ echo %S3_BRANCH_FOLDER%
130+ aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
131+ aws s3 cp ${{ github.workspace }}/. %S3_BRANCH_FOLDER% --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
132+ aws s3 cp ${{ github.workspace }}/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
133+ shell : cmd
0 commit comments