mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 13:45:10 +00:00
[CI] Try to Mbed things out
This commit is contained in:
parent
9f1c2046fd
commit
4a2160503b
3 changed files with 19 additions and 17 deletions
|
|
@ -10,14 +10,14 @@ jobs:
|
|||
run: |
|
||||
echo $(uname -a) $(env | grep container)
|
||||
apt update -y
|
||||
apt install -y build-essential liblmdb-dev nodejs libssl-dev git wget
|
||||
apt install -y build-essential liblmdb-dev nodejs libssl-dev git wget python3
|
||||
- name: Clone everything
|
||||
run: |
|
||||
mkdir -p repos
|
||||
git clone --depth=1 https://git.musl-libc.org/git/musl repos/musl
|
||||
git clone --depth=1 https://github.com/openssl/openssl repos/openssl
|
||||
git clone --depth=1 https://github.com/Mbed-TLS/mbedtls repos/mbed
|
||||
git clone --depth=1 https://github.com/LMDB/lmdb repos/lmdb
|
||||
git clone --depth=1 https://git.kappach.at/KappaChat/Cytoplasm repos/cyto
|
||||
git clone --depth=1 https://git.kappach.at/lda/Cytoplasm repos/cyto
|
||||
echo "PREFIX=$GITHUB_WORKSPACE/usr" >> $GITHUB_ENV
|
||||
echo "PATH=$GITHUB_WORKSPACE/usr/bin:$PATH" >> $GITHUB_ENV
|
||||
echo "INCLUDE_PATH=$GITHUB_WORKSPACE/usr/include" >> $GITHUB_ENV
|
||||
|
|
@ -29,15 +29,13 @@ jobs:
|
|||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
alias musl-gcc="musl-gcc -Wl,-Bstatic -L ${PREFIX}/lib"
|
||||
- name: Build OpenSSL
|
||||
- name: Build MbedTLS
|
||||
run: |
|
||||
alias musl-gcc="musl-gcc -Wl,-Bstatic -L ${PREFIX}/lib"
|
||||
cd repos/openssl
|
||||
CC=musl-gcc ./Configure -static --static --prefix=${PREFIX} no-async no-engine -DOPENSSL_NO_SECURE_MEMORY
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
cp libcrypto.a ${PREFIX}/lib
|
||||
cp libssl.a ${PREFIX}/lib
|
||||
cd repos/mbed
|
||||
python3 -m pip install -r scripts/basic.requirements.txt --break-system-packages
|
||||
make CC=musl-gcc -j$(nproc)
|
||||
make install DESTDIR=${PREFIX} -j$(nproc)
|
||||
- name: Build LMDB
|
||||
run: |
|
||||
alias musl-gcc="musl-gcc -Wl,-Bstatic -L ${PREFIX}/lib"
|
||||
|
|
@ -48,10 +46,9 @@ jobs:
|
|||
run: |
|
||||
alias musl-gcc="musl-gcc -Wl,-Bstatic -L ${PREFIX}/lib"
|
||||
cd repos/cyto
|
||||
rm configure
|
||||
wget https://kappach.at/configure
|
||||
chmod +x configure
|
||||
./configure --cc=musl-gcc --prefix=${PREFIX} --with-lmdb
|
||||
git fetch
|
||||
git checkout add-mbed
|
||||
./configure --cc=musl-gcc --prefix=${PREFIX} --with-lmdb --with-mbed
|
||||
make -j$(nproc)
|
||||
make install
|
||||
- name: Clone/Build Parsee
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ main_build(int argc, char *argv[])
|
|||
write_images(makefile, images);
|
||||
if (with_static)
|
||||
{
|
||||
fprintf(makefile, " -lm -lpthread -lssl -lCytoplasm -lssl -lcrypto");
|
||||
fprintf(makefile, " -lm -lpthread -lmbedtls -lmbedx509 -lmbedcrypto -lCytoplasm -lmbedtls -lmbedx509 -lmbedcrypto");
|
||||
if (with_lmdb) fprintf(makefile, " -llmdb");
|
||||
}
|
||||
fprintf(makefile, " -lCytoplasm $(LDFLAGS)\n");
|
||||
|
|
@ -558,8 +558,8 @@ main_build(int argc, char *argv[])
|
|||
fprintf(makefile, " -L $(CYTO_LIB)");
|
||||
if (with_static)
|
||||
{
|
||||
fprintf(makefile, " -lm -lpthread -lssl");
|
||||
fprintf(makefile, " -lCytoplasm -lssl -lcrypto");
|
||||
fprintf(makefile, " -lm -lpthread -lmbedtls -lmbedx509 -lmbedcrypto");
|
||||
fprintf(makefile, " -lCytoplasm -lmbedtls -lmbedx509 -lmbedcrypto");
|
||||
if (with_lmdb) fprintf(makefile, " -llmdb");
|
||||
}
|
||||
fprintf(makefile, " -lCytoplasm $(CFLAGS)\n");
|
||||
|
|
|
|||
|
|
@ -159,13 +159,16 @@ ParseeCleanup(void *datp)
|
|||
ArrayAdd(to_delete, StrDuplicate(f)); \
|
||||
cleaned++; \
|
||||
} \
|
||||
Log(LOG_INFO, "Free A, %s [%s][%p]", f, #field, ref); \
|
||||
DbUnlock(data->db, ref); \
|
||||
Log(LOG_INFO, "Free'd!"); \
|
||||
} \
|
||||
DbListFree(field##_list); \
|
||||
\
|
||||
for (j = 0; j < ArraySize(to_delete); j++) \
|
||||
{ \
|
||||
field = ArrayGet(to_delete, j); \
|
||||
Log(LOG_INFO, "%s (%ss)", field, #field"s"); \
|
||||
if (cleaned > threshold) \
|
||||
{ \
|
||||
DbDelete(data->db, 4, "chats", chat, #field"s", field); \
|
||||
|
|
@ -236,7 +239,9 @@ ParseeCleanup(void *datp)
|
|||
CleanupField(event, 3 HOURS, 500);
|
||||
CleanupField(id, 3 HOURS, 500);
|
||||
|
||||
Log(LOG_INFO, "Free B %p", ref);
|
||||
DbUnlock(data->db, ref);
|
||||
Log(LOG_INFO, "Free'd!");
|
||||
}
|
||||
DbListFree(chats);
|
||||
Log(LOG_DEBUG, "Cleant up %d entries...", entries);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue