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 clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
26 - cargo clippy --workspace -- -D clippy::unwrap_used
29 image: ekidd/rust-musl-builder:1.50.0
31 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
35 - sudo apt-get -y install --no-install-recommends espeak postgresql-client
36 - cargo test --workspace --no-fail-fast
39 image: ekidd/rust-musl-builder:1.50.0
42 - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
44 - name: run federation tests
45 image: node:15-alpine3.12
47 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
48 DO_WRITE_HOSTS_FILE: 1
50 - apk add bash curl postgresql-client
51 - bash api_tests/prepare-drone-federation-test.sh
56 - name: make release build and push to docker hub
59 dockerfile: docker/prod/Dockerfile
61 from_secret: docker_username
63 from_secret: docker_password
64 repo: dessalines/lemmy
66 auto_tag_suffix: linux-amd64
71 - name: push to docker manifest
72 image: plugins/manifest
75 from_secret: docker_username
77 from_secret: docker_password
78 target: "dessalines/lemmy:${DRONE_TAG}"
79 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
90 image: postgres:12-alpine
93 POSTGRES_PASSWORD: password
106 image: rust:1.50-slim-buster
108 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
112 - apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
113 - cargo test --workspace --no-fail-fast
116 # Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
118 image: rust:1.50-slim-buster
121 - apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
123 - mv target/debug/lemmy_server target/lemmy_server
125 - name: run federation tests
126 image: node:15-buster-slim
128 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
129 DO_WRITE_HOSTS_FILE: 1
131 - mkdir -p /usr/share/man/man1 /usr/share/man/man7
133 - apt-get -y install --no-install-recommends bash curl libssl-dev pkg-config libpq-dev postgresql-client libc6-dev
134 - bash api_tests/prepare-drone-federation-test.sh
139 - name: make release build and push to docker hub
140 image: plugins/docker
142 dockerfile: docker/prod/Dockerfile.arm
144 from_secret: docker_username
146 from_secret: docker_password
147 repo: dessalines/lemmy
149 auto_tag_suffix: linux-arm64
154 - name: push to docker manifest
155 image: plugins/manifest
158 from_secret: docker_username
160 from_secret: docker_password
161 target: "dessalines/lemmy:${DRONE_TAG}"
162 template: "dessalines/lemmy:${DRONE_TAG}-OS-ARCH"
173 image: postgres:12-alpine
176 POSTGRES_PASSWORD: password