Skip to content

Commit

Permalink
deps src: Automatic update
Browse files Browse the repository at this point in the history
  • Loading branch information
marvim committed Jan 28, 2025
1 parent c1966a4 commit ab2790b
Show file tree
Hide file tree
Showing 292 changed files with 31,710 additions and 14,030 deletions.
30 changes: 15 additions & 15 deletions src/treesitter-stamp/download-treesitter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ function(check_file_hash has_hash hash_is_good)
set("${has_hash}" TRUE PARENT_SCOPE)

message(VERBOSE "verifying file...
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz'")
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz'")

file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz" actual_value)
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz" actual_value)

if(NOT "${actual_value}" STREQUAL "7cbc13c974d6abe978cafc9da12d1e79e07e365c42af75e43ec1b5cdc03ed447")
if(NOT "${actual_value}" STREQUAL "cbdea399736b55d61cfb581bc8d80620d487f4ec8f8d60b7fe00406e39a98d6d")
set("${hash_is_good}" FALSE PARENT_SCOPE)
message(VERBOSE "SHA256 hash of
/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz
/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz
does not match expected value
expected: '7cbc13c974d6abe978cafc9da12d1e79e07e365c42af75e43ec1b5cdc03ed447'
expected: 'cbdea399736b55d61cfb581bc8d80620d487f4ec8f8d60b7fe00406e39a98d6d'
actual: '${actual_value}'")
else()
set("${hash_is_good}" TRUE PARENT_SCOPE)
Expand Down Expand Up @@ -71,32 +71,32 @@ function(sleep_before_download attempt)
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}")
endfunction()

if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz")
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz")
check_file_hash(has_hash hash_is_good)
if(has_hash)
if(hash_is_good)
message(VERBOSE "File already exists and hash match (skip download):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz'
SHA256='7cbc13c974d6abe978cafc9da12d1e79e07e365c42af75e43ec1b5cdc03ed447'"
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz'
SHA256='cbdea399736b55d61cfb581bc8d80620d487f4ec8f8d60b7fe00406e39a98d6d'"
)
return()
else()
message(VERBOSE "File already exists but hash mismatch. Removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz")
endif()
else()
message(VERBOSE "File already exists but no hash specified (use URL_HASH):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz'
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz'
Old file will be removed and new file downloaded from URL."
)
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz")
endif()
endif()

set(retry_number 5)

message(VERBOSE "Downloading...
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz'
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz'
timeout='none'
inactivity timeout='none'"
)
Expand All @@ -107,7 +107,7 @@ foreach(i RANGE ${retry_number})
if(status_code IN_LIST download_retry_codes)
sleep_before_download(${i})
endif()
foreach(url IN ITEMS [====[https://github.com/tree-sitter/tree-sitter/archive/v0.24.7.tar.gz]====])
foreach(url IN ITEMS [====[https://github.com/tree-sitter/tree-sitter/archive/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz]====])
if(NOT url IN_LIST skip_url_list)
message(VERBOSE "Using src='${url}'")

Expand All @@ -119,7 +119,7 @@ foreach(i RANGE ${retry_number})

file(
DOWNLOAD
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz"
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz"

# no TIMEOUT
# no INACTIVITY_TIMEOUT
Expand All @@ -136,7 +136,7 @@ foreach(i RANGE ${retry_number})
check_file_hash(has_hash hash_is_good)
if(has_hash AND NOT hash_is_good)
message(VERBOSE "Hash mismatch, removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz")
else()
message(VERBOSE "Downloading... done")
return()
Expand Down
2 changes: 1 addition & 1 deletion src/treesitter-stamp/extract-treesitter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION ${CMAKE_VERSION}) # this file comes with cmake

# Make file names absolute:
#
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.7.tar.gz" ABSOLUTE)
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz" ABSOLUTE)
get_filename_component(directory "/home/runner/work/deps/deps/neovim/deps/build/src/treesitter" ABSOLUTE)

message(VERBOSE "extracting...
Expand Down
4 changes: 2 additions & 2 deletions src/treesitter-stamp/treesitter-urlinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ method=url
command=/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter-stamp/download-treesitter.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter-stamp/verify-treesitter.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter-stamp/extract-treesitter.cmake
source_dir=/home/runner/work/deps/deps/neovim/deps/build/src/treesitter
work_dir=/home/runner/work/deps/deps/neovim/deps/build/src
url(s)=https://github.com/tree-sitter/tree-sitter/archive/v0.24.7.tar.gz
hash=SHA256=7cbc13c974d6abe978cafc9da12d1e79e07e365c42af75e43ec1b5cdc03ed447
url(s)=https://github.com/tree-sitter/tree-sitter/archive/9515be4fc16d3dfe6fba5ae4a7a058f32bcf535d.tar.gz
hash=SHA256=cbdea399736b55d61cfb581bc8d80620d487f4ec8f8d60b7fe00406e39a98d6d
no_extract=

15 changes: 15 additions & 0 deletions src/treesitter/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: tree-sitter
patreon: # Replace with a single Patreon username
open_collective: tree-sitter # Replace with a single Open Collective username
ko_fi: amaanq
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
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
2 changes: 2 additions & 0 deletions src/treesitter/.github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ body:
attributes:
label: "Steps to reproduce"
placeholder: |
```sh
git clone --depth=1 https://github.com/tree-sitter/tree-sitter-ruby
cd tree-sitter-ruby
tree-sitter generate
```
validations:
required: true

Expand Down
3 changes: 3 additions & 0 deletions src/treesitter/.github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ runs:
target/release/tree-sitter-*.wasm
key: fixtures-${{ join(matrix.*, '_') }}-${{ hashFiles(
'cli/generate/src/**',
'lib/src/parser.h',
'lib/src/array.h',
'lib/src/alloc.h',
'xtask/src/*',
'test/fixtures/grammars/*/**/src/*.c',
'.github/actions/cache/action.yml') }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ body = """
{% for commit in commits%}\
{% if not commit.scope %}\
- {{ commit.message | upper_first }}\
{% if commit.github.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.github.pr_number }}>){%- endif %}
{% if commit.remote.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.remote.pr_number }}>){%- endif %}
{% endif %}\
{% endfor %}\
{% for group, commits in commits | group_by(attribute="scope") %}\
{% for commit in commits %}\
- **{{commit.scope}}**: {{ commit.message | upper_first }}\
{% if commit.github.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.github.pr_number }}>){%- endif %}
{% if commit.remote.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.remote.pr_number }}>){%- endif %}
{% endfor %}\
{% endfor %}
{% endfor %}
Expand Down
30 changes: 30 additions & 0 deletions src/treesitter/.github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check Bindgen Output

on:
pull_request:
paths:
- lib/include/tree_sitter/api.h
- lib/binding_rust/bindings.rs
push:
branches: [master]
paths:
- lib/include/tree_sitter/api.h
- lib/binding_rust/bindings.rs

jobs:
check-bindgen:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up stable Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Generate bindings
run: cargo xtask generate-bindings

- name: Check if the bindgen output changed
run: git diff --exit-code lib/binding_rust/bindings.rs
46 changes: 33 additions & 13 deletions src/treesitter/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ jobs:
# When adding a new `target`:
# 1. Define a new platform alias above
# 2. Add a new record to the matrix map in `cli/npm/install.js`
- { platform: linux-arm64 , target: aarch64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
- { platform: linux-arm , target: arm-unknown-linux-gnueabi , os: ubuntu-latest , use-cross: true }
- { platform: linux-x64 , target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 , features: wasm } # See #2272
- { platform: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
- { platform: linux-powerpc64 , target: powerpc64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
- { platform: windows-arm64 , target: aarch64-pc-windows-msvc , os: windows-latest }
- { platform: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest , features: wasm }
- { platform: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest }
- { platform: macos-arm64 , target: aarch64-apple-darwin , os: macos-14 , features: wasm }
- { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-13 , features: wasm }
- { platform: linux-arm64 , target: aarch64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
- { platform: linux-arm , target: arm-unknown-linux-gnueabi , os: ubuntu-latest , use-cross: true }
- { platform: linux-x64 , target: x86_64-unknown-linux-gnu , os: ubuntu-latest , features: wasm }
- { platform: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
- { platform: linux-powerpc64 , target: powerpc64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
- { platform: windows-arm64 , target: aarch64-pc-windows-msvc , os: windows-latest }
- { platform: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest , features: wasm }
- { platform: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest }
- { platform: macos-arm64 , target: aarch64-apple-darwin , os: macos-latest , features: wasm }
- { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-13 , features: wasm }

# Cross compilers for C library
- { platform: linux-arm64 , cc: aarch64-linux-gnu-gcc , ar: aarch64-linux-gnu-ar }
Expand Down Expand Up @@ -88,7 +88,11 @@ jobs:

- name: Install cross
if: ${{ matrix.use-cross }}
run: RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross
run: |
if [ ! -x "$(command -v cross)" ]; then
# TODO: Remove 'RUSTFLAGS=""' once https://github.com/cross-rs/cross/issues/1561 is resolved
RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross
fi
- name: Configure cross
if: ${{ matrix.use-cross }}
Expand Down Expand Up @@ -152,7 +156,6 @@ jobs:
printf 'CMAKE_PREFIX_PATH=%s\n' "$PWD/artifacts" >> $GITHUB_ENV
env:
WASMTIME_REPO: https://github.com/bytecodealliance/wasmtime
RUSTFLAGS: ""

- name: Build C library (make)
if: ${{ runner.os != 'Windows' }}
Expand Down Expand Up @@ -183,7 +186,14 @@ jobs:
- name: Build wasm library
# No reason to build on the same Github runner hosts many times
if: ${{ !matrix.no-run && !matrix.use-cross }}
run: $BUILD_CMD run -p xtask -- build-wasm
shell: bash
run: |
cd lib/binding_web
npm ci
CJS=true npm run build
CJS=true npm run build:debug
npm run build
npm run build:debug
- name: Build target
run: $BUILD_CMD build --release --target=${{ matrix.target }} --features=${{ matrix.features }}
Expand Down Expand Up @@ -233,6 +243,16 @@ jobs:
name: tree-sitter.wasm
path: |
lib/binding_web/tree-sitter.js
lib/binding_web/tree-sitter.js.map
lib/binding_web/tree-sitter.cjs
lib/binding_web/tree-sitter.cjs.map
lib/binding_web/tree-sitter.wasm
lib/binding_web/tree-sitter.wasm.map
lib/binding_web/debug/tree-sitter.cjs
lib/binding_web/debug/tree-sitter.cjs.map
lib/binding_web/debug/tree-sitter.js
lib/binding_web/debug/tree-sitter.js.map
lib/binding_web/debug/tree-sitter.wasm
lib/binding_web/debug/tree-sitter.wasm.map
if-no-files-found: error
retention-days: 7
16 changes: 15 additions & 1 deletion src/treesitter/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@ name: CI

on:
pull_request:
paths-ignore:
- docs/**
- "**/README.md"
- CONTRIBUTING.md
- LICENSE
- cli/src/templates
push:
branches: [master]
paths-ignore:
- docs/**
- "**/README.md"
- CONTRIBUTING.md
- LICENSE
- cli/src/templates

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -28,7 +40,9 @@ jobs:
components: clippy, rustfmt

- name: Lint files
run: make lint
run: |
make lint
make lint-web
sanitize:
uses: ./.github/workflows/sanitize.yml
Expand Down
49 changes: 49 additions & 0 deletions src/treesitter/.github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Docs
on:
push:
branches: [master]
paths: [docs/**]

jobs:
deploy-docs:
runs-on: ubuntu-latest

permissions:
contents: write
pages: write
id-token: write

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

- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install mdbook
env:
GH_TOKEN: ${{ github.token }}
run: |
jq_expr='.assets[] | select(.name | contains("x86_64-unknown-linux-gnu")) | .browser_download_url'
url=$(gh api repos/rust-lang/mdbook/releases/latest --jq "$jq_expr")
mkdir mdbook
curl -sSL "$url" | tar -xz -C mdbook
printf '%s/mdbook\n' "$PWD" >> "$GITHUB_PATH"
- name: Install mdbook-admonish
run: cargo install mdbook-admonish

- name: Build Book
run: mdbook build docs

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/book

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
30 changes: 30 additions & 0 deletions src/treesitter/.github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update Emscripten

on:
pull_request:
types: [opened, synchronize]

permissions:
contents: write
pull-requests: read

jobs:
update-emscripten:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up stable Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run emscripten update xtask
run: |
git config --global user.name "dependabot[bot]"
git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com"
cargo xtask upgrade-emscripten
- name: Push updated version
run: git push origin HEAD:$GITHUB_HEAD_REF
Loading

0 comments on commit ab2790b

Please sign in to comment.