Trying to setup the env correctly for building

pull/1413/head
Morgan Pretty 5 months ago
parent 79e545b7d1
commit 5f0d5b7fc7

@ -1,5 +1,16 @@
local docker_base = 'registry.oxen.rocks/lokinet-ci-'; local docker_base = 'registry.oxen.rocks/lokinet-ci-';
// Log a bunch of version information to make it easier for debugging
local version_info = {
name: 'Version Information',
image: docker_base + 'android',
commands: [
'/usr/lib/android-ndk --version',
'/usr/lib/android-sdk --version'
]
};
// Intentionally doing a depth of 2 as libSession-util has it's own submodules (and libLokinet likely will as well) // Intentionally doing a depth of 2 as libSession-util has it's own submodules (and libLokinet likely will as well)
local clone_submodules = { local clone_submodules = {
name: 'Clone Submodules', name: 'Clone Submodules',
@ -19,11 +30,13 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
platform: { arch: 'amd64' }, platform: { arch: 'amd64' },
trigger: { event: { exclude: [ 'push' ] } }, trigger: { event: { exclude: [ 'push' ] } },
steps: [ steps: [
version_info,
clone_submodules, clone_submodules,
{ {
name: 'Run Unit Tests', name: 'Run Unit Tests',
image: 'registry.oxen.rocks/lokinet-ci-android', image: docker_base + 'android',
pull: 'always', pull: 'always',
environment: { ANDROID_HOME: '/usr/lib/android-sdk' },
commands: [ commands: [
'./gradlew testPlayDebugUnitTestCoverageReport' './gradlew testPlayDebugUnitTestCoverageReport'
], ],
@ -40,7 +53,7 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
steps: [ steps: [
{ {
name: 'Poll for build artifact existence', name: 'Poll for build artifact existence',
image: 'registry.oxen.rocks/lokinet-ci-android', image: docker_base + 'android',
pull: 'always', pull: 'always',
commands: [ commands: [
'./Scripts/drone-upload-exists.sh' './Scripts/drone-upload-exists.sh'
@ -56,16 +69,25 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
platform: { arch: 'amd64' }, platform: { arch: 'amd64' },
trigger: { event: { exclude: [ 'pull_request' ] } }, trigger: { event: { exclude: [ 'pull_request' ] } },
steps: [ steps: [
version_info,
clone_submodules, clone_submodules,
{ {
name: 'Build', name: 'Build',
image: 'registry.oxen.rocks/lokinet-ci-android', image: docker_base + 'android',
pull: 'always',
environment: { ANDROID_HOME: '/usr/lib/android-sdk' },
commands: [
'./gradlew assemblePlayDebug'
],
},
{
name: 'Upload artifacts',
image: docker_base + 'android',
pull: 'always', pull: 'always',
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } }, environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
commands: [ commands: [
'./gradlew assemblePlayDebug',
'./Scripts/drone-static-upload.sh' './Scripts/drone-static-upload.sh'
], ]
}, },
], ],
} }

Loading…
Cancel
Save