-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.28 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Main Workflow
on:
workflow_dispatch:
inputs:
repo:
description: Repo to use
required: false
default: https://github.com/opencv/opencv.git
type: string
ref:
description: Branch or tag to use
required: true
type: string
jobs:
determine-build:
runs-on: ubuntu-latest
outputs:
legacy: ${{ steps.check_version.outputs.legacy }}
steps:
- name: Check if version is 3.x
id: check_version
run: |
if [[ "${{ github.event.inputs.ref }}" =~ ^3\..* ]]; then
echo "legacy=true" >> $GITHUB_ENV
echo "::set-output name=legacy::true"
else
echo "legacy=false" >> $GITHUB_ENV
echo "::set-output name=legacy::false"
fi
run-legacy-framework:
needs: determine-build
if: needs.determine-build.outputs.legacy == 'true'
uses: ./.github/workflows/build-legacy-framework.yaml
with:
repo: ${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.ref }}
run-xcframework:
needs: determine-build
if: needs.determine-build.outputs.legacy == 'false'
uses: ./.github/workflows/build-xcframework.yaml
with:
repo: ${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.ref }}