Skip to content

Commit 1924bce

Browse files
authored
Remove tree-sitter and associated build infrastructure (#19)
Reapplies @Swatinem's diff from codecov/codecov-cli#664
1 parent d059d7f commit 1924bce

File tree

28 files changed

+11
-1757
lines changed

28 files changed

+11
-1757
lines changed

.github/workflows/build_assets.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ jobs:
2121
TARGET: macos
2222
# currently, wrapt pulls the arm64 version instead of the universal one, so the below is a hack
2323
CMD_REQS: >
24-
mkdir -p pip-packages && cd pip-packages && pip wheel --no-cache-dir --no-binary tree_sitter,ijson,charset_normalizer,PyYAML .. &&
24+
mkdir -p pip-packages && cd pip-packages && pip wheel --no-cache-dir --no-binary ijson,charset_normalizer,PyYAML .. &&
2525
rm $(ls | grep wrapt) && pip download wrapt --platform=universal2 --only-binary=:all: && pip install $(ls | grep wrapt) --force-reinstall && cd .. &&
2626
pip install --no-deps --no-index --find-links=pip-packages pip-packages/*
2727
CMD_BUILD: >
28-
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
29-
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages --target-arch universal2 -F codecov_cli/main.py &&
28+
pyinstaller --copy-metadata codecov-cli --target-arch universal2 -F codecov_cli/main.py &&
3029
mv dist/main dist/codecovcli_macos &&
3130
lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64'
3231
OUT_FILE_NAME: codecovcli_macos
@@ -37,8 +36,7 @@ jobs:
3736
CMD_REQS: >
3837
pip install -r requirements.txt && pip install .
3938
CMD_BUILD: >
40-
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
41-
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py &&
39+
pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py &&
4240
cp ./dist/main ./dist/codecovcli_linux
4341
OUT_FILE_NAME: codecovcli_linux
4442
ASSET_MIME: application/octet-stream
@@ -48,15 +46,13 @@ jobs:
4846
CMD_REQS: >
4947
pip install -r requirements.txt && pip install .
5048
CMD_BUILD: >
51-
pyinstaller --add-binary "build\lib.win-amd64-cpython-311\staticcodecov_languages.cp311-win_amd64.pyd;." --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli\main.py &&
49+
pyinstaller --copy-metadata codecov-cli -F codecov_cli\main.py &&
5250
Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe"
5351
OUT_FILE_NAME: codecovcli_windows.exe
5452
ASSET_MIME: application/vnd.microsoft.portable-executable
5553

5654
steps:
5755
- uses: actions/checkout@v4
58-
with:
59-
submodules: true
6056

6157
- name: Set up Python 3.11
6258
uses: actions/setup-python@v3
@@ -119,8 +115,6 @@ jobs:
119115

120116
steps:
121117
- uses: actions/checkout@v4
122-
with:
123-
submodules: true
124118

125119
- name: Set up QEMU
126120
uses: docker/setup-qemu-action@v1

.github/workflows/build_for_pypi.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
persist-credentials: false
19-
submodules: true
2019

2120
- name: Install dependencies
2221
run: |

.github/workflows/ci-job.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
with:
15-
submodules: true
1615
fetch-depth: 2
1716

1817
- name: Set up Python 3.12

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
with:
20-
submodules: true
2119

2220
- name: Check linting with ruff
2321
run: |
@@ -27,8 +25,6 @@ jobs:
2725
runs-on: ubuntu-latest
2826
steps:
2927
- uses: actions/checkout@v4
30-
with:
31-
submodules: true
3228

3329
- name: Set up Python 3.13
3430
uses: actions/setup-python@v5
@@ -44,7 +40,7 @@ jobs:
4440
4541
- name: Run command_dump
4642
run: |
47-
./command_dump.py
43+
python command_dump.py
4844
4945
- name: Detect changes on commit
5046
run: |
@@ -60,7 +56,6 @@ jobs:
6056
steps:
6157
- uses: actions/checkout@v4
6258
with:
63-
submodules: true
6459
fetch-depth: 2
6560

6661
- uses: actions/setup-python@v5
@@ -90,7 +85,6 @@ jobs:
9085
steps:
9186
- uses: actions/checkout@v4
9287
with:
93-
submodules: true
9488
fetch-depth: 2
9589

9690
- name: Set up Python ${{matrix.python-version}}

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

codecov-cli/MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
include languages/treesitterjavascript/src/tree_sitter/parser.h
2-
include languages/treesitterpython/src/tree_sitter/parser.h
31
include requirements.txt
42

53
recursive-include codecov_cli *

0 commit comments

Comments
 (0)