12 image: ekidd/rust-musl-builder:1.50.0
15 - chown 1000:1000 . -R
17 - name: check formatting
18 image: rustdocker/rust:nightly
20 - /root/.cargo/bin/cargo fmt -- --check
23 image: ekidd/rust-musl-builder:1.50.0
25 CARGO_HOME: /drone/src/.cargo
31 - cargo clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
32 - cargo clippy --workspace -- -D clippy::unwrap_used
35 image: ekidd/rust-musl-builder:1.50.0
37 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
40 CARGO_HOME: /drone/src/.cargo
43 - sudo apt-get -y install --no-install-recommends espeak postgresql-client
44 - cargo test --workspace --no-fail-fast
47 image: ekidd/rust-musl-builder:1.50.0
49 CARGO_HOME: /drone/src/.cargo
52 - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
54 - name: run federation tests
55 image: node:15-alpine3.12
57 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
58 DO_WRITE_HOSTS_FILE: 1
60 - apk add bash curl postgresql-client
61 - bash api_tests/prepare-drone-federation-test.sh
66 - name: make release build and push to docker hub
69 dockerfile: docker/prod/Dockerfile
71 from_secret: docker_username
73 from_secret: docker_password
74 repo: dessalines/lemmy
76 auto_tag_suffix: linux-amd64
81 - name: push to docker manifest
82 image: plugins/manifest
85 from_secret: docker_username
87 from_secret: docker_password
88 target: "dessalines/lemmy:${DRONE_TAG}"
89 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
100 image: postgres:12-alpine
103 POSTGRES_PASSWORD: password
116 image: rust:1.50-slim-buster
118 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
121 CARGO_HOME: /drone/src/.cargo
124 - apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
125 - cargo test --workspace --no-fail-fast
128 # Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
130 image: rust:1.50-slim-buster
132 CARGO_HOME: /drone/src/.cargo
135 - apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
137 - mv target/debug/lemmy_server target/lemmy_server
139 - name: run federation tests
140 image: node:15-buster-slim
142 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
143 DO_WRITE_HOSTS_FILE: 1
145 - mkdir -p /usr/share/man/man1 /usr/share/man/man7
147 - apt-get -y install --no-install-recommends bash curl libssl-dev pkg-config libpq-dev postgresql-client libc6-dev
148 - bash api_tests/prepare-drone-federation-test.sh
153 - name: make release build and push to docker hub
154 image: plugins/docker
156 dockerfile: docker/prod/Dockerfile.arm
158 from_secret: docker_username
160 from_secret: docker_password
161 repo: dessalines/lemmy
163 auto_tag_suffix: linux-arm64
168 - name: push to docker manifest
169 image: plugins/manifest
172 from_secret: docker_username
174 from_secret: docker_password
175 target: "dessalines/lemmy:${DRONE_TAG}"
176 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
187 image: postgres:12-alpine
190 POSTGRES_PASSWORD: password