Skip to content

Fix Cyton impedance check board configuration #226

Fix Cyton impedance check board configuration

Fix Cyton impedance check board configuration #226

name: Build GUI for Windows
on:
workflow_dispatch:
pull_request:
branches: [master, development]
push:
branches: [master, development]
permissions:
id-token: write
contents: read
env:
AWS_REGION : us-east-1
jobs:
build:
name: Build for Windows
runs-on: windows-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Install Processing
run: |
mkdir %GITHUB_WORKSPACE%\processing
cd %GITHUB_WORKSPACE%\processing
curl -O -L --insecure https://github.com/processing/processing4/releases/download/processing-1292-4.2/processing-4.2-windows-x64.zip
ls -l %GITHUB_WORKSPACE%\processing
unzip processing-4.2-windows-x64.zip
ls -l %GITHUB_WORKSPACE%\processing\processing-4.2
mkdir %userprofile%\documents\processing\libraries
xcopy %GITHUB_WORKSPACE%\OpenBCI_GUI\libraries\* %userprofile%\documents\processing\libraries /s /i /q
ls -l %userprofile%\documents\processing\libraries
shell: cmd
- name: Set Path
run: |
echo %GITHUB_WORKSPACE%\processing\processing-4.2>>%GITHUB_PATH%
echo C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64>>%GITHUB_PATH%
shell: cmd
- name: Print Path
run: echo %PATH%
shell: cmd
- name: Check processing-java Command
run: processing-java --help
shell: cmd
- name: Run Unit Tests
run: python %GITHUB_WORKSPACE%\GuiUnitTests\run-unittests.py
shell: cmd
- name: Build
run: python %GITHUB_WORKSPACE%\release\build.py
shell: cmd
- name: Sign
run: |
dotnet tool install --global azuresigntool
mt -manifest %GITHUB_WORKSPACE%\release\windows\gui.manifest -outputresource:%GITHUB_WORKSPACE%\application.windows64\OpenBCI_GUI.exe;#1
mt -manifest %GITHUB_WORKSPACE%\release\windows\java.manifest -outputresource:%GITHUB_WORKSPACE%\application.windows64\java\bin\java.exe;#1
mt -manifest %GITHUB_WORKSPACE%\release\windows\javaw.manifest -outputresource:%GITHUB_WORKSPACE%\application.windows64\java\bin\javaw.exe;#1
azuresigntool sign --azure-key-vault-url "${{ secrets.AZURE_KEY_VAULT_URI }}" --azure-key-vault-client-id "${{ secrets.AZURE_CLIENT_ID }}" --azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" --azure-key-vault-client-secret "${{ secrets.AZURE_CLIENT_SECRET }}" --azure-key-vault-certificate "${{ secrets.AZURE_CERT_NAME }}" --timestamp-rfc3161 http://timestamp.digicert.com --verbose %GITHUB_WORKSPACE%\application.windows64\OpenBCI_GUI.exe
shell: cmd
- name: Package
run: python %GITHUB_WORKSPACE%\release\package.py
shell: cmd
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_REGION }}
- name: Get Branch Names
id: branch-name
uses: tj-actions/branch-names@v7
- name: Store Build on AWS
run: |
cd ${{ github.workspace }}
ls
echo "${{ steps.branch-name.outputs.head_ref_branch }}"
set S3_BRANCH_FOLDER=s3://openbci-public-gui-v6/${{ steps.branch-name.outputs.head_ref_branch }}
echo %S3_BRANCH_FOLDER%
aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
aws s3 cp ${{ github.workspace }}/. %S3_BRANCH_FOLDER% --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
aws s3 cp ${{ github.workspace }}/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_windows64.zip"
shell: cmd