Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/actions/setup-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,18 @@ runs:
java-version: '17'
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
# Borealis depends on the exact SDK revision; the guard below fails the
# build if it ever drifts. This revision carries the package-install
# and Google-Play-sign-in work in-tree, so no local patch is applied.
repository: gavdevs/light-sdk
ref: 52fbc5a8aedbd3c4c88037580709e53540086229
ref: b1a2d859df773c2d145fdc8fb65d11e108671d5c
path: .ci/light-sdk
persist-credentials: false
- name: Apply the checked-in Borealis SDK patch
- name: Assert the pinned SDK revision
shell: bash
run: |
set -euo pipefail
test "$(git -C .ci/light-sdk rev-parse HEAD)" = '52fbc5a8aedbd3c4c88037580709e53540086229'
git -C .ci/light-sdk apply --check "$GITHUB_WORKSPACE/patches/light-sdk-borealis.patch"
git -C .ci/light-sdk apply "$GITHUB_WORKSPACE/patches/light-sdk-borealis.patch"
- name: Apply the checked-in Borealis SDK extension
shell: bash
run: |
set -euo pipefail
python3 -B -m unittest discover -s scripts -p test_apply_sdk_extension.py
python3 -B scripts/apply-sdk-extension.py .ci/light-sdk
test "$(git -C .ci/light-sdk rev-parse HEAD)" = 'b1a2d859df773c2d145fdc8fb65d11e108671d5c'
- uses: gradle/actions/setup-gradle@748248ddd2a24f49513d8f472f81c3a07d4d50e1 # v4.4.4
with:
cache-read-only: ${{ inputs.cache-read-only == 'true' || github.event_name == 'pull_request' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ val borealisSyncJob: LightJobHandler = { context, _ ->
val result = BorealisServices.from(context).repository.syncAndUpdate()
result.fold(
onSuccess = { summary ->
LightJobResult.Success(mapOf("message" to summary.message))
LightJobResult.Success(
mapOf("message" to summary.message),
outputFilePath = null,
message = null,
)
},
onFailure = { error ->
LightJobResult.Retry
Expand Down
95 changes: 0 additions & 95 deletions scripts/apply-sdk-extension.py

This file was deleted.

21 changes: 3 additions & 18 deletions scripts/release-package.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)

ROOT = Path(__file__).resolve().parent.parent
SDK_REVISION = '52fbc5a8aedbd3c4c88037580709e53540086229'
SDK_REVISION = 'b1a2d859df773c2d145fdc8fb65d11e108671d5c'
GPLAY_REVISION = '18ec2bd74995d30e500b756359a4de3e37976f03'
output = ROOT / 'release-output'
output.mkdir(exist_ok=True)
Expand All @@ -44,13 +44,6 @@ def sha256(path):

if git(sdk, 'rev-parse', 'HEAD') != SDK_REVISION:
raise SystemExit('Unexpected SDK revision.')
extension_files = sorted((ROOT / 'sdk-extension/client').rglob('*.kt'))
if not extension_files:
raise SystemExit('SDK extension sources are missing.')
for source in extension_files:
built_source = sdk / 'sdk' / source.relative_to(ROOT / 'sdk-extension')
if not built_source.is_file() or sha256(source) != sha256(built_source):
raise SystemExit('Built SDK extension differs from the corresponding source.')
commit = git(ROOT, 'rev-parse', 'HEAD')
tag = f"v{tool['versionName']}"
if os.environ.get('RELEASE_TAG') != tag:
Expand Down Expand Up @@ -92,9 +85,7 @@ def sha256(path):
(output / 'release-build.json').write_text(json.dumps(build, indent=2) + '\n')

subprocess.run(['git', 'archive', '--format=tar.gz', '--prefix=borealis/', f'--output={output / "borealis-source.tar.gz"}', commit], cwd=ROOT, check=True)
subprocess.run(['git', 'archive', '--format=tar.gz', '--prefix=light-sdk/', f'--output={output / "light-sdk-base-source.tar.gz"}', SDK_REVISION], cwd=sdk, check=True)
shutil.copyfile(ROOT / 'patches/light-sdk-borealis.patch', output / 'light-sdk-borealis.patch')
shutil.copyfile(ROOT / 'patches/LICENSE.light-sdk', output / 'LICENSE.light-sdk')
subprocess.run(['git', 'archive', '--format=tar.gz', '--prefix=light-sdk/', f'--output={output / "light-sdk-source.tar.gz"}', SDK_REVISION], cwd=sdk, check=True)
shutil.copyfile(ROOT / 'licenses/LICENSE.tink', output / 'LICENSE.tink')
shutil.copyfile(ROOT / 'LICENSE', output / 'LICENSE')
shutil.copyfile(ROOT / 'THIRD_PARTY_NOTICES.md', output / 'THIRD_PARTY_NOTICES.md')
Expand Down Expand Up @@ -145,13 +136,7 @@ def sha256(path):
'companionUrl': COMPANION_URL,
'apk': apk_name,
'signingCertificateSha256': expected,
'sdk': {'repository': 'https://github.com/gavdevs/light-sdk', 'commit': SDK_REVISION,
'patchSha256': sha256(output / 'light-sdk-borealis.patch'),
'extensionInstallerSha256': sha256(ROOT / 'scripts/apply-sdk-extension.py'),
'extensionFiles': {
str(path.relative_to(ROOT)): sha256(path)
for path in extension_files
}},
'sdk': {'repository': 'https://github.com/gavdevs/light-sdk', 'commit': SDK_REVISION},
'gplayapi': {'coordinate': 'com.auroraoss:gplayapi:3.6.4', 'commit': GPLAY_REVISION,
'sourceUrl': source_url, 'sourceSha256': sha256(gplay_archive)},
'tink': {'coordinate': 'com.google.crypto.tink:tink:1.20.0', 'license': 'Apache-2.0',
Expand Down
122 changes: 0 additions & 122 deletions scripts/test_apply_sdk_extension.py

This file was deleted.

Loading