Conversation
…ls is picking up on this.
- Removed npm folder - Added install script creating symlinks - Removed updating the android package
To be able to resolve react-native include files when installed as an npm package I have added two different ways of resolving node-modules.
The build script is a first version script and only tries to download the artifacts from the Skia Build Workflow.
wcandillon
approved these changes
Dec 15, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support for building through Github workflows.
CI
This project has two CI jobs set up to run as Github workflows.
build-skia.yml
This workflow builds the Skia Binaries from the main branch whenever the
main branch is changed - and only if the externals folder (where the Skia
sources lives) is changed.
The workflow uses two scripts in the package/package.json:
The
build-skiascript is found in the ./scripts/build-skia.ts file and builds each platform and arch that the project supports, currently all active archs on Android and iOS. The configuration is found in the ./scripts/skia-configuration.ts file.The build step will call some sub scripts which are basically calling the
build-skia.tsfile for each platform and cpu.The script
build-skia.ios-fatlibsarchives all the archs for iOS into single files.After a successfull run the workflow uploads all of the libs used by @shopify/react-native-skia as artifacts that will be used in subsequent builds of the library itself.
build-npm.yml
This workflow builds the final npm package. It does not yet publish the package.
The script performs several steps.
The scripts involved to perform these steps are:
./scripts/workflow-copy-libs.tswhich copies artifacts../scripts/build-npm-package.tswhich builds the npm package.Versioning
We are using the environment variable
GITHUB_RUN_NUMBERto set the build number in the package file (./package/package.json). This variable is used by the workflow in the repo.The build number (the last number in the package version) will be incremented on each build. This is not commited to back to the repository.