diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..054e5cf2 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,126 @@ +version: 2.1 + +orbs: + rust: circleci/rust@1.8.0 + +parameters: + package: + type: string + default: g3mkcert + +steps: + - add_ssh_keys: + fingerprints: + - "SHA256:7XwPpRkMjp+R8ZsjzPO/X1Zif0+i7duTrYbyhOgb3d0" + +jobs: + build-deb: + parameters: + image: + type: string + class: + type: string + docker: + - image: << parameters.image >> + resource_class: << parameters.class >> + steps: + - run: apt-get update + - run: + name: Install tools + command: apt-get install -y curl git + - rust/install: + version: stable + - checkout + - run: + name: Install package tools + command: apt-get install -y jq lsb-release dpkg-dev debhelper + - run: + name: Install dev tools and libs + environment: + DEBIAN_FRONTEND: noninteractive + command: | + apt-get install -y pkgconf capnproto cmake + apt-get install -y libssl-dev libc-ares-dev + apt-get install -y python3-sphinx python3-sphinx-rtd-theme + - run: + name: Build package + command: ./scripts/build_deb_from_git.sh << pipeline.parameters.package >> + build-rpm: + parameters: + image: + type: string + class: + type: string + docker: + - image: << parameters.image >> + resource_class: << parameters.class >> + steps: + - rust/install: + version: stable + - when: + condition: + matches: + pattern: "^rockylinux/.*" + value: << parameters.image >> + steps: + - run: + name: Install package tools + command: dnf install -y git jq rpmdevtools rpm-build + - run: + name: Install dev tools and libs + command: | + dnf install -y epel-release + dnf config-manager --set-enabled devel + dnf install -y pkgconf capnproto gcc make cmake + dnf install -y openssl-devel c-ares-devel + dnf install -y python3-devel lua-devel + dnf install -y python3-sphinx python3-sphinx_rtd_theme + - when: + condition: + matches: + pattern: "^opensuse/.*" + value: << parameters.image >> + steps: + - run: + name: Install package tools + command: zypper install -y git jq rpmdevtools rpm-build + - run: + name: Install dev tools and libs + command: | + zypper install -y pkgconf capnproto gcc make cmake + zypper install -y openssl-devel c-ares-devel + zypper install -y python3-devel lua-devel + zypper install -y python3-Sphinx python3-sphinx_rtd_theme + - checkout + - run: + name: Build package + command: ./scripts/build_rpm_from_git.sh << pipeline.parameters.package >> + +workflows: + build-deb: + jobs: + - build-deb: + matrix: + parameters: + class: + - large + - arm.medium + image: + - debian:trixie + - debian:bookworm + - debian:bullseye + - ubuntu:24.04 + - ubuntu:22.04 + build-rpm: + jobs: + - build-rpm: + matrix: + parameters: + class: + - large + - arm.medium + image: + #- rockylinux/rockylinux:10 + - rockylinux/rockylinux:9 + - rockylinux/rockylinux:8 + - opensuse/leap:15.6