Merge pull request #1196 from OpenBCI/1195-gui-v600-beta0-crashes-whe… #171
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 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
- name: Install Python Dependencies | |
run: pip install -r release/requirements.txt | |
- name: Install Processing | |
run: | | |
mkdir -p $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-linux-x64.tgz | |
tar -xzvf processing-4.2-linux-x64.tgz | |
ls | |
- name: Add Processing to PATH | |
run: sudo su -c "ln -s $GITHUB_WORKSPACE/processing/processing-4.2/processing-java /usr/local/bin/processing-java" | |
- name: Print 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/ | |
# Unit tests cannot be run on Linux without attached display. | |
- name: Build | |
run: python $GITHUB_WORKSPACE/release/build.py | |
- name: Package | |
run: python $GITHUB_WORKSPACE/release/package.py | |
- 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 | |
CURRENT_BRANCH=${{ steps.branch-name.outputs.head_ref_branch }} | |
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/${CURRENT_BRANCH} --recursive --exclude "*" --include "openbcigui_*_linux64.zip" | |
aws s3 cp $GITHUB_WORKSPACE/. s3://openbci-public-gui-v6/latest --recursive --exclude "*" --include "openbcigui_*_linux64.zip" |