chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:25:07 +08:00
commit a26e856398
1681 changed files with 296950 additions and 0 deletions
+122
View File
@@ -0,0 +1,122 @@
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
# ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
# ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
# ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
# ┃ Copyright (c) 2017, the Perspective Authors. ┃
# ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
# ┃ This file is part of the Perspective library, distributed under the terms ┃
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
name: "Parse build configuration"
description: "Parses the build configuration into something easy to consume"
outputs:
SKIP_CI:
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 }}
FULL_RUN:
value: ${{ steps.setuppush.outputs.FULL_RUN || steps.setuppr.outputs.FULL_RUN || steps.setupmanual.outputs.FULL_RUN }}
PUBLISH_RELEASE:
value: ${{ steps.setuppush.outputs.PUBLISH_RELEASE || steps.setuppr.outputs.PUBLISH_RELEASE || steps.setupmanual.outputs.PUBLISH_RELEASE }}
SKIP_PYTHON:
value: ${{ steps.setuppush.outputs.SKIP_PYTHON || steps.setuppr.outputs.SKIP_PYTHON || steps.setupmanual.outputs.SKIP_PYTHON }}
INCLUDE_WINDOWS:
value: ${{ steps.setuppush.outputs.INCLUDE_WINDOWS || steps.setuppr.outputs.INCLUDE_WINDOWS || steps.setupmanual.outputs.INCLUDE_WINDOWS }}
runs:
using: "composite"
steps:
- name: Get Commit Message
shell: bash
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B HEAD | tr '\n' ' ')" >> $GITHUB_ENV
if: ${{ github.event_name == 'push' }}
- name: Get Commit Message
shell: bash
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B HEAD^2 | tr '\n' ' ')" >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}
- name: Display and Setup Build Args (Push)
shell: bash
id: setuppush
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Skip CI: $SKIP_CI"
echo "Skip Cache: $SKIP_CACHE"
echo "Full Run: $FULL_RUN"
echo "Publish Release: $PUBLISH_RELEASE"
echo "Skip Python: $SKIP_PYTHON"
echo "Include Windows: $INCLUDE_WINDOWS"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "SKIP_CI=$SKIP_CI" >> $GITHUB_OUTPUT
echo "SKIP_CACHE=$SKIP_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]') }}
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]') }}
INCLUDE_WINDOWS: ${{ contains(github.event.head_commit.message, '[ci-include-windows]') }}
if: ${{ github.event_name == 'push' }}
- name: Display and Setup Build Args (PR)
shell: bash
id: setuppr
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Skip CI: $SKIP_CI"
echo "Skip Cache: $SKIP_CACHE"
echo "Full Run: $FULL_RUN"
echo "Publish Release: $PUBLISH_RELEASE"
echo "Skip Python: $SKIP_PYTHON"
echo "Include Windows: $INCLUDE_WINDOWS"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "SKIP_CI=$SKIP_CI" >> $GITHUB_OUTPUT
echo "SKIP_CACHE=$SKIP_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]') }}
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]') }}
INCLUDE_WINDOWS: ${{ contains(github.event.pull_request.title, '[ci-include-windows]') || contains(github.event.head_commit.message, '[ci-include-windows]') }}
if: ${{ github.event_name == 'pull_request' }}
- name: Display and Setup Build Args (Manual)
id: setupmanual
shell: bash
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Skip CI: $SKIP_CI"
echo "Skip Cache: $SKIP_CACHE"
echo "Full Run: $FULL_RUN"
echo "Publish Release: $PUBLISH_RELEASE"
echo "Skip Python: $SKIP_PYTHON"
echo "Include Windows: $INCLUDE_WINDOWS"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "SKIP_CI=$SKIP_CI" >> $GITHUB_OUTPUT
echo "SKIP_CACHE=$SKIP_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 }}
FULL_RUN: ${{ github.event.inputs.ci-full }}
PUBLISH_RELEASE: ${{ startsWith(github.ref_name, 'v') }}
SKIP_PYTHON: ${{ github.event.inputs.ci-skip-python }}
INCLUDE_WINDOWS: ${{ github.event.inputs.ci-include-windows }}
if: ${{ github.event_name == 'workflow_dispatch' }}
+247
View File
@@ -0,0 +1,247 @@
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
# ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
# ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
# ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
# ┃ Copyright (c) 2017, the Perspective Authors. ┃
# ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
# ┃ This file is part of the Perspective library, distributed under the terms ┃
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
name: "Install Dependencies"
description: "Install and cache the project's myraid dependencies"
inputs:
javascript:
default: "true"
description: "Install pnpm postinstall steps, playwright browsers and emsdk?"
arch:
default: ""
description: "Architecture"
manylinux:
default: "false"
description: "Deal with manylinux exceptions"
cpp:
default: "true"
description: "Install Boost and LLVM?"
rust:
default: "true"
description: "Install Rust toolchain?"
python:
default: "true"
description: "Install Python dependencies?"
playwright:
default: "false"
description: "Install browsers for playwright testing"
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"
runs:
using: "composite"
steps:
- name: Clean System
uses: AdityaGarg8/remove-unwanted-software@v5
if: ${{ inputs.clean == 'true' && runner.os != 'Windows' }}
with:
remove-android: "true"
remove-dotnet: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
remove-large-packages: "true"
remove-cached-tools: "true"
# Sticking to 3.29 because of:
# https://github.com/open-telemetry/opentelemetry-cpp/issues/2998
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.29.6"
- name: Setup MSVC environment (Windows)
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ inputs.arch == 'aarch64' && 'amd64_arm64' || 'x64' }}
- name: Force Ninja generator (Windows)
if: ${{ runner.os == 'Windows' }}
shell: bash
run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Setup emsdk cache
uses: actions/cache@v4
id: emsdk-cache
if: ${{ inputs.skip_cache == 'false' && inputs.javascript == 'true' }}
with:
path: |
~/boost_1_82_0/
~/.emsdk/
~/.llvm/
key: ${{ runner.os }}-emsdk-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-emsdk-
- name: Setup pip cache
uses: actions/cache@v4
if: ${{ inputs.skip_cache == 'false' && inputs.python == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Setup cargo cache
uses: actions/cache@v4
if: ${{ inputs.skip_cache == 'false' && inputs.rust == 'true' }}
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
restore-keys: |
${{ runner.os }}-cargo-
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1.2
# if: ${{ inputs.skip_cache == 'false' }}
# with:
# key: ${{ github.job }}-${{ matrix.os }}
# https://github.com/apache/arrow/issues/38391
- if: ${{ runner.os == 'macOS' }}
shell: bash
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)" >> $GITHUB_ENV
# Use python 3.12 from manylinu
- run: echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
shell: bash
if: ${{ runner.os == 'Linux' }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
if: ${{ inputs.python == 'true' && inputs.manylinux == 'false' }}
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
# - run: |
# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
# python get-pip.py --ignore-installed
# pip debug --verbose
# shell: bash
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
- name: Install rust
uses: dtolnay/rust-toolchain@nightly
if: ${{ inputs.rust == 'true' && inputs.arch != 'aarch64' }}
with:
toolchain: nightly-2026-01-01
targets: wasm32-unknown-unknown
components: rustfmt, clippy, rust-src
- name: Install rust (aarch64 OSX)
uses: dtolnay/rust-toolchain@nightly
if: ${{ inputs.rust == 'true' && inputs.arch == 'aarch64' && runner.os == 'macOS' }}
with:
toolchain: nightly-2026-01-01
targets: aarch64-apple-darwin
components: rust-src
- name: Install rust (aarch64 Linux)
uses: dtolnay/rust-toolchain@nightly
if: ${{ inputs.rust == 'true' && inputs.arch == 'aarch64' && runner.os == 'Linux' }}
with:
toolchain: nightly-2026-01-01
targets: aarch64-unknown-linux-gnu
components: rust-src
# Did you see a CI error of the form:
#
# error: failed to install component: 'clippy-preview-aarch64-unknown-linux-gnu',
# detected conflict: 'bin/cargo-clippy'
#
# See https://github.com/rust-lang/rustup/issues/988#issuecomment-1820438467
- name: Stupid cargo hack
shell: bash
run: cargo version
# # TODO doesn't work.
# - name: Install LLVM 17
# if: ${{ inputs.cpp == 'true' }}
# uses: KyleMayes/install-llvm-action@v2
# with:
# version: "17"
# directory: "./.llvm"
# cached: true
- name: Install JS dependencies
shell: bash
if: ${{ inputs.javascript == 'true' && inputs.playwright == 'true' }}
run: pnpm install
- name: Install JS dependencies
shell: bash
if: ${{ inputs.javascript == 'false' || inputs.playwright == 'false'}}
run: pnpm install --ignore-scripts
- name: Template version
shell: bash
if: ${{ !startsWith(github.ref_name, 'v') }}
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
node tools/scripts/version.mjs --nightly
- name: Install Python dependencies
shell: bash
if: ${{ inputs.python == 'true' && inputs.manylinux == 'false' }}
run: python -m pip install -r rust/perspective-python/requirements.txt
- name: Install Python dependencies
shell: bash
if: ${{ inputs.python == 'true' && inputs.manylinux == 'true' }}
run: /opt/python/cp311-cp311/bin/python -m pip install -r rust/perspective-python/requirements.txt
- name: manylinux deps
shell: bash
run: |
if [ -x "$(command -v dnf)" ]; then
dnf install wget -y
fi
if: ${{ runner.os == 'Linux' && inputs.cpp == 'true' && inputs.javascript == 'false' }}
# - name: Install CCache
# shell: bash
# run: sudo apt install -y ccache
# if: ${{ runner.os == 'Linux' }}
# Arrow cannot install on windows without this
# https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows
# https://github.com/orgs/community/discussions/26952
- run: git config --system core.longpaths true
shell: pwsh
if: ${{ runner.os == 'Windows' }}
# - name: Free up disk space
# if: ${{ runner.os == 'Linux' }}
# run: |
# rm -rf /__t/*
+42
View File
@@ -0,0 +1,42 @@
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
# ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
# ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
# ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
# ┃ Copyright (c) 2017, the Perspective Authors. ┃
# ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
# ┃ This file is part of the Perspective library, distributed under the terms ┃
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
name: "Install wheel"
description: "Installs the wheel depending on build platform, because Python"
inputs:
inplace:
default: "true"
description: "Install in-place?"
runs:
using: "composite"
steps:
- name: Install wheel (Linux)
shell: sh
run: python -m pip install -U --no-dependencies *.whl --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
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
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
if: ${{ runner.os == 'Windows' }}