Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Stein <[email protected]>
  • Loading branch information
texodus committed Sep 30, 2024
1 parent 09d3922 commit c641705
Show file tree
Hide file tree
Showing 16 changed files with 144 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
using: "composite"
steps:
- name: Clean System
uses: AdityaGarg8/remove-unwanted-software@v3
uses: AdityaGarg8/remove-unwanted-software@v4.1
if: ${{ inputs.clean == 'true' && runner.os != 'Windows' }}
with:
remove-android: "true"
Expand Down
90 changes: 80 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,55 @@ concurrency:
cancel-in-progress: true

jobs:
# , . . .-,--.
# ) . ,-. |- ,-. ,-. ,-| ' | \ ,-. ,-. ,-.
# / | | | | ,-| | | | | , | / | | | `-.
# `--' ' ' ' `' `-^ ' ' `-^ `-^--' `-' `-' `-'
#
lint_and_docs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
python-version:
- 3.9
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Config
id: config-step
uses: ./.github/actions/config

- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
with:
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}

- name: Metadata Build
run: pnpm run build --ci
env:
PACKAGE: "perspective-metadata"

# - name: Lint
# run: pnpm run lint

# - name: Docs Build
# run: pnpm run docs

- uses: actions/upload-artifact@v4
with:
name: perspective-metadata
path: |
rust/perspective-client/src/
rust/perspective-client/docs/
rust/perspective-js/src/
# ,-,---. . . ,-_/ .---. .
# '|___/ . . . | ,-| ' | ,-. . , ,-. \___ ,-. ,-. . ,-. |-
# ,| \ | | | | | | | ,-| | / ,-| \ | | | | | |
Expand All @@ -67,6 +116,7 @@ jobs:
# `--' '
build_js:
runs-on: ${{ matrix.os }}
needs: [lint_and_docs]
strategy:
fail-fast: false
matrix:
Expand All @@ -84,6 +134,11 @@ jobs:
id: config-step
uses: ./.github/actions/config

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

- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
Expand All @@ -95,11 +150,11 @@ jobs:
- name: WebAssembly Build
run: pnpm run build --ci
env:
PACKAGE: "perspective-cpp,perspective,perspective-metadata,perspective-viewer,perspective-viewer-datagrid,perspective-viewer-d3fc,perspective-viewer-openlayers,perspective-workspace,perspective-cli"
PACKAGE: "perspective-cpp,perspective,perspective-viewer,perspective-viewer-datagrid,perspective-viewer-d3fc,perspective-viewer-openlayers,perspective-workspace,perspective-cli"
# PSP_USE_CCACHE: 1

- name: Lint
run: pnpm run lint
# - name: Lint
# run: pnpm run lint

# - name: Docs Build
# run: pnpm run docs
Expand Down Expand Up @@ -130,6 +185,7 @@ jobs:
# `-'
build_python:
runs-on: ${{ matrix.os }}
needs: [lint_and_docs]
container: ${{ matrix.container }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -169,6 +225,11 @@ jobs:
id: config-step
uses: ./.github/actions/config

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

- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
Expand All @@ -192,7 +253,7 @@ jobs:
run: pnpm run build
if: ${{ !contains(matrix.os, 'windows') }}
env:
PACKAGE: "perspective-metadata,perspective-python"
PACKAGE: "perspective-python"
PSP_ARCH: ${{ matrix.arch }}
PSP_ROOT_DIR: ${{ github.workspace }}
PSP_BUILD_WHEEL: 1
Expand Down Expand Up @@ -235,6 +296,7 @@ jobs:
#
build_and_test_rust:
runs-on: ${{ matrix.os }}
needs: [lint_and_docs]
strategy:
fail-fast: false
matrix:
Expand All @@ -257,6 +319,11 @@ jobs:
id: config-step
uses: ./.github/actions/config

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

- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
Expand All @@ -273,7 +340,7 @@ jobs:
run: pnpm run build
if: ${{ !contains(matrix.os, 'windows') }}
env:
PACKAGE: "perspective-metadata,perspective-rs"
PACKAGE: "perspective-rs"
PSP_ROOT_DIR: ${{ github.workspace }}

- name: Python Build (Windows)
Expand Down Expand Up @@ -323,6 +390,7 @@ jobs:
# `-'
build_emscripten_wheel:
runs-on: ${{ matrix.os }}
needs: [lint_and_docs]
# if: ${{ startsWith(github.ref, 'refs/tags/v') }}
strategy:
fail-fast: false
Expand All @@ -342,6 +410,11 @@ jobs:
id: config-step
uses: ./.github/actions/config

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

- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
Expand All @@ -355,7 +428,7 @@ jobs:
- name: Python Build Pyodide
run: pnpm install && pnpm run build
env:
PACKAGE: "perspective-metadata,perspective-pyodide"
PACKAGE: "perspective-pyodide"

- name: "Test Pyodide"
run: pnpm run test
Expand Down Expand Up @@ -700,6 +773,7 @@ jobs:
benchmark_python,
build_emscripten_wheel,
build_and_test_rust,
lint_and_docs,
]
if: startsWith(github.ref, 'refs/tags/v')
strategy:
Expand Down Expand Up @@ -763,10 +837,6 @@ jobs:
with:
name: perspective-rust

# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-benchmarks

- run: pnpm pack --pack-destination=../..
working-directory: ./rust/perspective-js

Expand Down
2 changes: 1 addition & 1 deletion examples/python-aiohttp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"devDependencies": {
"@finos/perspective-webpack-plugin": "workspace:^",
"npm-run-all": "^4.1.3",
"rimraf": "^2.5.2"
"rimraf": "^6"
}
}
2 changes: 1 addition & 1 deletion examples/python-starlette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"devDependencies": {
"@finos/perspective-webpack-plugin": "workspace:^",
"npm-run-all": "^4.1.3",
"rimraf": "^2.5.2"
"rimraf": "^6"
}
}
2 changes: 1 addition & 1 deletion examples/python-tornado-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"devDependencies": {
"@finos/perspective-webpack-plugin": "workspace:^",
"npm-run-all": "^4.1.3",
"rimraf": "^2.5.2"
"rimraf": "^6"
}
}
2 changes: 1 addition & 1 deletion examples/python-tornado/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"devDependencies": {
"@finos/perspective-webpack-plugin": "workspace:^",
"npm-run-all": "^4.1.3",
"rimraf": "^2.5.2"
"rimraf": "^6"
}
}
2 changes: 1 addition & 1 deletion examples/workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@finos/perspective-webpack-plugin": "workspace:^",
"http-server": "^14.1.1",
"npm-run-all": "^4.1.3",
"rimraf": "^2.5.2"
"rimraf": "^6"
}
}
35 changes: 13 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ packages:
- "tools/perspective-scripts"
- "tools/perspective-bench"
- "cpp/perspective"
- "packages/perspective-client"
- "packages/perspective-esbuild-plugin"
- "packages/perspective-viewer-datagrid"
- "packages/perspective-viewer-d3fc"
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-client/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn prost_build() -> Result<()> {
// This source file is included at `publish` time, but not `sbuild` time
// because it is initially generated from the `perspective.proto` definition
// in the C++ source.
if std::env::var("CARGO_FEATURE_EXTERNAL_PROTO").is_ok() {
if std::env::var("CARGO_FEATURE_EXTERNAL_PROTO").is_ok() || cfg!(clippy) {
println!("cargo:warning=MESSAGE Building in development mode");
let root_dir_env = std::env::var("PSP_ROOT_DIR").expect("Must set PSP_ROOT_DIR");
let root_dir = Path::new(root_dir_env.as_str());
Expand Down
18 changes: 18 additions & 0 deletions rust/perspective-client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@finos/perspective-client",
"version": "3.1.0",
"description": "",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/finos/perspective"
},
"type": "module",
"license": "Apache-2.0",
"scripts": {
"clean": "rimraf src/rust/proto.rs"
},
"devDependencies": {
"rimraf": "^6"
}
}
2 changes: 1 addition & 1 deletion rust/perspective-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"types": "./dist/esm/perspective.d.ts",
"scripts": {
"build": "node ./build.js",
"clean": "rimraf dist && rimraf build",
"clean": "rimraf dist && rimraf build && rimraf src/ts/ts-rs",
"docs": "cargo doc"
},
"publishConfig": {
Expand Down
Loading

0 comments on commit c641705

Please sign in to comment.