Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandogelin committed Nov 13, 2019
2 parents efede6a + af8ecd4 commit f64b984
Show file tree
Hide file tree
Showing 47 changed files with 4,318 additions and 3,896 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build_at_home.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build at home version (Windows)

on:
push:
branches:
- master
- develop
pull_request:
paths:
- 'src/**'
- '.github/workflows/main.yml'

jobs:
build:
runs-on: windows-latest

strategy:
fail-fast: false
steps:
# Set up js package
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Set package version and name
uses: brown-ccv/gh-actions/get-package-info@master
id: package_info

# install, test, build package
- name: npm install
run: npm install
- name: npm build
run: npm run build:win:home
- name: npm test
run: npm test
env:
CI: true
REACT_APP_AT_HOME: true

# Build electron app package installers
- name: package electron - windows
run: npm run package:windows

# Upload installers to github action
- name: upload win-installer-home
uses: actions/upload-artifact@master
with:
name: win-installer-home
path: dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup.exe
100 changes: 100 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Test, Build, and Package

on:
push:
branches:
- master
- develop
pull_request:
paths:
- 'src/**'
- '.github/workflows/main.yml'

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
# Set up js package
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Set package version and name
uses: brown-ccv/gh-actions/get-package-info@master
id: package_info

# install, test, build package
- name: npm install
run: npm install
- name: npm build
run: npm run build
- name: npm test
run: npm test
env:
CI: true

# Build electron app package installers
- name: package electron - windows
if: startsWith(matrix.os, 'windows')
run: npm run package:windows
- name: package electron - linux
if: startsWith(matrix.os, 'ubuntu')
run: npm run package:linux
- name: package electron - mac
if: startsWith(matrix.os, 'mac')
run: npm run package:mac
- name: npm rebuild
if: startsWith(matrix.os, 'mac')
run: npm rebuild
- name: Mac installer
if: startsWith(matrix.os, 'mac')
run: npm run installer:mac

# Upload installers to github action
- name: upload win-installer
uses: actions/upload-artifact@master
if: startsWith(matrix.os, 'windows')
with:
name: win-installer
path: dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup.exe
- name: upload mac-installer
uses: actions/upload-artifact@master
if: startsWith(matrix.os, 'mac')
with:
name: mac-installer
path: dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}.dmg
- name: upload linux-installer
uses: actions/upload-artifact@master
if: startsWith(matrix.os, 'ubuntu')
with:
name: linux-installer
path: dist/installers/${{ steps.package_info.outputs.package_name }}_${{ steps.package_info.outputs.package_version }}_x64.deb

# Build PsiTurk - linux only
- name: Set up Python 3.7
if: startsWith(matrix.os, 'ubuntu')
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install PsiTurk
if: startsWith(matrix.os, 'ubuntu')
run: pip install psiturk
- name: Create Psiturk Build
if: startsWith(matrix.os, 'ubuntu')
run: |
cd psiturkit
./psiturk-it -p ${{ steps.package_info.outputs.package_name }}-psiturk
- name: Upload PsiTurk Build
uses: actions/upload-artifact@master
if: startsWith(matrix.os, 'ubuntu')
with:
name: psiturk-build
path: psiturkit/${{ steps.package_info.outputs.package_name }}-psiturk
141 changes: 141 additions & 0 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Add App Installers to Release

on:
push:
tags:
- '*'

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
# Set up js package
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Set package version and name
uses: brown-ccv/gh-actions/get-package-info@master
id: package_info

# install, test, build package
- name: npm install
run: npm install
- name: npm build - linux mac
if: startsWith(matrix.os, 'mac') || startsWith(matrix.os, 'ubuntu')
run: npm run build
- name: npm build - windows clinic
if: startsWith(matrix.os, 'windows')
run: npm run build:win:clinic
- name: npm test
run: npm test
env:
CI: true

# Build electron app package installers
- name: package electron - windows
if: startsWith(matrix.os, 'windows')
run: npm run package:windows
- name: Rename windows installer - clinic
if: startsWith(matrix.os, 'windows')
shell: bash
run: mv dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup.exe dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup-clinic.exe
- name: package electron - linux
if: startsWith(matrix.os, 'ubuntu')
run: npm run package:linux
- name: package electron - mac
if: startsWith(matrix.os, 'mac')
run: npm run package:mac
- name: npm rebuild - mac
if: startsWith(matrix.os, 'mac')
run: npm rebuild
- name: Mac installer
if: startsWith(matrix.os, 'mac')
run: npm run installer:mac

# Upload installers to github release
- name: Upload app to release - windows
if: startsWith(matrix.os, 'windows')
uses: softprops/action-gh-release@v1
with:
files: dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup-clinic.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload app to release - linux
if: startsWith(matrix.os, 'ubuntu')
uses: softprops/action-gh-release@v1
with:
files: dist/installers/${{ steps.package_info.outputs.package_name }}_${{ steps.package_info.outputs.package_version }}_x64.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload app to release - mac
if: startsWith(matrix.os, 'mac')
uses: softprops/action-gh-release@v1
with:
files: dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Build At Home Windows Release
- name: npm build - win home
run: npm run build:win:home
env:
CI: true
REACT_APP_AT_HOME: true
- name: npm test - win home
run: npm test
env:
CI: true
REACT_APP_AT_HOME: true
- name: package electron - windows home
if: startsWith(matrix.os, 'windows')
run: npm run package:windows
- name: Rename windows installer - home
if: startsWith(matrix.os, 'windows')
shell: bash
run: mv dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup.exe dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup-home.exe
- name: Upload app to release - windows home
if: startsWith(matrix.os, 'windows')
uses: softprops/action-gh-release@v1
with:
files: dist/installers/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-setup-home.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Build PsiTurk - linux only
- name: Set up Python 3.7
if: startsWith(matrix.os, 'ubuntu')
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install PsiTurk
if: startsWith(matrix.os, 'ubuntu')
run: pip install psiturk
- name: PsiTurk Build
if: startsWith(matrix.os, 'ubuntu')
run: npm run build:home
env:
CI: true
REACT_APP_AT_HOME: true
- name: Create Psiturk Build
if: startsWith(matrix.os, 'ubuntu')
run: |
cd psiturkit
./psiturk-it -p ${{ steps.package_info.outputs.package_name }}-psiturk
cd ..
tar -cvzf ${{ steps.package_info.outputs.package_name }}-psiturk.tar.gz psiturkit/${{ steps.package_info.outputs.package_name }}-psiturk
- name: Upload PsiTurk build to release
if: startsWith(matrix.os, 'ubuntu')
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.package_info.outputs.package_name }}-psiturk.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

psiturkit/*_turk
Loading

0 comments on commit f64b984

Please sign in to comment.