Skip to content

Commit

Permalink
尝试继续拆分CI步骤
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Nov 22, 2023
1 parent 7215ec5 commit 6185bdf
Showing 1 changed file with 40 additions and 17 deletions.
57 changes: 40 additions & 17 deletions .github/workflows/pyinstaller-win-shawn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ jobs:
key: docs-${{ github.sha }}
path: _site

build-win-amd64:
needs:
- build-frontend
- build-docs
build-mower:
runs-on: windows-2022
steps:
- name: download source
Expand All @@ -82,7 +79,7 @@ jobs:
run: |
python -m venv venv
venv\Scripts\pip install -r requirements.txt
venv\Scripts\pip install -U pyinstaller xxhash backports.zoneinfo[tzdata]
venv\Scripts\pip install -U pyinstaller
- name: install UPX
uses: crazy-max/ghaction-upx@v2
Expand All @@ -96,33 +93,59 @@ jobs:
set SOURCE_DATE_EPOCH=1694076231
venv\Scripts\pyinstaller .\webui_zip.spec --distpath=mower
- name: cache mower
uses: actions/cache/save@v3
with:
key: mower-${{ github.sha }}
path: mower/mower

build-win-amd64:
needs:
- build-frontend
- build-docs
- build-mower
runs-on: ubuntu-22.04
steps:
- name: download updater
uses: actions/checkout@v4
with:
repository: ArkMowers/updater

- name: restore mower
uses: actions/cache/restore@v3
with:
key: mower-${{ github.sha }}
path: mower

- name: restore frontend dist
uses: actions/cache/restore@v3
with:
key: frontend-dist-${{ github.sha }}
path: mower/mower/_internal/dist
path: mower/_internal/dist

- name: restore docs
uses: actions/cache/restore@v3
with:
key: docs-${{ github.sha }}
path: mower/mower/_internal/dist/docs
path: mower/_internal/dist/docs

- name: download updater
uses: actions/checkout@v4
- name: install python 3.8
uses: actions/setup-python@v4
with:
repository: ArkMowers/updater
path: updater
python-version: 3.8
cache: pip

- name: calculate hash
working-directory: mower/mower
shell: cmd
- name: Install dependencies
run: |
..\..\venv\Scripts\python.exe ..\..\updater\publish.py
python -m venv venv
venv/bin/pip install -U xxhash backports.zoneinfo[tzdata]
- name: create zip
- name: calculate hash
working-directory: mower
run: tar -cvzf mower.zip mower
run: ../venv/bin/python ../publish.py

- name: create zip
run: zip -r mower.zip mower

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 6185bdf

Please sign in to comment.