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