chore: 添加第三方依赖库
This commit is contained in:
12
thirdparty/rapier.js/.github/FUNDING.yml
vendored
Normal file
12
thirdparty/rapier.js/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: ["dimforge"] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
154
thirdparty/rapier.js/.github/workflows/main.yml
vendored
Normal file
154
thirdparty/rapier.js/.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
name: main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
check-fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22.x"
|
||||
- run: npm ci
|
||||
- name: Check formatting
|
||||
run: npm run fmt -- --check
|
||||
- name: Check Rust formatting
|
||||
run: cargo fmt -- --check
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
RUSTFLAGS: -D warnings
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- run: npm ci;
|
||||
- name: Prepare no-compat builds
|
||||
run: |
|
||||
./builds/prepare_builds/prepare_all_projects.sh
|
||||
- name: Build all no-compat projects
|
||||
run: |
|
||||
./builds/prepare_builds/build_all_projects.sh
|
||||
# Install dependencies to check simd for builds
|
||||
- name: Install wabt
|
||||
run: |
|
||||
sudo apt install wabt;
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
- name: Install wabt
|
||||
run: |
|
||||
brew install wabt;
|
||||
if: matrix.os == 'macos-latest'
|
||||
# Check simd for rust builds
|
||||
- name: Check 2d simd rust build
|
||||
run: |
|
||||
if ! wasm-objdump -d builds/rapier2d-simd/pkg/rapier_wasm2d_bg.wasm | grep :\\sfd ; then
|
||||
>&2 echo "ERROR: 2d simd compat build does not include simd opcode prefix." && exit 1
|
||||
fi
|
||||
- name: Check 3d simd compat build
|
||||
run: |
|
||||
if ! wasm-objdump -d builds/rapier3d-simd/pkg/rapier_wasm3d_bg.wasm | grep :\\sfd ; then
|
||||
>&2 echo "ERROR: 3d simd compat build does not include simd opcode prefix." && exit 1
|
||||
fi
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pkg no-compat ${{ matrix.os }}
|
||||
path: |
|
||||
builds/*/pkg
|
||||
overwrite: true
|
||||
build-compat:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
RUSTFLAGS: -D warnings
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- run: npm ci;
|
||||
- name: Prepare compat builds
|
||||
run: |
|
||||
./builds/prepare_builds/prepare_all_projects.sh
|
||||
- name: Build rapier-compat
|
||||
run: |
|
||||
cd rapier-compat;
|
||||
npm ci;
|
||||
npm run build;
|
||||
npm run test;
|
||||
# Install dependencies to check simd for builds
|
||||
- name: Install wabt
|
||||
run: |
|
||||
sudo apt install wabt;
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
- name: Install wabt
|
||||
run: |
|
||||
brew install wabt;
|
||||
if: matrix.os == 'macos-latest'
|
||||
# Check simd for compat builds
|
||||
- name: Check 2d simd compat build
|
||||
run: |
|
||||
if ! wasm-objdump -d rapier-compat/builds/2d-simd/pkg/rapier_wasm2d_bg.wasm | grep :\\sfd ; then
|
||||
>&2 echo "ERROR: 2d simd compat build does not include simd opcode prefix." && exit 1;
|
||||
fi
|
||||
- name: Check 3d simd compat build
|
||||
run: |
|
||||
if ! wasm-objdump -d rapier-compat/builds/3d-simd/pkg/rapier_wasm3d_bg.wasm | grep :\\sfd ; then
|
||||
>&2 echo "ERROR: 3d simd compat build does not include simd opcode prefix." && exit 1;
|
||||
fi
|
||||
# Upload
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pkg compat ${{ matrix.os }}
|
||||
path: |
|
||||
rapier-compat/builds/*/pkg
|
||||
overwrite: true
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, build-compat]
|
||||
if: github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: pkg no-compat ubuntu-latest
|
||||
path: builds
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: pkg compat ubuntu-latest
|
||||
path: rapier-compat/builds
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- name: Publish projects
|
||||
run: |
|
||||
./publish_all_canary.sh
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in New Issue
Block a user