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
39 CARGO_HOME: /drone/src/.cargo
42 - sudo apt-get -y install --no-install-recommends espeak postgresql-client
43 - cargo test --workspace --no-fail-fast
46 image: ekidd/rust-musl-builder:1.50.0
48 CARGO_HOME: /drone/src/.cargo
51 - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
53 - name: run federation tests
54 image: node:15-alpine3.12
56 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
57 DO_WRITE_HOSTS_FILE: 1
59 - apk add bash curl postgresql-client
60 - bash api_tests/prepare-drone-federation-test.sh
65 - name: make release build and push to docker hub
68 dockerfile: docker/prod/Dockerfile
70 from_secret: docker_username
72 from_secret: docker_password
73 repo: dessalines/lemmy
75 auto_tag_suffix: linux-amd64
80 - name: push to docker manifest
81 image: plugins/manifest
84 from_secret: docker_username
86 from_secret: docker_password
87 target: "dessalines/lemmy:${DRONE_TAG}"
88 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
99 image: postgres:12-alpine
102 POSTGRES_PASSWORD: password
115 image: rust:1.50-slim-buster
117 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
119 CARGO_HOME: /drone/src/.cargo
122 - apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
123 - cargo test --workspace --no-fail-fast
126 # Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
128 image: rust:1.50-slim-buster
130 CARGO_HOME: /drone/src/.cargo
133 - apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
135 - mv target/debug/lemmy_server target/lemmy_server
137 - name: run federation tests
138 image: node:15-buster-slim
140 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
141 DO_WRITE_HOSTS_FILE: 1
143 - mkdir -p /usr/share/man/man1 /usr/share/man/man7
145 - apt-get -y install --no-install-recommends bash curl libssl-dev pkg-config libpq-dev postgresql-client libc6-dev
146 - bash api_tests/prepare-drone-federation-test.sh
151 - name: make release build and push to docker hub
152 image: plugins/docker
154 dockerfile: docker/prod/Dockerfile.arm
156 from_secret: docker_username
158 from_secret: docker_password
159 repo: dessalines/lemmy
161 auto_tag_suffix: linux-arm64
166 - name: push to docker manifest
167 image: plugins/manifest
170 from_secret: docker_username
172 from_secret: docker_password
173 target: "dessalines/lemmy:${DRONE_TAG}"
174 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
185 image: postgres:12-alpine
188 POSTGRES_PASSWORD: password