-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Build ANGLE for macOS platform (first commit) * Fix typo
- Loading branch information
Showing
15 changed files
with
978 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build artifacts | ||
|
||
on: | ||
push: | ||
pull_request: | ||
create: | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout angle-builder | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install angle-builder | ||
run: pip install . | ||
|
||
- name: Build artifacts for macos-x64 | ||
run: angle-builder macos-x64 --artifact-output-folder /angle-builder-output | ||
|
||
- name: Build artifacts for macos-arm64 | ||
run: angle-builder macos-arm64 --artifact-output-folder /angle-builder-output | ||
|
||
- name: Build artifacts for macos-universal | ||
run: angle-builder macos-universal --artifact-output-folder /angle-builder-output | ||
|
||
- name: Store artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-angle-artifacts | ||
path: --artifact-output-folder /angle-builder-output |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Temporary and binary files | ||
*~ | ||
*.py[cod] | ||
*.so | ||
*.cfg | ||
!.isort.cfg | ||
!setup.cfg | ||
*.orig | ||
*.log | ||
*.pot | ||
__pycache__/* | ||
.cache/* | ||
.*.swp | ||
*/.ipynb_checkpoints/* | ||
.DS_Store | ||
|
||
# Project files | ||
.ropeproject | ||
.project | ||
.pydevproject | ||
.settings | ||
.idea | ||
.vscode | ||
tags | ||
|
||
# Package files | ||
*.egg | ||
*.eggs/ | ||
.installed.cfg | ||
*.egg-info | ||
|
||
# Unittest and coverage | ||
htmlcov/* | ||
.coverage | ||
.coverage.* | ||
.tox | ||
junit*.xml | ||
coverage.xml | ||
.pytest_cache/ | ||
|
||
# Build and docs folder/files | ||
build/* | ||
dist/* | ||
sdist/* | ||
docs/api/* | ||
docs/_rst/* | ||
docs/_build/* | ||
cover/* | ||
MANIFEST | ||
|
||
# Per-project virtualenvs | ||
.venv*/ | ||
.conda*/ | ||
.python-version |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
In the interest of fostering an open and welcoming community, we as | ||
contributors and maintainers need to ensure participation in our project and | ||
our sister projects is a harassment-free and positive experience for everyone. | ||
It is vital that all interaction is conducted in a manner conveying respect, | ||
open-mindedness and gratitude. | ||
|
||
Please consult the [latest Kivy Code of Conduct](https://github.com/kivy/kivy/blob/master/CODE_OF_CONDUCT.md). |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Contacting the Kivy Team | ||
|
||
If you are looking to contact the Kivy Team (who are responsible for managing | ||
the angle-builder project), including looking for support, please see our | ||
latest [Contact Us](https://github.com/kivy/kivy/blob/master/CONTACT.md) | ||
document. |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Contribution Guidelines | ||
|
||
angle-builder is part of the [Kivy](https://kivy.org) ecosystem - a large group of | ||
products used by many thousands of developers for free, but it | ||
is built entirely by the contributions of volunteers. We welcome (and rely on) | ||
users who want to give back to the community by contributing to the project. | ||
|
||
Contributions can come in many forms. See the latest | ||
[Contribution Guidelines](https://github.com/kivy/kivy/blob/master/CONTRIBUTING.md) | ||
for how you can help us. |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2010-2023 Kivy Team and other contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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 |
---|---|---|
@@ -1 +1,139 @@ | ||
# angle-builder | ||
# angle-builder | ||
|
||
angle-builder is a dedicated tool designed to streamline the build process of the ANGLE library, | ||
a critical component utilized by the Kivy project. | ||
|
||
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers) | ||
[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](#sponsors) | ||
|
||
## Why angle-builder? | ||
|
||
Building the ANGLE library manually can be a time-consuming and resource-intensive task, | ||
demanding substantial disk space and several minutes on a performant laptop. | ||
|
||
Recognizing these challenges, we developed `angle-builder` mainly with CI/CD in mind, even though | ||
it can be used on your own development machine. | ||
|
||
## Key features | ||
|
||
- **Simplified Build Process**: Our tool automates the intricate steps involved in building the ANGLE library, making it easy for developers to integrate into their workflow. | ||
- **Binaries Consolidation for Apple Platforms**: `angle-builder` includes scripts to merge the generated binaries into a single one for Apple platforms, when applicable. This results in a fat .dylib for macOS and an .xcframework for iOS for `-universal` targets. | ||
- **CI/CD Integration**: We use GitHub Actions to build the library and store the binaries for later use. This allows us to avoid the time-consuming and resource-intensive build process on each CI/CD run, or on each developer's machine. | ||
|
||
## Installation | ||
|
||
Clone the repository and install the package: | ||
``` | ||
$ git clone https://github.com/kivy/angle-builder.git | ||
$ cd angle-builder | ||
$ python3 -m venv venv | ||
$ source venv/bin/activate | ||
$ pip install . | ||
``` | ||
|
||
## Usage | ||
|
||
### Building ANGLE via ``angle-builder`` | ||
|
||
The following targets are available: | ||
- `macos-x64`: Creates a zip file containing `libEGL.dylib`, `libGLESv2.dylib`, the `include` folder, and the `LICENSE` file for Intel-based macs. | ||
- `macos-arm64`: Creates a zip file containing `libEGL.dylib`, `libGLESv2.dylib`, the `include` folder, and the `LICENSE` file for Apple Silicon macs. | ||
- `macos-universal`: Creates a zip file containing `libEGL.dylib`, `libGLESv2.dylib`, the `include` folder, and the `LICENSE` file for Intel-based and Apple Silicon macs, by merging the binaries generated by the `macos-x64` and `macos-arm64` targets. | ||
|
||
|
||
To build the library, run the following command: | ||
``` | ||
$ angle-builder <target> | ||
``` | ||
|
||
For the list of all the available options, run: | ||
``` | ||
$ angle-builder -h | ||
``` | ||
|
||
|
||
## License | ||
|
||
angle-builder is [MIT licensed](LICENSE), actively developed by a great | ||
community and is supported by many projects managed by the | ||
[Kivy Organization](https://www.kivy.org/about.html). | ||
|
||
## Documentation | ||
|
||
[Documentation for this repository](). | ||
|
||
## Support | ||
|
||
Are you having trouble using angle-builder? | ||
Is there an error you don’t understand? Are you trying to figure out how to use | ||
it? We have volunteers who can help! | ||
|
||
The best channels to contact us for support are listed in the latest | ||
[Contact Us](https://github.com/kivy/angle-builder/blob/master/CONTACT.md) document. | ||
|
||
## Contributing | ||
|
||
angle-builder is part of the [Kivy](https://kivy.org) ecosystem - a large group of | ||
products used by many thousands of developers for free, but it | ||
is built entirely by the contributions of volunteers. We welcome (and rely on) | ||
users who want to give back to the community by contributing to the project. | ||
|
||
Contributions can come in many forms. See the latest | ||
[Contribution Guidelines](https://github.com/kivy/angle-builder/blob/master/CONTRIBUTING.md) | ||
for how you can help us. | ||
|
||
## Code of Conduct | ||
|
||
In the interest of fostering an open and welcoming community, we as | ||
contributors and maintainers need to ensure participation in our project and | ||
our sister projects is a harassment-free and positive experience for everyone. | ||
It is vital that all interaction is conducted in a manner conveying respect, | ||
open-mindedness and gratitude. | ||
|
||
Please consult the [latest Code of Conduct](https://github.com/kivy/angle-builder/blob/master/CODE_OF_CONDUCT.md). | ||
|
||
## Contributors | ||
|
||
This project exists thanks to | ||
[all the people who contribute](https://github.com/kivy/angle-builder/graphs/contributors). | ||
[[Become a contributor](CONTRIBUTING.md)]. | ||
|
||
<img src="https://contrib.nn.ci/api?repo=kivy/angle-builder&pages=5&no_bot=true&radius=22&cols=18"> | ||
|
||
## Backers | ||
|
||
Thank you to [all of our backers](https://opencollective.com/kivy)! | ||
🙏 [[Become a backer](https://opencollective.com/kivy#backer)] | ||
|
||
<img src="https://opencollective.com/kivy/backers.svg?width=890&avatarHeight=44&button=false"> | ||
|
||
## Sponsors | ||
|
||
Special thanks to | ||
[all of our sponsors, past and present](https://opencollective.com/kivy). | ||
Support this project by | ||
[[becoming a sponsor](https://opencollective.com/kivy#sponsor)]. | ||
|
||
Here are our top current sponsors. Please click through to see their websites, | ||
and support them as they support us. | ||
|
||
<!--- See https://github.com/orgs/kivy/discussions/15 for explanation of this code. --> | ||
<a href="https://opencollective.com/kivy/sponsor/0/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/0/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/1/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/1/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/2/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/2/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/3/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/3/avatar.svg"></a> | ||
|
||
<a href="https://opencollective.com/kivy/sponsor/4/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/4/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/5/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/5/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/6/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/6/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a> | ||
|
||
<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/10/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/10/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/11/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/11/avatar.svg"></a> | ||
|
||
<a href="https://opencollective.com/kivy/sponsor/12/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/12/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/13/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/13/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/14/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/14/avatar.svg"></a> | ||
<a href="https://opencollective.com/kivy/sponsor/15/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/15/avatar.svg"></a> |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools>=46.1.0"] | ||
build-backend = "setuptools.build_meta" |
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
[metadata] | ||
name = angle-builder | ||
description = Build and releases ANGLE binaries for different platforms | ||
author = Kivy Team and other contributors | ||
author_email = [email protected] | ||
license = MIT | ||
license_files = LICENSE | ||
long_description = file: README.md | ||
url = https://github.com/kivy/angle-builder | ||
project_urls = | ||
Source = https://github.com/kivy/angle-builder/ | ||
|
||
|
||
platforms = any | ||
|
||
classifiers = | ||
Development Status :: 4 - Beta | ||
Programming Language :: Python | ||
Topic :: Software Development :: Build Tools | ||
|
||
[options] | ||
zip_safe = False | ||
packages = find_namespace: | ||
include_package_data = True | ||
package_dir = | ||
=src | ||
|
||
python_requires = >=3.8 | ||
|
||
# install_requires = | ||
|
||
[options.packages.find] | ||
where = src | ||
exclude = | ||
tests | ||
|
||
[options.extras_require] | ||
dev = | ||
setuptools | ||
pytest | ||
pytest-cov | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
angle-builder = angle_builder.builder:run | ||
|
||
[tool:pytest] | ||
addopts = | ||
--cov angle_builder --cov-report term-missing | ||
--verbose | ||
norecursedirs = | ||
dist | ||
build | ||
.tox | ||
testpaths = tests | ||
|
||
|
||
[flake8] | ||
# Some sane defaults for the code style checker flake8 | ||
max_line_length = 88 | ||
extend_ignore = E203, W503 | ||
# ^ Black-compatible | ||
# E203 and W503 have edge cases handled by black | ||
exclude = | ||
.tox | ||
build | ||
dist | ||
.eggs | ||
docs/conf.py |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
""" | ||
Setup file for angle-builder. | ||
Use setup.cfg to configure the project. | ||
""" | ||
from setuptools import setup | ||
|
||
if __name__ == "__main__": | ||
setup() |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from importlib.metadata import PackageNotFoundError, version | ||
|
||
try: | ||
dist_name = "angle-builder" | ||
__version__ = version(dist_name) | ||
except PackageNotFoundError: # pragma: no cover | ||
__version__ = "unknown" | ||
finally: | ||
del version, PackageNotFoundError |
Oops, something went wrong.