Skip to content

Commit 840a392

Browse files
committed
ci: update package
1 parent 0b9cf83 commit 840a392

File tree

2 files changed

+65
-62
lines changed

2 files changed

+65
-62
lines changed

.github/workflows/package_ocrweb.yml

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ jobs:
5353

5454
- name: Install environments
5555
run: |
56-
pip3 install Pillow pyinstaller Flask>=2.1.0 rapidocr get_pypi_latest_version
56+
pip3 install get_pypi_latest_version
57+
pip3 install -r requirements.txt
58+
rapidocr check
5759
5860
- name: Run pyinstaller
5961
id: run_pyinstaller
@@ -91,64 +93,64 @@ jobs:
9193
asset_name: ${{ steps.concat_file_path.outputs.ZIP_NAME }}
9294
asset_content_type: application/zip
9395

94-
build_linux:
95-
name: build_linux
96-
runs-on: ${{ matrix.os }}
97-
needs: create_release
98-
strategy:
99-
matrix:
100-
os: ['ubuntu-22.04']
101-
102-
steps:
103-
- name: Pull latest code
104-
uses: actions/checkout@v4
105-
106-
- name: Set up Python 3.10
107-
uses: actions/setup-python@v4
108-
with:
109-
python-version: '3.10'
110-
architecture: 'x64'
111-
112-
- name: Display Python version
113-
run: python -c "import sys; print(sys.version)"
114-
115-
- name: Install environments
116-
run: |
117-
pip3 install Pillow pyinstaller Flask>=2.1.0 rapidocr get_pypi_latest_version
118-
119-
- name: Run pyinstaller
120-
id: run_pyinstaller
121-
shell: bash
122-
run: |
123-
cd rapidocr_web/
124-
pyinstaller ocrweb.spec
125-
cp -r static templates dist/${{ env.package_name }}
126-
rm dist/${{ env.package_name }}/cv2/opencv_videoio_ffmpe*.dll || echo "未找到opencv_videoio_ffmpeg"
127-
echo "VERSION=$(get_pypi_latest_version rapid_videocr)" >> $GITHUB_OUTPUT
128-
129-
- name: Concat file path
130-
id: concat_file_path
131-
env:
132-
ZIP_NAME: ${{ env.package_name }}-${{ steps.run_pyinstaller.outputs.VERSION }}-${{ matrix.os }}-${{ runner.arch }}-no-installer.zip
133-
Linux_DIST_DIR: ${{ github.workspace }}/rapidocr_web/dist
134-
run: |
135-
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_OUTPUT
136-
echo "Linux_PACKAGE_DIR=$Linux_DIST_DIR/${{ env.package_name }}" >> $GITHUB_OUTPUT
137-
echo "Linux_ZIP_FULL_PATH=$Linux_DIST_DIR/$ZIP_NAME" >> $GITHUB_OUTPUT
138-
echo "Linux_DIST_DIR=$Linux_DIST_DIR" >> $GITHUB_OUTPUT
139-
140-
- name: Zip package
141-
run: |
142-
cd ${{ steps.concat_file_path.outputs.Linux_DIST_DIR }}
143-
zip -r ${{ steps.concat_file_path.outputs.ZIP_NAME }} ${{ env.package_name }}
144-
145-
- name: Upload release asset
146-
id: upload-release-asset-linux-macOS
147-
uses: actions/upload-release-asset@v1
148-
env:
149-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
150-
with:
151-
upload_url: ${{ needs.create_release.outputs.upload_url }}
152-
asset_path: ${{ steps.concat_file_path.outputs.Linux_ZIP_FULL_PATH }}
153-
asset_name: ${{ steps.concat_file_path.outputs.ZIP_NAME }}
154-
asset_content_type: application/zip
96+
# build_linux:
97+
# name: build_linux
98+
# runs-on: ${{ matrix.os }}
99+
# needs: create_release
100+
# strategy:
101+
# matrix:
102+
# os: ['ubuntu-22.04']
103+
104+
# steps:
105+
# - name: Pull latest code
106+
# uses: actions/checkout@v4
107+
108+
# - name: Set up Python 3.10
109+
# uses: actions/setup-python@v4
110+
# with:
111+
# python-version: '3.10'
112+
# architecture: 'x64'
113+
114+
# - name: Display Python version
115+
# run: python -c "import sys; print(sys.version)"
116+
117+
# - name: Install environments
118+
# run: |
119+
# pip3 install Pillow pyinstaller Flask>=2.1.0 rapidocr get_pypi_latest_version
120+
121+
# - name: Run pyinstaller
122+
# id: run_pyinstaller
123+
# shell: bash
124+
# run: |
125+
# cd rapidocr_web/
126+
# pyinstaller ocrweb.spec
127+
# cp -r static templates dist/${{ env.package_name }}
128+
# rm dist/${{ env.package_name }}/cv2/opencv_videoio_ffmpe*.dll || echo "未找到opencv_videoio_ffmpeg"
129+
# echo "VERSION=$(get_pypi_latest_version rapid_videocr)" >> $GITHUB_OUTPUT
130+
131+
# - name: Concat file path
132+
# id: concat_file_path
133+
# env:
134+
# ZIP_NAME: ${{ env.package_name }}-${{ steps.run_pyinstaller.outputs.VERSION }}-${{ matrix.os }}-${{ runner.arch }}-no-installer.zip
135+
# Linux_DIST_DIR: ${{ github.workspace }}/rapidocr_web/dist
136+
# run: |
137+
# echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_OUTPUT
138+
# echo "Linux_PACKAGE_DIR=$Linux_DIST_DIR/${{ env.package_name }}" >> $GITHUB_OUTPUT
139+
# echo "Linux_ZIP_FULL_PATH=$Linux_DIST_DIR/$ZIP_NAME" >> $GITHUB_OUTPUT
140+
# echo "Linux_DIST_DIR=$Linux_DIST_DIR" >> $GITHUB_OUTPUT
141+
142+
# - name: Zip package
143+
# run: |
144+
# cd ${{ steps.concat_file_path.outputs.Linux_DIST_DIR }}
145+
# zip -r ${{ steps.concat_file_path.outputs.ZIP_NAME }} ${{ env.package_name }}
146+
147+
# - name: Upload release asset
148+
# id: upload-release-asset-linux-macOS
149+
# uses: actions/upload-release-asset@v1
150+
# env:
151+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152+
# with:
153+
# upload_url: ${{ needs.create_release.outputs.upload_url }}
154+
# asset_path: ${{ steps.concat_file_path.outputs.Linux_ZIP_FULL_PATH }}
155+
# asset_name: ${{ steps.concat_file_path.outputs.ZIP_NAME }}
156+
# asset_content_type: application/zip

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Pillow<=10.0.0
22
requests
33
Flask>=2.1.0, <=3.0.0
44
rapidocr>=3.0.0
5+
onnxruntime

0 commit comments

Comments
 (0)