Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/actions/config/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ outputs:
value: ${{ steps.setuppush.outputs.SKIP_CI || steps.setuppr.outputs.SKIP_CI || steps.setupmanual.outputs.SKIP_CI }}
SKIP_CACHE:
value: ${{ steps.setuppush.outputs.SKIP_CACHE || steps.setuppr.outputs.SKIP_CACHE || steps.setupmanual.outputs.SKIP_CACHE }}
SAVE_CACHE:
value: ${{ steps.setuppush.outputs.SAVE_CACHE || steps.setuppr.outputs.SAVE_CACHE || steps.setupmanual.outputs.SAVE_CACHE }}
FULL_RUN:
value: ${{ steps.setuppush.outputs.FULL_RUN || steps.setuppr.outputs.FULL_RUN || steps.setupmanual.outputs.FULL_RUN }}
PUBLISH_RELEASE:
Expand Down Expand Up @@ -54,13 +56,15 @@ runs:
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "SKIP_CI=$SKIP_CI" >> $GITHUB_OUTPUT
echo "SKIP_CACHE=$SKIP_CACHE" >> $GITHUB_OUTPUT
echo "SAVE_CACHE=$SAVE_CACHE" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
echo "PUBLISH_RELEASE=$PUBLISH_RELEASE" >> $GITHUB_OUTPUT
echo "SKIP_PYTHON=$SKIP_PYTHON" >> $GITHUB_OUTPUT
echo "INCLUDE_WINDOWS=$INCLUDE_WINDOWS" >> $GITHUB_OUTPUT
env:
SKIP_CI: ${{ contains(github.event.head_commit.message, '[ci-skip]') }}
SKIP_CACHE: ${{ contains(github.event.head_commit.message, '[ci-skip-cache]') }}
SAVE_CACHE: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'v') }}
FULL_RUN: ${{ startsWith(github.ref_name, 'v') || contains(github.event.head_commit.message, '[ci-full]') || github.ref_name == 'master' }}
PUBLISH_RELEASE: ${{ startsWith(github.ref_name, 'v') }}
SKIP_PYTHON: ${{ contains(github.event.head_commit.message, '[ci-skip-python]') }}
Expand All @@ -81,13 +85,15 @@ runs:
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "SKIP_CI=$SKIP_CI" >> $GITHUB_OUTPUT
echo "SKIP_CACHE=$SKIP_CACHE" >> $GITHUB_OUTPUT
echo "SAVE_CACHE=$SAVE_CACHE" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
echo "PUBLISH_RELEASE=$PUBLISH_RELEASE" >> $GITHUB_OUTPUT
echo "SKIP_PYTHON=$SKIP_PYTHON" >> $GITHUB_OUTPUT
echo "INCLUDE_WINDOWS=$INCLUDE_WINDOWS" >> $GITHUB_OUTPUT
env:
SKIP_CI: ${{ contains(github.event.pull_request.title, '[ci-skip]') || contains(github.event.head_commit.message, '[ci-skip]') }}
SKIP_CACHE: ${{ contains(github.event.pull_request.title, '[ci-skip-cache]') || contains(github.event.head_commit.message, '[ci-skip-cache]') }}
SAVE_CACHE: "false"
FULL_RUN: ${{ contains(github.event.pull_request.title, '[ci-full]') || contains(github.event.head_commit.message, '[ci-full]') }}
PUBLISH_RELEASE: ${{ startsWith(github.ref_name, 'v') }}
SKIP_PYTHON: ${{ contains(github.event.pull_request.title, '[ci-skip-python]') || contains(github.event.head_commit.message, '[ci-skip-python]') }}
Expand All @@ -108,13 +114,15 @@ runs:
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "SKIP_CI=$SKIP_CI" >> $GITHUB_OUTPUT
echo "SKIP_CACHE=$SKIP_CACHE" >> $GITHUB_OUTPUT
echo "SAVE_CACHE=$SAVE_CACHE" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
echo "PUBLISH_RELEASE=$PUBLISH_RELEASE" >> $GITHUB_OUTPUT
echo "SKIP_PYTHON=$SKIP_PYTHON" >> $GITHUB_OUTPUT
echo "INCLUDE_WINDOWS=$INCLUDE_WINDOWS" >> $GITHUB_OUTPUT
env:
SKIP_CI: false
SKIP_CACHE: ${{ github.event.inputs.ci-skip-cache }}
SAVE_CACHE: "true"
FULL_RUN: ${{ github.event.inputs.ci-full }}
PUBLISH_RELEASE: ${{ startsWith(github.ref_name, 'v') }}
SKIP_PYTHON: ${{ github.event.inputs.ci-skip-python }}
Expand Down
38 changes: 28 additions & 10 deletions .github/actions/install-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ inputs:
ccache:
default: ""
description: "Install ccache with this cache key (empty = disabled); build steps must also set PSP_USE_CCACHE"
ccache_variant:
default: "ccache"
description: "'ccache' or 'sccache'; sccache also caches rustc when the build step sets RUSTC_WRAPPER, and is the stable choice for MSVC"
emsdk_cache:
default: ""
description: "Cache the .emsdk toolchain + generated sysroot under this key suffix (empty = disabled)"
cargo_cache:
default: "true"
description: "Cache the cargo registry. Disable for jobs which use rust-cache, which caches ~/.cargo itself"
cache_save:
default: "true"
description: "Save the ccache/sccache dir at job end (restore is unconditional). Pass config's SAVE_CACHE so PR runs don't duplicate master's entries against the 10G repo cap"

