From 46343f39ae0513831b99995c6820481f9dd8f8f3 Mon Sep 17 00:00:00 2001 From: Andrew Stein Date: Mon, 14 Oct 2024 16:34:31 -0400 Subject: [PATCH] WIP Signed-off-by: Andrew Stein --- .github/workflows/build.yaml | 7 ++++++- rust/perspective-js/build.js | 4 +++- rust/perspective-python/build.mjs | 6 +++++- rust/perspective/build.mjs | 6 +++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e9ea605a0b..a41f1434c3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -152,9 +152,10 @@ jobs: skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }} - name: WebAssembly Build - run: pnpm run build --ci + run: pnpm run build env: PACKAGE: "perspective-cpp,perspective,perspective-viewer,perspective-viewer-datagrid,perspective-viewer-d3fc,perspective-viewer-openlayers,perspective-workspace,perspective-cli" + CI: 1 # PSP_USE_CCACHE: 1 - uses: actions/upload-artifact@v4 @@ -242,6 +243,7 @@ jobs: PSP_ARCH: ${{ matrix.arch }} PSP_ROOT_DIR: ${{ github.workspace }} PSP_BUILD_WHEEL: 1 + CI: 1 - name: Python Build (Windows) run: | @@ -254,6 +256,7 @@ jobs: PACKAGE: "perspective-python" PSP_ARCH: ${{ matrix.arch }} PSP_BUILD_WHEEL: 1 + CI: 1 # Windows sucks lol - uses: actions/upload-artifact@v4 @@ -323,6 +326,7 @@ jobs: env: PACKAGE: "perspective-rs" PSP_ROOT_DIR: ${{ github.workspace }} + CI: 1 - name: Rust Build (Windows) run: | @@ -493,6 +497,7 @@ jobs: run: pnpm run build env: PACKAGE: "perspective-jupyterlab" + CI: 1 - run: node tools/perspective-scripts/repack_wheel.mjs diff --git a/rust/perspective-js/build.js b/rust/perspective-js/build.js index d96a2443eb..8b4cf361a1 100644 --- a/rust/perspective-js/build.js +++ b/rust/perspective-js/build.js @@ -71,7 +71,9 @@ function get_host() { function build_rust() { const release_flag = IS_DEBUG ? "" : "--release"; execSync( - `PSP_ROOT_DIR=../.. cargo bundle --target=${get_host()} -- perspective_js ${release_flag} --features=export-init,external-cpp`, + `PSP_ROOT_DIR=../.. cargo bundle --target=${get_host()} -- perspective_js ${release_flag} --features=export-init${ + !process.env.CI ? ",external-cpp" : "" + }`, INHERIT ); } diff --git a/rust/perspective-python/build.mjs b/rust/perspective-python/build.mjs index 78fbd50835..cbdb30aaa1 100644 --- a/rust/perspective-python/build.mjs +++ b/rust/perspective-python/build.mjs @@ -101,7 +101,11 @@ if (build_sdist) { } if (!build_wheel && !build_sdist) { - cmd.sh(`maturin develop ${flags} --features=external-cpp`); + cmd.sh( + `maturin develop ${flags} ${ + !process.env.CI ? "--features=external-cpp" : "" + }` + ); } cmd.runSync(); diff --git a/rust/perspective/build.mjs b/rust/perspective/build.mjs index 378fe95f24..bc4a7a4dd6 100644 --- a/rust/perspective/build.mjs +++ b/rust/perspective/build.mjs @@ -40,5 +40,9 @@ if (process.env.PSP_ARCH === "x86_64" && process.platform === "darwin") { target = "--target=aarch64-unknown-linux-gnu"; } -cmd.sh(`cargo build ${flags} ${target} --features=external-cpp`); +cmd.sh( + `cargo build ${flags} ${target} ${ + !process.env.CI ? "--features=external-cpp" : "" + }` +); cmd.runSync();