ci: using workflow_call to simplify ci.

This commit is contained in:
Zhang Dian
2025-07-10 21:47:49 +08:00
parent 0524c9e16e
commit 5aad0fbd0d
4 changed files with 101 additions and 179 deletions

View File

@@ -5,43 +5,59 @@ on:
inputs:
win-x64:
description: 'Windows x64'
required: true
default: false
type: boolean
win-x64-aot:
description: 'Windows x64 AOT'
required: true
default: false
type: boolean
linux-x64:
description: 'Linux x64'
required: true
default: false
type: boolean
linux-x64-aot:
description: 'Linux x64 AOT'
required: true
default: false
type: boolean
osx-arm64:
description: 'macOS arm64'
required: true
default: false
type: boolean
osx-arm64-aot:
description: 'macOS arm64 AOT'
required: true
default: false
type: boolean
android-arm64:
description: 'Android arm64'
required: true
default: false
type: boolean
workflow_call:
inputs:
win-x64:
type: boolean
default: true
win-x64-aot:
type: boolean
default: true
linux-x64:
type: boolean
default: true
linux-x64-aot:
type: boolean
default: true
osx-arm64:
type: boolean
default: true
osx-arm64-aot:
type: boolean
default: true
android-arm64:
type: boolean
default: true
jobs:
win-x64:
if: ${{ github.event.inputs.win-x64 == 'true' }}
if: ${{ inputs.win-x64 == true }}
runs-on: windows-latest
steps:
- name: Checkout
@@ -57,7 +73,7 @@ jobs:
!publish/*.pdb
win-x64-aot:
if: ${{ github.event.inputs.win-x64-aot == 'true' }}
if: ${{ inputs.win-x64-aot == true }}
runs-on: windows-latest
steps:
- name: Checkout
@@ -77,7 +93,7 @@ jobs:
!publish/*.pdb
linux-x64:
if: ${{ github.event.inputs.linux-x64 == 'true' }}
if: ${{ inputs.linux-x64 == true }}
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -93,7 +109,7 @@ jobs:
!publish/*.pdb
linux-x64-aot:
if: ${{ github.event.inputs.linux-x64-aot == 'true' }}
if: ${{ inputs.linux-x64-aot == true }}
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -113,7 +129,7 @@ jobs:
!publish/*.pdb
osx-arm64:
if: ${{ github.event.inputs.osx-arm64 == 'true' }}
if: ${{ inputs.osx-arm64 == true }}
runs-on: macos-latest
steps:
- name: Checkout
@@ -129,7 +145,7 @@ jobs:
!publish/*.pdb
osx-arm64-aot:
if: ${{ github.event.inputs.osx-arm64-aot == 'true' }}
if: ${{ inputs.osx-arm64-aot == true }}
runs-on: macos-latest
steps:
- name: Checkout
@@ -149,7 +165,7 @@ jobs:
!publish/*.pdb
android-arm64:
if: ${{ github.event.inputs.android-arm64 == 'true' }}
if: ${{ inputs.android-arm64 == true }}
runs-on: windows-latest
steps:
- name: Checkout