feat: build with ndk r23c on top of webkitgtk 2.26.1 (#179) #116
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
name: Build jsc-android and test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: reactnativecommunity/react-native-android:5.4 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: 🔨 Use JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Install packages | |
run: | | |
apt-get update | |
apt-get install coreutils curl git subversion wget python3 ruby gperf -y | |
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
echo 'export NVM_DIR="$HOME/.nvm"' >> "${HOME}/.bashrc" | |
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "${HOME}/.bashrc" | |
source "${HOME}/.bashrc" | |
nvm install 16 | |
nvm use 16 | |
nvm alias default 16 | |
shell: bash | |
- name: Install Android packages | |
run: | | |
sdkmanager \ | |
"cmake;3.22.1" \ | |
"ndk;23.2.8568313" | |
# move out builtin icu headers from ndk and prevent icu build errors | |
mv "${ANDROID_HOME}/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/unicode" "${ANDROID_HOME}/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/unicode2" | |
echo "ANDROID_NDK=$ANDROID_HOME/ndk/23.2.8568313" >> $GITHUB_ENV | |
shell: bash | |
- name: Build | |
run: | | |
yarn install --frozen-lockfile | |
yarn clean | |
yarn download | |
yarn start | |
shell: bash | |
- name: Archive | |
run: | | |
mkdir -p archive | |
mv dist archive/ | |
mv dist.unstripped archive/ | |
shell: bash | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: archive | |
path: archive | |
test: | |
needs: build | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: 🔨 Use JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- uses: actions/download-artifact@v2 | |
with: | |
name: archive | |
path: archive | |
- name: Install node packages | |
run: yarn install --frozen-lockfile | |
working-directory: test | |
- name: Run test | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 21 | |
arch: x86_64 | |
disable-animations: false | |
script: mv archive/dist . && cd test && yarn && cd android && ./gradlew :app:assembleRelease :app:assembleAndroidTest :app:connectedAndroidTest |