From 68da60e17b0d7643b65a5fe6236b4fc8366363ab Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Tue, 7 Feb 2023 13:39:28 -0500 Subject: [PATCH] create local dev database for sqlx to compile in ci --- .build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.build.yml b/.build.yml index ad5f4b4..49fb90e 100644 --- a/.build.yml +++ b/.build.yml @@ -3,9 +3,21 @@ packages: - rust - cargo - openssl-dev + - postgresql sources: - https://git.e3t.cc/~core/trifid tasks: + - setup: | + mkdir /run/postgresql + chown postgres:postgres /run/postgresql/ + su postgres -c mkdir /var/lib/postgresql/data + su postgres -c chmod 0700 /var/lib/postgresql/data + su postgres -c initdb -D /var/lib/postgresql/data + su postgres -c pg_ctl start -D /var/lib/postgresql/data + cd /home/build/trifid + cargo install sqlx-cli + sqlx database create + sqlx mig run - check: | cd /home/build/trifid cargo check --locked