Skip to content

Add GitHub Actions for building XCFramework artifacts#18976

Open
chrisballinger wants to merge 5 commits intoopencv:4.xfrom
Rightpoint:github-actions
Open

Add GitHub Actions for building XCFramework artifacts#18976
chrisballinger wants to merge 5 commits intoopencv:4.xfrom
Rightpoint:github-actions

Conversation

@chrisballinger
Copy link
Copy Markdown
Contributor

@chrisballinger chrisballinger commented Dec 1, 2020

Splitting this out into a standalone PR, based on the initial work here: #18925

Someone will need to enable GitHub Actions support for this repository, it seems to be disabled: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository

After this is merged and GitHub Actions is enabled, whenever new code is merged to master, someone creates a pull request, or a tag is created, a new static and dynamic XCFramework build for Apple platforms will be created and the artifacts stored. There is a 5 GB artifact limit so older artifacts will be purged periodically.

Areas for possible future improvement:

  • Perhaps it would be better to only store the artifacts after merging to master, and skipping the storage for pull requests done
  • It's possible to also automatically upload these artifacts to new GitHub Releases after a tag is created, but perhaps a more manual release process is preferred here
  • General cleanup of the job steps (removal of temporary workarounds, deduplication, etc)

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders_only=docs
buildworker:Mac=macosx-1
buildworker:iOS=macosx-2
build_image:Custom Mac=osx_framework-test
buildworker:Custom Mac=macosx-2

@chrisballinger chrisballinger mentioned this pull request Dec 1, 2020
9 tasks
@chrisballinger
Copy link
Copy Markdown
Contributor Author

@alalek Not sure how this could have broken the build considering it's a new file. I'm having trouble digging up the log file for the failed build on the old CI system, any ideas?

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 10, 2020

Logs were expired (100 last builders are stored only)

I re-sheduled build. The message is:

.github/workflows/apple-build-checks.yml:3: trailing whitespace.
+on:  

(2 spaces after on:)


Consider enabling commit hook: https://github.com/opencv/opencv/wiki/How_to_contribute#q3-i-was-asked-to-remove-whitespace-issues-how-can-i-do-that

@chrisballinger
Copy link
Copy Markdown
Contributor Author

@alalek Ah thanks for the tip! Should be resolved in 657b6ff

@colejd
Copy link
Copy Markdown
Contributor

colejd commented Dec 11, 2020

@chrisballinger If #19088 gets merged, you'll need to use the --out flag for your output path.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Please take a look on the comment about --out option above.

Comment on lines +3 to +10
on:
push:
branches:
- master
- next
tags:
- '**'
pull_request: # Run on every pull request, regardless of target branch
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid automatic triggering of such huge pipelines.
Lets use manual trigger instead:

on: workflow_dispatch

@asenyaev
Copy link
Copy Markdown
Contributor

asenyaev commented Apr 8, 2021

jenkins cn please retry a build

@mathaeus
Copy link
Copy Markdown

mathaeus commented Jul 1, 2022

Bumping this one.

@chrisballinger @alalek is there anything blocking this?

Having a pre-built xcframework would be a pre-requisite for here.
Would appreciate it a lot :)

@chrisballinger
Copy link
Copy Markdown
Contributor Author

It sounded like the core team wasn't interested unfortunately. But you can build an xcframework yourself now.

@mathaeus
Copy link
Copy Markdown

mathaeus commented Jul 4, 2022

It sounded like the core team wasn't interested unfortunately.

Yeah I saw that based on the linked PRs 😥.

But you can build an xcframework yourself now.

I did so for a PoC, but not sure how to proceed for the issue that I linked above 😅, which so far relied on the pre-built iOS framework. For supporting sim_arm64, as far as I can tell, that would need to change to the xcframework. Of course, things could get hosted somewhere else, as you also suggested from what I can see, but then things easily get out of sync probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants