Skip to content

Commit

Permalink
Merge pull request #146 from kaidegit/master
Browse files Browse the repository at this point in the history
优化了下ci(主要是macOS方面)
  • Loading branch information
Neutree authored Aug 17, 2024
2 parents 5bfaed6 + 4c8e24a commit a99febf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: ["windows-latest", "macos-latest", "macos-11"]
os: ["windows-latest", "macos-latest", "macos-13"]
python-version: ["3.8", "3.9", "3.10"] # must use str, not int, or 3.10 will be recognized as 3.1
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
python-version: ["3.9"] # must use str, not int, or 3.10 will be recognized as 3.1
os: ["macos-latest", "macos-11"]
os: ["macos-latest", "macos-13"]
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
name: test pack task
name: release and upload assets task
# The type of runner that the job will run on
strategy:
matrix:
Expand Down
11 changes: 7 additions & 4 deletions pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,13 @@ def pack():
windows_out = windows_out_new
print(windows_out)
elif os_name.startswith("macos"):
if os_name != "macos-latest":
macos_out_new = macos_out.replace("macos", os_name.replace("-", "_"))
os.rename(macos_out, macos_out_new)
macos_out = macos_out_new
macos_version = os_name.split("-")[1]
if macos_version.isdigit() and int(macos_version) < 14:
macos_out_new = macos_out.replace("macos", "macos_x64")
else: # github actions macos-latest is using M1 chip
macos_out_new = macos_out.replace("macos", "macos_arm64")
os.rename(macos_out, macos_out_new)
macos_out = macos_out_new
print(macos_out)
else:
sys.exit(1)
Expand Down

0 comments on commit a99febf

Please sign in to comment.