Skip to content

Commit

Permalink
Another WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Stein <[email protected]>
  • Loading branch information
texodus committed Jul 11, 2024
1 parent 6386d99 commit 8cf1564
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 92 deletions.
26 changes: 16 additions & 10 deletions .github/actions/install-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ name: "Install Dependencies"
description: "Install and cache the project's myraid dependencies"

inputs:
llvm:
default: "true"
description: "Insall LLVM 17?"
clean:
default: "false"
description: "Clean unused deps. This is helpful if we run out of HD but slow!"
skip_cache:
default: "false"
description: "Don't use cache from previous builds"

outputs:
Expand All @@ -25,16 +32,14 @@ outputs:
runs:
using: "composite"
steps:
# # This is helpful if we run out of HD but slow!
#
# - name: Clean System
# uses: AdityaGarg8/remove-unwanted-software@v3
# if: ${{ runner.os == 'Linux' }}
# with:
# remove-android: "true"
# remove-dotnet: "true"
# remove-haskell: "true"
# remove-codeql: "true"
- name: Clean System
uses: AdityaGarg8/remove-unwanted-software@v3
if: ${{ inputs.clean == 'true' }}
with:
remove-android: "true"
remove-dotnet: "true"
remove-haskell: "true"
remove-codeql: "true"

# https://github.com/open-telemetry/opentelemetry-cpp/issues/2998
- name: Setup cmake
Expand Down Expand Up @@ -128,6 +133,7 @@ runs:
components: rustfmt, clippy, rust-src

- name: Install LLVM 17
if: ${{ inputs.llvm == 'true' }}
uses: KyleMayes/install-llvm-action@v2
with:
version: "17"
Expand Down
135 changes: 53 additions & 82 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
- binder/
- docs/
- examples/
- python/perspective/README.md
- rust/perspective-python/README.md
pull_request:
branches:
- master
Expand Down Expand Up @@ -59,6 +59,12 @@ concurrency:
cancel-in-progress: true

jobs:
# ,-,---. . . ,-_/ .---. .
# '|___/ . . . | ,-| ' | ,-. . , ,-. \___ ,-. ,-. . ,-. |-
# ,| \ | | | | | | | ,-| | / ,-| \ | | | | | |
# `-^---' `-^ ' `' `-^ | `-^ `' `-^ `---' `-' ' ' |-' `'
# /` | |
# `--' '
build_js:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -100,54 +106,25 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: perspective-dist
path: rust/perspective-js/dist/

- uses: actions/upload-artifact@v4
with:
name: perspective-jupyterlab-dist
path: packages/perspective-jupyterlab/dist/

- uses: actions/upload-artifact@v4
with:
name: perspective-viewer-d3fc-dist
path: packages/perspective-viewer-d3fc/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-viewer-datagrid-dist
path: packages/perspective-viewer-datagrid/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-viewer-openlayers-dist
path: packages/perspective-viewer-openlayers/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-esbuild-plugin-dist
path: packages/perspective-esbuild-plugin/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-webpack-plugin-dist
path: packages/perspective-webpack-plugin/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-cli-dist
path: packages/perspective-cli/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-workspace-dist
path: packages/perspective-workspace/dist

- uses: actions/upload-artifact@v4
with:
name: perspective-viewer-dist
path: rust/perspective-viewer/dist

name: perspective-js-dist
path: |
rust/perspective-js/dist/
rust/perspective-viewer/dist
packages/perspective-jupyterlab/dist/
packages/perspective-viewer-d3fc/dist
packages/perspective-viewer-datagrid/dist
packages/perspective-viewer-openlayers/dist
packages/perspective-esbuild-plugin/dist
packages/perspective-webpack-plugin/dist
packages/perspective-cli/dist
packages/perspective-workspace/dist
# ,-,---. . . .-,--. . .
# '|___/ . . . | ,-| '|__/ . . |- |-. ,-. ,-.
# ,| \ | | | | | | ,| | | | | | | | | |
# `-^---' `-^ ' `' `-^ `' `-| `' ' ' `-' ' '
# /|
# `-'
build_python:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -174,20 +151,19 @@ jobs:
with:
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}

