mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
ci: pin placeholder add-on packs for the Unit tests workflow
A CI APK pins every pack, and AddonPack only reuses a device copy when the pin is empty on a non-CI build. With CI_BUILD true and no pins, RuntimeInstallRollbackTest found no DirectAudio pack.
This commit is contained in:
1 parent
5a445356e4
commit
733db7ab7d
1 file changed
+3
-1
+3
-1
@@ -82,7 +82,7 @@ def buildBranch = providers.environmentVariable('GITHUB_HEAD_REF').getOrNull()?.
|
||||
?: gitValue(['branch', '--show-current']) ?: ''
|
||||
def escapeJava = { String value -> value.replace('\\', '\\\\').replace('"', '\\"').replace('\n', ' ').replace('\r', ' ') }
|
||||
def ciBuild = providers.environmentVariable('GITHUB_ACTIONS').getOrNull() == 'true'
|
||||
// The Unit tests workflow compiles no APK, so it has no add-on packs to embed.
|
||||
// The Unit tests workflow compiles no APK, so it has no add-on packs to pin.
|
||||
def unitTestsOnly = project.findProperty('unitTestsOnly')?.toString()?.toBoolean() ?: false
|
||||
def releaseSigner = rootProject.file('keystore/release-signer.sha256').text.trim()
|
||||
def commitTime = (gitValue(['show', '-s', '--format=%ct', '--end-of-options', sourceCommit]) ?: '0').with { it.isLong() ? it : '0' }
|
||||
@@ -102,6 +102,8 @@ def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler',
|
||||
if (name == 'proot' && prootPackPin.PROOT_PACK_SHA256) {
|
||||
return [(name): [sha256: prootPackPin.PROOT_PACK_SHA256, size: (prootPackPin.PROOT_PACK_SIZE ?: '0') as long]]
|
||||
}
|
||||
// A CI APK pins every pack, and CI_BUILD code assumes that, so the tests see a placeholder pin.
|
||||
if (unitTestsOnly) return [(name): [sha256: '0' * 64, size: 0L]]
|
||||
return [(name): [sha256: '', size: 0L]]
|
||||
}
|
||||
def digest = java.security.MessageDigest.getInstance('SHA-256')
|
||||
|
||||
Reference in new issue
Block a user