Skip to content

Commit

Permalink
Add platform filters for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Macoron committed Nov 2, 2024
1 parent 2754062 commit c68e559
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ on:
description: 'Tag, branch or commit'
required: true
default: 'v1.5.5'
target_platform:
description: 'Target platforms'
required: true
default: 'all'
jobs:
build-windows:
name: Build for Windows (x86_64)
if: ${{ contains(fromJson('["windows", "all"]'), github.event.inputs.target_platform) }}
runs-on: windows-latest
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -46,6 +51,7 @@ jobs:

build-windows-cuda:
name: Build for Windows (x86_64, CUDA)
if: ${{ contains(fromJson('["windows_cuda", "all"]'), github.event.inputs.target_platform) }}
runs-on: windows-latest
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -85,6 +91,7 @@ jobs:

build-linux:
name: Build for Linux (x86_64)
if: ${{ contains(fromJson('["linux", "all"]'), github.event.inputs.target_platform) }}
runs-on: ubuntu-20.04
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -113,6 +120,7 @@ jobs:

build-linux-cuda:
name: Build for Linux (x86_64, CUDA)
if: ${{ contains(fromJson('["linux_cuda", "all"]'), github.event.inputs.target_platform) }}
runs-on: ubuntu-20.04
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -150,6 +158,7 @@ jobs:

build-macos:
name: Build for MacOS (ARM, x86_64)
if: ${{ contains(fromJson('["macos", "all"]'), github.event.inputs.target_platform) }}
runs-on: macOS-latest
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -178,6 +187,7 @@ jobs:

build-macos-metal:
name: Build for MacOS Metal (ARM, x86_64)
if: ${{ contains(fromJson('["macos_metal", "all"]'), github.event.inputs.target_platform) }}
runs-on: macOS-latest
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -210,6 +220,7 @@ jobs:

build-ios:
name: Build for iOS
if: ${{ contains(fromJson('["ios", "all"]'), github.event.inputs.target_platform) }}
runs-on: macOS-latest
steps:
- name: Clone whisper.unity
Expand Down Expand Up @@ -238,6 +249,7 @@ jobs:

build-android:
name: Build for Android (arm64-v8a)
if: ${{ contains(fromJson('["android", "all"]'), github.event.inputs.target_platform) }}
runs-on: ubuntu-latest
steps:
- name: Install Java
Expand Down

0 comments on commit c68e559

Please sign in to comment.