Skip to content

Commit

Permalink
Merge branch 'develop' into issue-13560-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil authored Aug 27, 2022
2 parents eb92091 + 5df2027 commit e203899
Show file tree
Hide file tree
Showing 37 changed files with 470 additions and 362 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -298,23 +298,18 @@ shadow-server:##@ Start shadow-cljs in server mode for watching
yarn shadow-cljs server

test-watch: export TARGET := clojure
test-watch: status-go-library
test-watch: ##@ Watch tests and re-run no changes to cljs files
yarn install
nodemon --exec 'yarn shadow-cljs compile mocks && yarn shadow-cljs compile test && node --require ./test-resources/override.js target/test/test.js' -e cljs

test: export TARGET := clojure
test: status-go-library ##@test Run tests once in NodeJS
test: ##@test Run tests once in NodeJS
# Here we creates the gyp bindings for nodejs
yarn install
yarn shadow-cljs compile mocks && \
yarn shadow-cljs compile test && \
node --require ./test-resources/override.js target/test/test.js


coverage: ##@test Run tests once in NodeJS generating coverage
@scripts/run-coverage.sh

#--------------
# Other
#--------------
Expand Down
88 changes: 26 additions & 62 deletions ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
Expand Down Expand Up @@ -56,43 +56,14 @@ pipeline {
}
}
}
stage('Parallel Assemble') {
parallel {
stage('Checks') { stages {
stage('Lint') {
steps {
script {
/* We want the build result to be uploaded */
catchError(
message: 'Linting check failed!',
buildResult: 'FAILURE',
stageResult: 'FAILURE'
) {
sh 'make lint'
}
}
}
}
stage('Tests') {
steps {
script {
sh 'make test'
}
}
}
} }
stage('Build') { stages {
stage('Bundle') {
steps {
script { apks = android.bundle() }
}
}
stage('Sign') {
steps {
script { apks = android.sign(apks) }
}
}
} }
stage('Bundle') {
steps {
script { apks = android.bundle() }
}
}
stage('Sign') {
steps {
script { apks = android.sign(apks) }
}
}
stage('Parallel Upload') {
Expand All @@ -103,37 +74,30 @@ pipeline {
} }
}
stage('Upload') {
steps {
script {
def urls = apks.collect { s3.uploadArtifact(it) }
/* return only the universal APK */
if (urls.size() > 1) {
env.PKG_URL = urls.find { it.contains('universal') }
} else { /* if no universal is available pick first */
env.PKG_URL = urls.first()
}
jenkins.setBuildDesc(APK: env.PKG_URL)
/* e2e builds get tested in SauceLabs */
if (utils.isE2EBuild()) {
env.SAUCE_URL = android.uploadToSauceLabs()
}
if (utils.isNightlyBuild()) {
env.DIAWI_URL = android.uploadToDiawi()
}
steps { script {
def urls = apks.collect { s3.uploadArtifact(it) }
/* return only the universal APK */
if (urls.size() > 1) {
env.PKG_URL = urls.find { it.contains('universal') }
} else { /* if no universal is available pick first */
env.PKG_URL = urls.first()
}
jenkins.setBuildDesc(APK: env.PKG_URL)
/* e2e builds get tested in SauceLabs */
if (utils.isE2EBuild()) {
env.SAUCE_URL = android.uploadToSauceLabs()
}
if (utils.isNightlyBuild()) {
env.DIAWI_URL = android.uploadToDiawi()
}
}
} }
}
}
}
stage('Cleanup') {
steps {
sh 'make purge'
}
}
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
always { sh 'make _fix-node-perms' }
always { sh 'make purge' }
}
}
5 changes: 4 additions & 1 deletion ci/Jenkinsfile.combined
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

