Update to Processing 4.2 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build GUI for Linux | |
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 Linux | |
if: github.event_name != 'workflow_dispatch' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' # caching pip dependencies | |
- name: Install Python Dependencies | |
run: pip install -r release_script/requirements.txt | |
- name: Download and Unzip Processing | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/temp | |
cd $GITHUB_WORKSPACE/temp | |
curl -O -L --insecure https://github.com/processing/processing4/releases/download/processing-1292-4.2/processing-4.2-linux-x64.tgz | |
tar -xzvf processing-4.2-linux-x64.tgz | |
ls | |
- name: Add Processing to PATH | |
run: | | |
echo "%GITHUB_WORKSPACE%\temp\processing-4.2" >> %GITHUB_PATH% | |
- name: Check GITHUB PATH | |
run: echo $PATH | |
- name: Test processing-java command | |
run: | | |
processing-java --help | |
- name: Copy libraries to Processing | |
run: | | |
mkdir -p $HOME/sketchbook/libraries/ | |
cp -a $GITHUB_WORKSPACE/OpenBCI_GUI/libraries/. $HOME/sketchbook/libraries/ | |
- name: Run Unit Tests | |
run: | | |
ls | |
python $GITHUB_WORKSPACE/GuiUnitTests/run-unittests.py | |
- name: Build GUI | |
run: | | |
mkdir $GITHUB_WORKSPACE/temp | |
touch temp/timestamp.txt | |
touch temp/versionstring.txt | |
python $GITHUB_WORKSPACE/release_script/make-release.py --no-prompts | |
GUI_COMMIT_TIME=`cat temp/timestamp.txt` | |
GUI_VERSION_STRING=`cat temp/versionstring.txt` | |
- name: Configure AWS credentials from Production account | |
if: github.event_name == 'workflow_dispatch' | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Store DMG on AWS | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
cd $GITHUB_WORKSPACE | |
ls | |
export CURRENT_BRANCH=`git branch --show-current` | |
export GUI_COMMIT_TIME=`cat temp/timestamp.txt` | |
export GUI_VERSION_STRING=`cat temp/versionstring.txt` | |
echo $GUI_COMMIT_TIME | |
echo $GUI_VERSION_STRING | |
echo $CURRENT_BRANCH | |
aws s3 rm s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_linux64.zip" | |
aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/${GUI_VERSION_STRING} --recursive --exclude "*" --include "openbcigui_*_linux64.zip" | |
aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_linux64.zip" |