Fix test and i386 CI (#171)

* Fix tests

* Replace apt-fast with apt-get
This commit is contained in:
andri lim 2024-10-11 15:21:30 +07:00 committed by GitHub
parent eecf0e22d6
commit a271022206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -66,8 +66,8 @@ jobs:
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
run: |
sudo dpkg --add-architecture i386
sudo apt-fast update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
sudo apt-get update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \
--no-install-recommends -yq gcc-multilib g++-multilib \
libssl-dev:i386
mkdir -p external/bin

View File

@ -79,6 +79,13 @@ proc rand[T](_: type seq[T]): seq[T] =
for i in 0..<3:
result[i] = rand(T)
proc rand(_: type array[3, seq[byte]]): array[3, seq[byte]] =
var z = newSeq[byte](10)
discard randomBytes(z)
result[0] = z
result[1] = z
result[2] = z
proc rand[T](_: type SingleOrList[T]): SingleOrList[T] =
SingleOrList[T](kind: slkSingle, single: rand(T))