2023-02-07 18:19:29 +00:00
|
|
|
image: alpine/3.17
|
|
|
|
packages:
|
|
|
|
- rust
|
2023-02-07 18:24:59 +00:00
|
|
|
- cargo
|
2023-02-07 18:29:10 +00:00
|
|
|
- openssl-dev
|
2023-02-07 18:39:28 +00:00
|
|
|
- postgresql
|
2023-02-07 18:43:27 +00:00
|
|
|
- sudo
|
2023-02-07 18:19:29 +00:00
|
|
|
sources:
|
|
|
|
- https://git.e3t.cc/~core/trifid
|
|
|
|
tasks:
|
2023-02-07 18:39:28 +00:00
|
|
|
- setup: |
|
2023-02-07 18:44:33 +00:00
|
|
|
sudo mkdir /run/postgresql
|
|
|
|
sudo chown postgres:postgres /run/postgresql
|
2023-02-07 18:43:27 +00:00
|
|
|
sudo -u postgres mkdir /var/lib/postgresql/data
|
|
|
|
sudo -u postgres chmod 0700 /var/lib/postgresql/data
|
|
|
|
sudo -u postgres initdb -D /var/lib/postgresql/data
|
|
|
|
sudo -u postgres pg_ctl start -D /var/lib/postgresql/data
|
2023-02-07 18:39:28 +00:00
|
|
|
cd /home/build/trifid
|
|
|
|
cargo install sqlx-cli
|
2023-02-07 18:52:42 +00:00
|
|
|
/home/build/.cargo/bin/sqlx database create
|
|
|
|
/home/build/.cargo/bin/sqlx mig run
|
2023-02-07 18:19:29 +00:00
|
|
|
- check: |
|
2023-02-07 18:26:04 +00:00
|
|
|
cd /home/build/trifid
|
2023-02-07 18:30:10 +00:00
|
|
|
cargo check --locked
|
|
|
|
cargo clippy --locked
|
2023-02-07 18:19:29 +00:00
|
|
|
- build: |
|
2023-02-07 18:26:04 +00:00
|
|
|
cd /home/build/trifid
|
2023-02-07 18:30:10 +00:00
|
|
|
cargo build --locked
|