Lightning bug fixes #4100
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 Desktop App | |
on: | |
push: | |
tags: | |
- desktop-v* | |
pull_request: | |
paths: | |
- app/** | |
- package/desktop/** | |
- .github/workflows/build-desktop.yml | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- mac-arm64 | |
- mac-x86_64 | |
- linux-x86_64 | |
- linux-aarch64 | |
- win-amd64 | |
steps: | |
- name: Clone fiftyone | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip setuptools wheel | |
- name: Cache Node Modules | |
id: node-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
app/node_modules | |
app/.yarn/cache | |
key: node-modules-${{ hashFiles('app/yarn.lock') }} | |
- name: Install app | |
run: cd app && yarn install | |
- name: Package App (Non-Windows) | |
if: ${{ matrix.platform != 'win-amd64' }} | |
working-directory: app/packages/desktop | |
run: yarn package-${{ matrix.platform }} --publish never | |
- name: Package App (Windows) | |
if: ${{ matrix.platform == 'win-amd64' }} | |
working-directory: app/ | |
run: | | |
docker run --rm \ | |
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ | |
--env ELECTRON_CACHE="/root/.cache/electron" \ | |
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ | |
-v ${PWD}:/project \ | |
-v ~/.cache/electron:/root/.cache/electron \ | |
-v ~/.cache/electron-builder:/root/.cache/electron-builder \ | |
electronuserland/builder:wine \ | |
yarn workspace FiftyOne package-${{ matrix.platform }} --publish never | |
- name: Set environment | |
env: | |
RELEASE_TAG: ${{ github.ref }} | |
run: | | |
if [[ $RELEASE_TAG =~ ^refs\/tags\/desktop-v.*-rc\..*$ ]]; then | |
echo "RELEASE_VERSION=$(echo "${{ github.ref }}" | sed "s/^refs\/tags\/desktop-v//")" >> $GITHUB_ENV | |
fi | |
- name: Build wheel | |
working-directory: package/desktop | |
run: python setup.py bdist_wheel --plat-name ${{ matrix.platform }} | |
- name: Upload wheel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheel-${{ matrix.platform }} | |
path: package/desktop/dist/*.whl | |
publish: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
if: startsWith(github.ref, 'refs/tags/desktop-v') | |
steps: | |
- name: Download wheels | |
uses: actions/download-artifact@v3 | |
with: | |
path: downloads | |
- name: Install dependencies | |
run: | | |
pip3 install twine | |
- name: Set environment | |
env: | |
RELEASE_TAG: ${{ github.ref }} | |
run: | | |
echo "TWINE_PASSWORD=${{ secrets.FIFTYONE_PYPI_TOKEN }}" >> $GITHUB_ENV | |
echo "TWINE_REPOSITORY=pypi" >> $GITHUB_ENV | |
- name: Upload to pypi | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_NON_INTERACTIVE: 1 | |
run: | | |
python3 -m twine upload downloads/wheel-*/*.whl |