pipeline {
agent { label 'linux' }
Expand Down Expand Up @@ -49,6 +49,9 @@ pipeline {
stage('Android e2e') { steps { script {
apke2e = jenkins.Build('status-mobile/platforms/android-e2e')
} } }
stage('Tests') { steps { script {
ios = jenkins.Build('status-mobile/platforms/tests')
} } }
}
}
stage('Archive') {
Expand Down
75 changes: 19 additions & 56 deletions ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
Expand Down Expand Up @@ -55,43 +55,14 @@ pipeline {
}
}
}
stage('Parallel Assemble') {
parallel {
stage('Checks') { stages {
stage('Lint') {
steps {
script {
/* We want the build result to be uploaded */
catchError(
message: 'Linting check failed!',
buildResult: 'FAILURE',
stageResult: 'FAILURE'
) {
sh 'make lint'
}
}
}
}
stage('Tests') {
steps {
script {
sh 'make test'
}
}
}
} }
stage('Build') { stages {
stage('JSBundle') {
steps {
script { ios.jsbundle() }
}
}
stage('Bundle') {
steps {
script { api = ios.bundle() }
}
}
} }
stage('JSBundle') {
steps {
script { ios.jsbundle() }
}
}
stage('Bundle') {
steps {
script { api = ios.bundle() }
}
}
stage('Parallel Upload') {
Expand All @@ -102,31 +73,23 @@ pipeline {
}
}
stage('Upload') {
steps {
script {
env.PKG_URL = s3.uploadArtifact(api)
jenkins.setBuildDesc(IPA: env.PKG_URL)
/* e2e builds get tested in SauceLabs */
if (utils.isE2EBuild()) {
env.SAUCE_URL = ios.uploadToSauceLabs()
} else {
env.DIAWI_URL = ios.uploadToDiawi()
}
steps { script {
env.PKG_URL = s3.uploadArtifact(api)
jenkins.setBuildDesc(IPA: env.PKG_URL)
/* e2e builds get tested in SauceLabs */
if (utils.isE2EBuild()) {
env.SAUCE_URL = ios.uploadToSauceLabs()
} else {
env.DIAWI_URL = ios.uploadToDiawi()
}
}
} }
}
}
}
stage('Cleanup') {
steps {
sh 'make watchman-clean'
sh 'make purge'
}
}
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
always { sh 'make _fix-node-perms' }
always { sh 'make purge' }
}
}
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.nix-cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

pipeline {
agent { label params.AGENT_LABEL }
Expand Down
77 changes: 77 additions & 0 deletions ci/Jenkinsfile.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
library '[email protected]'

/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()

pipeline {
agent { label 'linux && x86_64 && nix-2.8' }

options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 10, unit: 'MINUTES')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '10',
daysToKeepStr: '20',
artifactNumToKeepStr: '10',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}

parameters {
string(
name: 'BUILD_TYPE',
description: 'Specify build type. Values: pr / e2e / nightly / release',
defaultValue: 'pr',
)
}

environment {
LANG = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
LANGUAGE = "en_US.UTF-8"
TARGET = 'tests'
BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
}

stages {
stage('Prep') {
steps {
script {
btype = utils.getBuildType()
print "Running ${btype} build!"
/* Cleanup and Prep */
commonPrep(btype)
}
}
}
stage('Checks') {
parallel {
stage('Lint') {
steps { sh "make lint > ${LOG_FILE}" }
}
stage('Tests') {
steps { sh "make test >> ${LOG_FILE}" }
}
}
}
stage('Upload') {
steps {
script {
env.PKG_URL = s3.uploadArtifact(LOG_FILE)
}
}
}
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
always { sh 'make purge' }
}
}
2 changes: 1 addition & 1 deletion ci/tests/Jenkinsfile.e2e-prs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

pipeline {

Expand Down
2 changes: 1 addition & 1 deletion ci/tools/Jenkinsfile.fastlane-clean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

pipeline {
agent { label 'macos' }
Expand Down
2 changes: 1 addition & 1 deletion ci/tools/Jenkinsfile.playstore-meta
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library '[email protected].0'
library '[email protected].1'

pipeline {
agent { label 'linux' }
Expand Down
12 changes: 6 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ PODS:
- React-Core
- React-RCTImage
- React-RCTText
- RNCAsyncStorage (1.11.0):
- React
- RNCAsyncStorage (1.17.9):
- React-Core
- RNCClipboard (1.2.2):
- React
- RNCMaskedView (0.1.9):
Expand Down Expand Up @@ -450,7 +450,7 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "ReactNativeAudioToolkit (from `../node_modules/@react-native-community/audio-toolkit`)"
- ReactNativeNavigation (from `../node_modules/react-native-navigation`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)"
Expand Down Expand Up @@ -581,7 +581,7 @@ EXTERNAL SOURCES:
ReactNativeNavigation:
:path: "../node_modules/react-native-navigation"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
:path: "../node_modules/@react-native-async-storage/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-community/clipboard"
RNCMaskedView:
Expand Down Expand Up @@ -680,7 +680,7 @@ SPEC CHECKSUMS:
ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06
ReactNativeNavigation: 94979dd1572a3f093fc85d4599360530a1bed8c8
RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36
RNCAsyncStorage: b2489b49e38c85e10ed45a888d13a2a4c7b32ea1
RNCClipboard: 8148e21ac347c51fd6cd4b683389094c216bb543
RNCMaskedView: 71fc32d971f03b7f03d6ab6b86b730c4ee64f5b6
RNCPushNotificationIOS: c145c6253ea016e5efeff604f2720736b4a596f7
Expand All @@ -706,4 +706,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: a1de9468266e7f0b5273acea713782ab759690f1

COCOAPODS: 1.11.3
COCOAPODS: 1.11.2
Loading

0 comments on commit e203899

Please sign in to comment.