Compare commits

...
Sign in to create a new pull request.

22 commits
main ... main

Author SHA1 Message Date
73a3cd2aab ci: maybe? 2025-06-01 21:49:30 +02:00
6910afd12a ci: back to debian we go 2025-06-01 21:45:24 +02:00
193832b43a ci: whoops add missing commands 2025-06-01 21:38:15 +02:00
c1c201d3c0 ci: test 1 million and 2 2025-06-01 21:36:44 +02:00
3744307b8b ci: okay then 2025-06-01 21:28:19 +02:00
dbf1504e7c ci: lets try again 2025-06-01 21:23:59 +02:00
9116ce3909 ci: lets try this 2025-06-01 21:19:23 +02:00
0e2bef889b ci: yuh 2025-06-01 21:17:47 +02:00
f9195115f3 ci: remove sudo again 2025-06-01 21:14:50 +02:00
3e49b349e8 ci: add a repo 2025-06-01 21:14:13 +02:00
770e72ff5a Revert "ci: try using crossbuild package"
This reverts commit 1a7fdac049.
2025-06-01 21:11:46 +02:00
1a7fdac049 ci: try using crossbuild package
please please please work
2025-06-01 20:10:58 +02:00
57a5733cbe ci: remove sudo -_- 2025-06-01 20:07:59 +02:00
e915e38a1e ci: add missing architecture 2025-06-01 20:07:29 +02:00
554bdadb97 ci: fix apt command 2025-06-01 20:05:54 +02:00
db2f43f326 ci: add libssl-dev for arm64 cross 2025-06-01 20:03:59 +02:00
0b0befe5b9 ci: lets try this another way 2025-06-01 20:00:11 +02:00
93ccbcb5f1 ci: try removing quotes? 2025-06-01 19:46:51 +02:00
47cb246a63 ci: add missing -y 2025-06-01 19:43:19 +02:00
42f281b3e9 ci: install podman container engine 2025-06-01 19:42:47 +02:00
d3ae5dc91f ci: remove non-existent secret 2025-06-01 19:38:59 +02:00
315a8b9954 ci: test ci 2025-06-01 19:38:19 +02:00
3 changed files with 22 additions and 29 deletions

View file

@ -3,13 +3,24 @@ when:
branch: main branch: main
steps: steps:
- name: build-x86_64
image: rust:bookworm
commands:
- cargo build --release
- name: build-arm64
image: rust:bookworm
commands:
- dpkg --add-architecture arm64
- apt-get update -y && apt-get install -y crossbuild-essential-arm64 libssl-dev:arm64
- rustup target add aarch64-unknown-linux-gnu
- cargo build --target aarch64-unknown-linux-gnu --release
environment:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
PKG_CONFIG_ALLOW_CROSS: 1
PKG_CONFIG_PATH: /usr/aarch64-linux-gnu/lib/pkgconfig
- name: container-build-and-publish - name: container-build-and-publish
image: docker image: docker
commands: commands:
- docker login --username radical --password $PASSWORD git.gorb.app - docker buildx build --platform linux/amd64,linux/arm64 --rm -t gorb/backend:main .
- docker buildx build --platform linux/amd64,linux/arm64 --rm --push -t git.gorb.app/gorb/backend:main .
environment:
PASSWORD:
from_secret: docker_password
volumes: volumes:
- /var/run/podman/podman.sock:/var/run/docker.sock - /var/run/podman/podman.sock:/var/run/docker.sock

View file

@ -1,19 +0,0 @@
when:
- event: push
branch: main
steps:
- name: build-docs
image: rust:bookworm
commands:
- cargo doc --release --no-deps
- name: publish-docs
image: debian:12
commands:
- apt update -y && apt install -y rsync openssh-client
- printf "Host *\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- ssh-agent bash -c "ssh-add <(echo '$KEY' | base64 -d) && rsync --archive --verbose --compress --hard-links --delete-during --partial --progress ./target/doc/ root@gorb.app:/var/www/docs.gorb.app/api && ssh root@gorb.app systemctl reload caddy.service"
environment:
KEY:
from_secret: ssh_key

View file

@ -1,16 +1,17 @@
FROM rust:bookworm AS builder FROM --platform=linux/amd64 debian:12-slim AS prep
WORKDIR /src WORKDIR /src
COPY . . COPY target/release/backend backend-amd64
COPY target/aarch64-unknown-linux-gnu/release/backend backend-arm64
RUN cargo build --release
FROM debian:12-slim FROM debian:12-slim
ARG TARGETARCH
RUN apt update -y && apt install libssl3 ca-certificates -y && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/* RUN apt update -y && apt install libssl3 ca-certificates -y && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/*
COPY --from=builder /src/target/release/backend /usr/bin/gorb-backend COPY --from=prep /src/backend-${TARGETARCH} /usr/bin/gorb-backend
COPY entrypoint.sh /usr/bin/entrypoint.sh COPY entrypoint.sh /usr/bin/entrypoint.sh