diff --git a/.github/workflows/ci-graphite.yml b/.github/workflows/ci-graphite.yml index 32619065bc..fc29c2142c 100644 --- a/.github/workflows/ci-graphite.yml +++ b/.github/workflows/ci-graphite.yml @@ -229,3 +229,46 @@ jobs: - name: Run e2e tests working-directory: packages/skia run: CI=true E2E=true yarn test -i Paths + + build-library-graphite: + runs-on: ubuntu-latest + outputs: + run_id: ${{ github.run_id }} + steps: + - name: Checkout + uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v5.0.0 + with: + submodules: recursive + + - name: Setup + uses: ./.github/actions/setup + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + graphite: true + + - name: Build package + run: yarn build + + - name: Prepare package for graphite bundle + working-directory: packages/skia + run: node -e "const p=require('./package.json'); delete p.scripts.postinstall; p.files.push('libs/**'); require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2) + '\n')" + + - name: Pack package + working-directory: packages/skia + run: yarn pack + + - name: Upload package artifact + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v6.0.0 + with: + name: package-tgz + path: packages/skia/package.tgz + + test-package-e2e-graphite: + needs: build-library-graphite + uses: ./.github/workflows/test-skia-package.yml + with: + skia_version: artifact:${{ needs.build-library-graphite.outputs.run_id }} + test_ios: true + test_android: true + test_web: true + android_min_sdk: '26' diff --git a/.github/workflows/test-skia-package.yml b/.github/workflows/test-skia-package.yml index 50b87c53ad..ffed4ff6fe 100644 --- a/.github/workflows/test-skia-package.yml +++ b/.github/workflows/test-skia-package.yml @@ -32,6 +32,11 @@ on: required: false default: 'Nexus 5X' type: string + android_min_sdk: + description: 'Android minSdkVersion override' + required: false + default: '' + type: string test_web: description: 'Run Web tests' required: false @@ -302,6 +307,23 @@ jobs: echo "Installing expo-dev-client..." npx expo install expo-dev-client + - name: Override minSdkVersion + if: inputs.android_min_sdk != '' + working-directory: /Users/runner/skia-test-app/my-app + run: | + echo "Setting minSdkVersion to ${{ inputs.android_min_sdk }} in app.json..." + node -e " + const f = './app.json'; + const app = require(f); + app.expo = app.expo || {}; + app.expo.android = app.expo.android || {}; + app.expo.plugins = app.expo.plugins || []; + app.expo.plugins.push(['expo-build-properties', { android: { minSdkVersion: ${{ inputs.android_min_sdk }} } }]); + require('fs').writeFileSync(f, JSON.stringify(app, null, 2) + '\n'); + " + npx expo install expo-build-properties + cat app.json + - name: Prebuild native directories working-directory: /Users/runner/skia-test-app/my-app run: |