# https://github.com/apache/arrow/issues/38391
- if: runner.os == 'macOS'
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)" >> $GITHUB_ENV

- run: echo "VCPKG_INSTALLATION_ROOT=${{ steps.init-step.outputs.VCPKG_INSTALLATION_ROOT }}" >> $env:GITHUB_ENV

- run: |
dir env:
if: ${{ runner.os == 'Windows' }}
- name: Python Build
run: pnpm run build
env:
VCPKG_ROOT: ${{ steps.init-step.outputs.VCPKG_INSTALLATION_ROOT }}
PACKAGE: "perspective-python"
PSP_VCPKG_PATH: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
PSP_USE_CCACHE: 1
CI: 1

Expand All @@ -209,6 +185,12 @@ jobs:
name: perspective-python-sdist
path: rust/target/wheels/*.tar.gz

# ,-,---. . . ,-_/ . , .
# '|___/ . . . | ,-| ' | . . ,-. . . |- ,-. ,-. ) ,-. |-.
# ,| \ | | | | | | | | | | | | | | |-' | / ,-| | |
# `-^---' `-^ ' `' `-^ | `-^ |-' `-| `' `-' ' `--' `-^ ^-'
# /` | | /|
# `--' ' `-'
build_juptyerlab_extension:
needs: [build_js, build_python]
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -239,14 +221,20 @@ jobs:
with:
name: nbextension-dist
path: rust/perspective-python/perspective/nbextension
if-no-files-found: error # TODO
if-no-files-found: error

- uses: actions/upload-artifact@v4
with:
name: labextension-dist
path: rust/perspective-python/perspective/labextension
if-no-files-found: error # TODO

if-no-files-found: error

# ,--,--' . ,-_/ .---. .
# `- | ,-. ,-. |- ' | ,-. . , ,-. \___ ,-. ,-. . ,-. |-
# , | |-' `-. | | ,-| | / ,-| \ | | | | | |
# `-' `-' `-' `' | `-^ `' `-^ `---' `-' ' ' |-' `'
# /` | |
# `--' '
test_js:
needs: [build_js]
runs-on: ${{ matrix.os }}
Expand All @@ -270,44 +258,26 @@ jobs:
- name: Initialize Build
uses: ./.github/actions/install-deps
with:
llvm: "false"
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}

- uses: actions/download-artifact@v4
with:
name: perspective-dist
path: rust/perspective-js/dist/

- uses: actions/download-artifact@v4
with:
name: perspective-viewer-d3fc-dist
path: packages/perspective-viewer-d3fc/dist

- uses: actions/download-artifact@v4
with:
name: perspective-viewer-datagrid-dist
path: packages/perspective-viewer-datagrid/dist

- uses: actions/download-artifact@v4
with:
name: perspective-viewer-openlayers-dist
path: packages/perspective-viewer-openlayers/dist

- uses: actions/download-artifact@v4
with:
name: perspective-workspace-dist
path: packages/perspective-workspace/dist

- uses: actions/download-artifact@v4
with:
name: perspective-viewer-dist
path: rust/perspective-viewer/dist
name: perspective-js-dist
path: .

- name: Run Tests
run: pnpm run test
env:
PACKAGE: "!perspective-python,!perspective-jupyterlab"
PSP_USE_CCACHE: 1

# ,--,--' . .-,--. . .
# `- | ,-. ,-. |- '|__/ . . |- |-. ,-. ,-.
# , | |-' `-. | ,| | | | | | | | | |
# `-' `-' `-' `' `' `-| `' ' ' `-' ' '
# /|
# `-'
test_python:
needs: [build_python]
runs-on: ${{ matrix.os }}
Expand All @@ -334,6 +304,7 @@ jobs:
- name: Initialize Build
uses: ./.github/actions/install-deps
with:
llvm: "false"
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}

- uses: actions/download-artifact@v4
Expand Down

0 comments on commit 8cf1564

Please sign in to comment.