runs:
using: "composite"
Expand Down Expand Up @@ -83,31 +95,35 @@ runs:
with:
version: 9

# emsdk installs to `<workspace>/.emsdk` (`install_emsdk.mjs`), and
# the emscripten sysroot libraries generated during the first build
# land inside it, so a post-build save skips both the clone and the
# ~2.5min sysroot generation. Keyed per wasm32/wasm64 job because the
# sysroots differ and only the first save under a key wins.
- name: Setup emsdk cache
uses: actions/cache@v4
id: emsdk-cache
if: ${{ inputs.skip_cache == 'false' && inputs.javascript == 'true' }}
if: ${{ inputs.skip_cache == 'false' && inputs.emsdk_cache != '' }}
with:
path: |
~/boost_1_82_0/
~/.emsdk/
~/.llvm/
key: ${{ runner.os }}-emsdk-${{ hashFiles('package.json') }}
path: .emsdk/
key: ${{ runner.os }}-emsdk-${{ inputs.emsdk_cache }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-emsdk-
${{ runner.os }}-emsdk-${{ inputs.emsdk_cache }}-

# Only the manylinux container jobs need this; everywhere else
# `setup-python` provides its own pip cache.
- name: Setup pip cache
uses: actions/cache@v4
if: ${{ inputs.skip_cache == 'false' && inputs.python == 'true' }}
if: ${{ inputs.skip_cache == 'false' && inputs.python == 'true' && inputs.manylinux == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
key: ${{ runner.os }}-pip-${{ hashFiles('rust/perspective-python/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Setup cargo cache
uses: actions/cache@v4
if: ${{ inputs.skip_cache == 'false' && inputs.rust == 'true' }}
if: ${{ inputs.skip_cache == 'false' && inputs.rust == 'true' && inputs.cargo_cache == 'true' }}
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
Expand All @@ -123,6 +139,8 @@ runs:
if: ${{ inputs.ccache != '' && inputs.skip_cache == 'false' }}
with:
key: ${{ inputs.ccache }}
variant: ${{ inputs.ccache_variant }}
save: ${{ inputs.cache_save }}
max-size: "1G"

# https://github.com/apache/arrow/issues/38391
Expand Down
11 changes: 7 additions & 4 deletions .github/actions/install-wheel/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,29 @@ inputs:
inplace:
default: "true"
description: "Install in-place?"
glob:
default: "*.whl"
description: "Wheel filename glob; narrow this when wheels for multiple platforms share the working directory"

runs:
using: "composite"
steps:
- name: Install wheel (Linux)
shell: sh
run: python -m pip install -U --no-dependencies *.whl --target rust/perspective-python
run: python -m pip install -U --no-dependencies ${{ inputs.glob }} --target rust/perspective-python
if: ${{ inputs.inplace == 'true' && runner.os == 'Linux' }}

- name: Install wheel (Linux)
shell: sh
run: python -m pip install -U --no-dependencies *.whl
run: python -m pip install -U --no-dependencies ${{ inputs.glob }}
if: ${{ inputs.inplace != 'true' && runner.os == 'Linux' }}

- name: Install wheel (OSX)
shell: sh
run: python -m pip install -U --no-dependencies *.whl --target rust/perspective-python
run: python -m pip install -U --no-dependencies ${{ inputs.glob }} --target rust/perspective-python
if: ${{ runner.os == 'macOS' }}

- name: Install wheel (Windows)
shell: pwsh
run: python -m pip install -U --no-dependencies (Get-ChildItem .\*.whl | Select-Object -Expand FullName) --target rust/perspective-python
run: python -m pip install -U --no-dependencies (Get-ChildItem .\${{ inputs.glob }} | Select-Object -Expand FullName) --target rust/perspective-python
if: ${{ runner.os == 'Windows' }}
Loading
Loading