Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化了下ci(主要是macOS方面) #146

Merged
merged 3 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading