Skip to content

Commit 6363e48

Browse files
authored
[build] clean up travis config and legacy build scripts (#3224)
1 parent 49bca81 commit 6363e48

26 files changed

+3
-1693
lines changed

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.muppignoresubmodule

Whitespace-only changes.

.travis.yml

Lines changed: 1 addition & 227 deletions
Original file line numberDiff line numberDiff line change
@@ -1,227 +1 @@
1-
os: linux
2-
language: node_js
3-
node_js: 12.6.0
4-
matrix:
5-
fast_finish: true
6-
include:
7-
- env: TEST_SUITE=danger
8-
- env: TEST_SUITE=jsfm
9-
- env: TEST_SUITE=ios
10-
os: osx
11-
osx_image: xcode12
12-
language: objective-c
13-
- env: TEST_SUITE=android ABI=armeabi-v7a
14-
language: android
15-
dist: trusty
16-
jdk: oraclejdk8
17-
android:
18-
components:
19-
- android-28
20-
- extra-android-m2repository
21-
- env: TEST_SUITE=android ABI=arm64-v8a
22-
language: android
23-
dist: trusty
24-
jdk: oraclejdk8
25-
android:
26-
components:
27-
- android-28
28-
- extra-android-m2repository
29-
- env: TEST_SUITE=android ABI=x86
30-
language: android
31-
dist: trusty
32-
jdk: oraclejdk8
33-
android:
34-
components:
35-
- android-28
36-
- extra-android-m2repository
37-
- env: TEST_SUITE=android ABI=x86_64
38-
language: android
39-
dist: trusty
40-
jdk: oraclejdk8
41-
android:
42-
components:
43-
- android-28
44-
- extra-android-m2repository
45-
# static check
46-
- env: TEST_SUITE=static_code_analysis OCLINT=true
47-
os: osx
48-
osx_image: xcode12
49-
language: objective-c
50-
- env: TEST_SUITE=static_code_analysis ANDROID_LINT=true
51-
language: android
52-
dist: trusty
53-
jdk: oraclejdk8
54-
android:
55-
components:
56-
- android-28
57-
- extra-android-m2repository
58-
59-
cache:
60-
directories:
61-
- npm
62-
- $HOME/.gradle/caches/
63-
- $HOME/.gradle/wrapper/
64-
- $HOME/.android/build-cache
65-
- $HOME/android-ndk-r18b
66-
- bundle
67-
68-
git:
69-
depth: false
70-
71-
before_cache:
72-
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
73-
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
74-
- rm -fr $HOME/node_modules/*
75-
76-
before_install:
77-
- |
78-
# install android lint
79-
if [[ ("$TEST_SUITE" = "static_code_analysis") && ("${ANDROID_LINT}" = "true") ]]; then
80-
apt-get install rubygems
81-
gem install bundler
82-
bundle install
83-
fi
84-
85-
# install oclint
86-
if [[ ("$TEST_SUITE" = "static_code_analysis") && ("${OCLINT}" = "true") ]]; then
87-
brew cask uninstall oclint
88-
brew tap oclint/formulae
89-
brew install oclint
90-
fi
91-
92-
93-
94-
install:
95-
- |
96-
if [[ ("$TEST_SUITE" = "android") || ("${ANDROID_LINT}" = "true") ]]; then
97-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
98-
nvm install 12.6.0
99-
npm install
100-
echo y | sdkmanager "cmake;3.6.4111459"
101-
if find "${HOME}/android-ndk-r18b" -mindepth 1 | read; then
102-
echo "NDK cache hit"
103-
else
104-
echo "NDK cache missed"
105-
rmdir "${HOME}/android-ndk-r18b"
106-
fi
107-
108-
if [[ ! -d "${HOME}/android-ndk-r18b" ]]; then
109-
wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
110-
unzip android-ndk-r18b-linux-x86_64.zip -d $HOME
111-
fi
112-
export ANDROID_NDK_HOME=$HOME/android-ndk-r18b
113-
export PATH=$PATH:$ANDROID_NDK_HOME
114-
echo "ndk.dir=$ANDROID_NDK_HOME" > android/local.properties
115-
elif [[ ("$TEST_SUITE" = "jsfm") || ("$TEST_SUITE" = "danger") || ("${OCLINT}" = "true") ]]; then
116-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
117-
nvm install 12.6.0
118-
npm install
119-
elif [[ ("$TEST_SUITE" = "ios") ]]; then
120-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
121-
nvm install 12.6.0
122-
123-
git submodule update --init --remote
124-
cd weex-playground/ios && bash update_podfile_for_travisci.sh
125-
cd ../../ && npm install
126-
cd weex-playground/ios && bundle install && pod install --repo-update
127-
cd ../../
128-
fi
129-
130-
131-
script:
132-
- |
133-
case $TEST_SUITE in
134-
"android")
135-
case $ABI in
136-
"armeabi-v7a" )
137-
GRADLE_ABI="-PsupportArmeabi-v7a=true -PsupportArm64-v8a=false -PsupportX86=false -PsupportX86_64=false"
138-
;;
139-
"arm64-v8a" )
140-
GRADLE_ABI="-PsupportArmeabi-v7a=false -PsupportArm64-v8a=true -PsupportX86=false -PsupportX86_64=false"
141-
;;
142-
"x86" )
143-
GRADLE_ABI="-PsupportArmeabi-v7a=false -PsupportArm64-v8a=false -PsupportX86=true -PsupportX86_64=false"
144-
;;
145-
"x86_64" )
146-
GRADLE_ABI="-PsupportArmeabi-v7a=false -PsupportArm64-v8a=false -PsupportX86=false -PsupportX86_64=true"
147-
;;
148-
"*" )
149-
GRADLE_ABI=""
150-
;;
151-
esac
152-
if npm run danger -- ci --dangerfile ./dangerfile-android.js | grep -q "hasAndroidFile" ; then
153-
cd android
154-
./gradlew clean assembleRelease --quiet -PbuildRuntimeApi=true ${GRADLE_ABI} -PapachePackageName="false" || exit 1
155-
./gradlew :weex_sdk:assembleRelease --quiet -PbuildRuntimeApi=true ${GRADLE_ABI} -PapachePackageName="true" || exit 1
156-
if [[ "$ABI" != "x86_64" ]]; then
157-
./gradlew assembleRelease --quiet ${GRADLE_ABI} -PbuildRuntimeApi=false -Pjsc_url="https://raw.githubusercontent.com/apache/incubator-weex/release/0.26/android/sdk/weex_sdk-0.26.0.aar" -Paar_name="weex_sdk" -PJSInterpolatorName="JavaScriptCore" -PapachePackageName="false" || exit 1
158-
./gradlew :weex_sdk:assembleRelease --quiet ${GRADLE_ABI} -PbuildRuntimeApi=false -Pjsc_url="https://raw.githubusercontent.com/apache/incubator-weex/release/0.26/android/sdk/weex_sdk-0.26.0.aar" -Paar_name="weex_sdk" -PJSInterpolatorName="JavaScriptCore" -PapachePackageName="true" || exit 1
159-
fi
160-
fi
161-
;;
162-
"jsfm" )
163-
npm run danger -- ci -i jsfm --dangerfile ./dangerfile-jsfm.js
164-
;;
165-
"danger" )
166-
npm run danger -- ci -i danger --dangerfile ./dangerfile.js
167-
;;
168-
"ios" )
169-
if npm run danger -- ci --dangerfile ./dangerfile-ios.js | grep -q "hasIosFile" ; then
170-
# build WeexSDK and run WeexSDKTests
171-
xcodebuild -quiet -project ios/sdk/WeexSDK.xcodeproj test -scheme WeexSDKTests CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination "platform=iOS Simulator,name=iPhone 6" || exit 1
172-
# build WeexDemo and run WeexDemo test
173-
cd weex-playground/ios && mkdir tmp && mv * tmp;cd tmp
174-
xcodebuild -quiet -workspace WeexDemo.xcworkspace test -scheme WeexDemo CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination "platform=iOS Simulator,name=iPhone 6" || exit 1
175-
fi
176-
;;
177-
esac
178-
179-
if [[ ("$TEST_SUITE" = "static_code_analysis") && ("${OCLINT}" = "true") ]]; then
180-
if npm run danger -- ci --dangerfile ./dangerfile-static-check.js | grep -q "hasCFile" ; then
181-
echo "hasCFile"
182-
cd ios/sdk && xcodebuild | xcpretty -r json-compilation-database -o compile_commands.json
183-
oclint-json-compilation-database oclint_args -- \
184-
-disable-rule=ShortVariableName \
185-
-disable-rule=LongLine \
186-
-disable-rule=LongMethod \
187-
-disable-rule=HighNcssMethod \
188-
-disable-rule=LongVariableName \
189-
-disable-rule=HighCyclomaticComplexity \
190-
-disable-rule=HighNPathComplexity \
191-
-disable-rule=UnusedLocalVariable \
192-
-disable-rule=DoubleNegative \
193-
-disable-rule=MultipleUnaryOperator \
194-
-disable-rule=DeepNestedBlock \
195-
-disable-rule=AssignIvarOutsideAccessors \
196-
-disable-rule=BitwiseOperatorInConditional \
197-
-max-priority-1=15000 \
198-
-max-priority-2=15000 \
199-
-max-priority-3=15000 > oclint.log
200-
export TITLE="OCLint Result"
201-
cd ../../ && npm run danger -- ci -i oclint --dangerfile ./dangerfile-output.js || exit 1
202-
fi
203-
fi
204-
205-
if [[ ("$TEST_SUITE" = "static_code_analysis") && ("${ANDROID_LINT}" = "true") ]]; then
206-
if npm run danger -- ci --dangerfile ./dangerfile-static-check.js | grep -q "hasAndroidFile" ; then
207-
echo "hasAndroidFile"
208-
cd android
209-
./gradlew :weex_sdk:lintLegacyRelease -PapachePackageName="false" --quiet
210-
./gradlew :weex_sdk:lintApacheRelease -PapachePackageName="true" --quiet
211-
export TITLE="AndroidLint Result"
212-
cd ../ && npm run danger -- ci -i androidlint --dangerfile ./dangerfile-output.js || exit 1
213-
fi
214-
fi
215-
216-
notifications:
217-
webhooks:
218-
on_pull_requests: false
219-
urls:
220-
- https://oapi.dingtalk.com/robot/send?access_token=5a6be5eb6ad180fa4d04bdda0b24857ee49c3dd985361efdf0964aa9134ee623
221-
on_success: never
222-
on_failure: always
223-
email:
224-
recipients:
225-
226-
on_success: never
227-
on_failure: always
1+
# TODO: Re-configure the CI https://github.com/alibaba/weex/issues/3213

CHANGELOG.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

DISCLAIMER

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dangerfile

Whitespace-only changes.

Dangerfile-ios

Lines changed: 0 additions & 5 deletions
This file was deleted.

HOW-TO-BUILD.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
# Weex Apache Source Release
2-
Weex produce SDKs to integrate with iOS/Android/Mobile web applications. This file will cover how to build Weex from command line. You can either use the script we provided or manually build from source step by step.
3-
See `README.md` for further information about the Weex Framework.
4-
5-
Weex SDK includes 3 different SDKs to use in corresponding system/browser:
6-
* Android SDK
7-
* iOS SDK
8-
* [Mobile Web SDK](https://github.com/weexteam/weex-vue-render)
9-
10-
See our [guide in our website](http://weex.io/guide/integrate-to-your-app.html) to learn more about how to integrate Weex SDK into your app.
1+
> **NOTICE: This document is outdated and will be rewritten. (WIP)**
112
123
# Build Environment
134

@@ -38,10 +29,7 @@ This article was tested in MacOSX system.
3829

3930
# Build All by Script
4031

41-
This script will build Android and iOS SDKs:
42-
> `$ bash scripts/build_from_source.sh `
43-
44-
This may take a while. After that, you can look in `dist/`, `android/sdk/build/outputs/aar` and `ios/sdk/Products` for Web / Android / iOS SDK artifacts.
32+
// TODO: update this document
4533

4634
# Build for Platforms
4735

@@ -69,14 +57,6 @@ npm run build:vue
6957
npm run build:rax
7058
```
7159

72-
### Before build Native SDK
73-
Move `min` version to Native SDK folder, which will be used by native SDK build.
74-
75-
```
76-
cp packages/weex-js-framework/index.min.js ios/sdk/WeexSDK/Resources/main.js
77-
cp packages/weex-js-framework/index.min.js android/sdk/assets/main.js
78-
```
79-
8060
## Build Android SDK
8161

8262
1. Install the [Android environment](#android).

NOTICE

Lines changed: 0 additions & 5 deletions
This file was deleted.

SCRIPTS.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)