Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • briar/briar-reproducer
1 result
Show changes
Commits on Source (3)
.idea
*.apk
briar
......@@ -13,6 +13,7 @@ variables:
TEST_IMAGE: briar/reproducer:${CI_BUILD_REF_NAME}
RELEASE_IMAGE: briar/reproducer:latest
TAG_IMAGE: briar/reproducer:${RELEASE_TAG}
APK_PATH: /opt/briar-reproducer/briar/briar-android/build/outputs/apk/official/release/briar-android-official-release-unsigned.apk
before_script:
- echo ${DOCKER_HUB_PASS} | docker login -u ${DOCKER_HUB_USER} --password-stdin
......@@ -30,7 +31,12 @@ test_success:
script:
# Consider adding the cap and the device directly to the CI config
# https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-docker-section
- docker run --cap-add SYS_ADMIN --device /dev/fuse ${TEST_IMAGE} ./reproduce.py release-1.1.7
- docker run --cap-add SYS_ADMIN --device /dev/fuse ${TEST_IMAGE} ./reproduce.py AndroidX
artifacts:
paths:
- ${APK_PATH}
expire_in: 1 week
when: on_failure
except:
- triggers
......@@ -47,6 +53,11 @@ release:
- docker pull $TEST_IMAGE
- docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE
artifacts:
paths:
- ${APK_PATH}
expire_in: 1 week
when: on_failure
only:
- master
- tags
......@@ -59,5 +70,10 @@ check:
- docker run --cap-add SYS_ADMIN --device /dev/fuse ${RELEASE_IMAGE} ./reproduce.py ${RELEASE_TAG}
- docker tag ${RELEASE_IMAGE} ${TAG_IMAGE}
- docker push ${TAG_IMAGE}
artifacts:
paths:
- ${APK_PATH}
expire_in: 1 week
when: on_failure
only:
- triggers
......@@ -22,10 +22,12 @@ def main():
tag = prepare_repo(tag)
# download reference binary (before building to detect missing file early on)
version = tag.split('-')[1]
url = REFERENCE_URL % version
reference_apk = "briar-%s.apk" % version
check_call(['wget', '--no-verbose', url, '-O', reference_apk])
# version = tag.split('-')[1]
# url = REFERENCE_URL % version
# reference_apk = "briar-%s.apk" % version
# check_call(['wget', '--no-verbose', url, '-O', reference_apk])
version = "1.2.0"
reference_apk = "briar-1.2.0.apk"
# use non-deterministic file system for building the app to detect issues
if not os.path.exists(BUILD_DIR):
......@@ -37,6 +39,12 @@ def main():
# check if both APKs match
apk = os.path.join(BUILD_DIR, APK_PATH if version >= "1.1.0" else OLD_APK_PATH)
print(os.path.abspath(apk))
check_call(["sha256sum", apk])
print(os.path.abspath(os.path.join(REPO_DIR, APK_PATH)))
check_call(["sha256sum", os.path.abspath(os.path.join(REPO_DIR, APK_PATH))])
if call(['./verify-apk.py', reference_apk, apk]) == 0:
print("Version '%s' was built reproducible! :)" % tag)
sys.exit(0)
......