Skip to content
Open
43 changes: 43 additions & 0 deletions .github/workflows/ci-graphite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
22 changes: 22 additions & 0 deletions .github/workflows/test-skia-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
Loading