Skip to content

Commit

Permalink
Merge pull request #1138 from Shopify/fix/1133-fix-build-after-revert…
Browse files Browse the repository at this point in the history
…-paragraph

Fixed build system after revert of SkParagraph
  • Loading branch information
chrfalch authored Nov 23, 2022
2 parents 26f5ecb + c419e9c commit ce3f314
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 23 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/build-skia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libsvg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libskottie.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libsksg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libskparagraph.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libskunicode.a
- name: Upload artifacts - Android arm64
uses: actions/upload-artifact@v2
Expand All @@ -70,8 +68,6 @@ jobs:
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libsvg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libskottie.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libsksg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libskparagraph.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libskunicode.a
- name: Upload artifacts - Android x86
uses: actions/upload-artifact@v2
Expand All @@ -83,8 +79,6 @@ jobs:
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libsvg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libskottie.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libsksg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libskparagraph.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libskunicode.a
- name: Upload artifacts - Android x64
uses: actions/upload-artifact@v2
Expand All @@ -96,8 +90,6 @@ jobs:
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libsvg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libskottie.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libsksg.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libskparagraph.a
${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libskunicode.a
- name: Upload artifacts - iOS xcframeworks
uses: actions/upload-artifact@v2
Expand All @@ -109,5 +101,3 @@ jobs:
${{ env.WORKING_DIRECTORY }}/package/libs/ios/libsvg.xcframework
${{ env.WORKING_DIRECTORY }}/package/libs/ios/libskottie.xcframework
${{ env.WORKING_DIRECTORY }}/package/libs/ios/libsksg.xcframework
${{ env.WORKING_DIRECTORY }}/package/libs/ios/libskparagraph.xcframework
${{ env.WORKING_DIRECTORY }}/package/libs/ios/libskunicode.xcframework
11 changes: 4 additions & 7 deletions scripts/build-npm-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ if (process.env.GITHUB_RUN_NUMBER === undefined) {
process.exit(1);
}

// FIXME: We can't use skia configuration here since it depends on
// iPhone SDKs that we get from xcrun...

// Check that Android Skia libs are built
["armeabi-v7a", "arm64-v8a", "x86", "x86_64"].forEach((cpu) => {
[
Expand All @@ -47,8 +44,8 @@ if (process.env.GITHUB_RUN_NUMBER === undefined) {
"libsvg.a",
"libskottie.a",
"libsksg.a",
"libskparagraph.a",
"libskunicode.a",
//"libskparagraph.a",
//"libskunicode.a",
].forEach((target) => {
const path = `./package/libs/android/${cpu}/${target}`;
checkFileExists(
Expand All @@ -66,8 +63,8 @@ if (process.env.GITHUB_RUN_NUMBER === undefined) {
"libsvg.xcframework",
"libskottie.xcframework",
"libsksg.xcframework",
"libskparagraph.xcframework",
"libskunicode.xcframework",
// "libskparagraph.xcframework",
// "libskunicode.xcframework",
].forEach((lib) => {
checkFileExists(
`./package/libs/ios/${lib}`,
Expand Down
25 changes: 23 additions & 2 deletions scripts/skia-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,29 @@ const NdkDir: string = process.env.ANDROID_NDK ?? "";
// 1) CMakeLists.txt
// 2) react-native-skia.podspec
// 3) package.json - add the following files to the files array:
// - "libs/ios/libskparagraph.xcframework",
// - "libs/ios/libskunicode.xcframework",
// "libs/ios/libskparagraph.xcframework",
// "libs/ios/libskunicode.xcframework",
// 4) build-skia.yml:
// Line 60:
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libskparagraph.a
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm/libskunicode.a
// Line 72:
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libskparagraph.a
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/arm64/libskunicode.a
// Line 84:
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libskparagraph.a
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x86/libskunicode.a
// Line 96:
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libskparagraph.a
// ${{ env.WORKING_DIRECTORY }}/externals/skia/out/android/x64/libskunicode.a
// Line 108:
// ${{ env.WORKING_DIRECTORY }}/package/libs/ios/libskparagraph.xcframework
// ${{ env.WORKING_DIRECTORY }}/package/libs/ios/libskunicode.xcframework
// 5) build-npm-package.ts:
// Line 47-48, uncomment
// Line 66-67, uncomment
// 6) Workflow-copy-libs.ts:
// 27-28 and 36-37, uncomment
export const BUILD_WITH_PARAGRAPH = false;
const ParagraphArgs = BUILD_WITH_PARAGRAPH
? [
Expand Down
8 changes: 4 additions & 4 deletions scripts/workflow-copy-libs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ const androidFiles = [
"libsvg.a",
"libskottie.a",
"libsksg.a",
"libskparagraph.a",
"libskunicode.a",
// "libskparagraph.a",
// "libskunicode.a",
];
const iosFiles = [
"libskia.xcframework",
"libskshaper.xcframework",
"libsvg.xcframework",
"libskottie.xcframework",
"libsksg.xcframework",
"libskparagraph.xcframework",
"libskunicode.xcframework",
// "libskparagraph.xcframework",
// "libskunicode.xcframework",
];

const copyFiles = (from: string, to: string, files: string[]) => {
Expand Down

0 comments on commit ce3f314

Please sign in to comment.