-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (143 loc) · 6.63 KB
/
development-client.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Development Client
on:
workflow_dispatch: {}
# This task will fail due to migration to `expo-modules-core`.
# We temporary disable it.
# pull_request:
# paths:
# - .github/workflows/development-client.yml
# - packages/expo-dev-*/**
# push:
# branches: [master]
# paths:
# - .github/workflows/development-client.yml
# - packages/expo-dev-*/**
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
android:
runs-on: ubuntu-18.04
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: false
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('android/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
id: cache-android-ndk
with:
path: /usr/local/lib/android/sdk/ndk/19.2.5345600/
key: ${{ runner.os }}-ndk-19.2.5345600
restore-keys: |
${{ runner.os }}-ndk-
- name: Install NDK
if: steps.cache-android-ndk.outputs.cache-hit != 'true'
run: |
sudo $ANDROID_SDK_ROOT/tools/bin/sdkmanager --install "ndk;19.2.5345600"
- run: yarn global add expo-cli
- run: echo "$(yarn global bin)" >> $GITHUB_PATH
- name: Init new expo app
working-directory: ../
run: expo-cli init development-client-android-test --name development-client-android-test --yes
- name: Make Yarn resolve expo-dev-client dependencies locally
working-directory: ../development-client-android-test
run: |
node -e " \
const pkg = require('./package.json'); \
pkg.resolutions = { \
...pkg.resolutions, \
'expo-dev-menu': 'file:../expo/packages/expo-dev-menu', \
'expo-dev-menu-interface': 'file:../expo/packages/expo-dev-menu-interface', \
'expo-dev-launcher': 'file:../expo/packages/expo-dev-launcher', \
'expo-updates-interface': 'file:../expo/packages/expo-updates-interface', \
'expo-updates': 'file:../expo/packages/expo-updates', \
'expo-manifests': 'file:../expo/packages/expo-manifests', \
'expo-json-utils': 'file:../expo/packages/expo-json-utils', \
}; \
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2) + '\n');"
- name: Add dependencies
working-directory: ../development-client-android-test
run: yarn add file:../expo/packages/expo-dev-client
- name: Setup app.config.json
working-directory: ../development-client-android-test
run: echo "{\"name\":\"development-client-android-test\",\"plugins\":[\"expo-dev-client\"],\"android\":{\"package\":\"com.devclient.test\"},\"ios\":{\"bundleIdentifier\":\"com.devclient.test\"}}" > app.config.json
- name: Eject
working-directory: ../development-client-android-test
run: expo-cli eject
- name: Bump `build tools`
working-directory: ../development-client-android-test
run: sed -i -e 's/buildToolsVersion\ =\ \"29\..\..\"/buildToolsVersion\ = \"30\.0\.3\"/' ./android/build.gradle
- name: Bump `android build tools`
working-directory: ../development-client-android-test
run: sed -i -e 's/com\.android\.tools\.build:gradle:3\..\../com\.android\.tools\.build:gradle:3\.5\.4/' ./android/build.gradle
- name: Build debug
env:
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/19.2.5345600/
working-directory: ../development-client-android-test/android
run: ./gradlew assembleDebug
ios:
runs-on: macos-11
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: false
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn global add expo-cli
- run: echo "$(yarn global bin)" >> $GITHUB_PATH
- name: Init new expo app
working-directory: ../
run: expo-cli init development-client-ios-test --name development-client-ios-test --yes
- name: Make Yarn resolve expo-dev-client dependencies locally
working-directory: ../development-client-ios-test
run: |
node -e " \
const pkg = require('./package.json'); \
pkg.resolutions = { \
...pkg.resolutions, \
'expo-dev-menu': 'file:../expo/packages/expo-dev-menu', \
'expo-dev-menu-interface': 'file:../expo/packages/expo-dev-menu-interface', \
'expo-dev-launcher': 'file:../expo/packages/expo-dev-launcher', \
'expo-updates-interface': 'file:../expo/packages/expo-updates-interface', \
'expo-updates': 'file:../expo/packages/expo-updates', \
'expo-manifests': 'file:../expo/packages/expo-manifests', \
'expo-json-utils': 'file:../expo/packages/expo-json-utils', \
}; \
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2) + '\n');"
- name: Add dependencies
working-directory: ../development-client-ios-test
run: yarn add file:../expo/packages/expo-dev-client
- name: Setup app.config.json
working-directory: ../development-client-ios-test
run: echo "{\"name\":\"development-client-ios-test\",\"plugins\":[\"expo-dev-client\"],\"android\":{\"package\":\"com.devclient.test\"},\"ios\":{\"bundleIdentifier\":\"com.devclient.test\"}}" > app.config.json
- name: Eject
working-directory: ../development-client-ios-test
run: expo-cli eject
- name: Build debug
working-directory: ../development-client-ios-test
run: xcodebuild -workspace ios/developmentclientiostest.xcworkspace -scheme developmentclientiostest -configuration debug -sdk iphonesimulator -arch x86_64