forked from sqzw-x/mdcx
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: macos aarch64; allow workflow_disspatch (sqzw-x#199)
Co-authored-by: northsea4 <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ jobs: | |
- name: Delete old release | ||
uses: dev-drprasad/[email protected] | ||
if: ${{ env.IS_DAILY=='true' && steps.get-new-commits.outputs.count>0 }} | ||
if: ${{ env.IS_DAILY == 'true' && steps.get-new-commits.outputs.count > 0 }} | ||
with: | ||
tag_name: daily_release | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -48,19 +48,16 @@ jobs: | |
run: | | ||
items=() | ||
items+=('{"build": "macos", "os": "macos-latest", "arch": "x86_64"}') | ||
items+=('{"build": "windows", "os": "windows-latest", "arch": "x86_64"}') | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners | ||
# https://docs.github.com/zh/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners | ||
# self-hosted runner | ||
if [[ -n "${{ vars.SELF_HOSTED_MACOS_ARM64_RUNNER }}" ]]; then | ||
# setup-python没有aarch64的python3.9,这里指定python3.10 | ||
items+=('{"build":"macos", "os": ["self-hosted", "macOS", "ARM64"], "arch": "aarch64", "python": "3.10", "cache": "none"}') | ||
fi | ||
items+=('{"build": "macos", "os": "macos-latest", "arch": "aarch64"}') | ||
items+=('{"build": "macos", "os": "macos-13", "arch": "x86_64"}') | ||
items+=('{"build": "windows", "os": "windows-latest", "arch": "x86_64"}') | ||
# macOS 10.15.7, x86_64, 指定opencv版本 | ||
if [[ -n "${{ vars.BUILD_FOR_MACOS_LEGACY }}" && -n "${{ vars.MACOS_LEGACY_CV_VERSION }}" ]]; then | ||
items+=('{"build": "macos", "os": "macos-latest", "arch": "x86_64", "cv": "${{ vars.MACOS_LEGACY_CV_VERSION }}", "tail": "-legacy"}') | ||
items+=('{"build": "macos", "os": "macos-13", "arch": "x86_64", "cv": "${{ vars.MACOS_LEGACY_CV_VERSION }}", "tail": "-legacy"}') | ||
fi | ||
# win7, x86_64, python3.8 | ||
|
@@ -84,7 +81,8 @@ jobs: | |
build-app: | ||
needs: init-matrix | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ needs.init-matrix.outputs.count > 0 }} | ||
# 如果commit数量大于0,或者手动触发,则执行 | ||
if: ${{ needs.init-matrix.outputs.count > 0 || github.event_name == 'workflow_dispatch' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|