Skip to content

[WIP]Add multiple operating system source code to compile CBDB #1

[WIP]Add multiple operating system source code to compile CBDB

[WIP]Add multiple operating system source code to compile CBDB #1

Workflow file for this run

name: Try build from source
on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Build on ubuntu:24.04
image: ubuntu:24.04
distribution: ubuntu
- name: Build on ubuntu:22.04
image: ubuntu:22.04
distribution: ubuntu
- name: Build on ubuntu:20.04
image: ubuntu:20.04
distribution: ubuntu
- name: Build on debian:12
image: debian:12
distribution: debian
- name: Build on debian:11
image: debian:11
distribution: debian
- name: Build on oraclelinux:9
image: oraclelinux:9
distribution: oraclelinux
- name: Build on fedora:39
image: fedora:39
distribution: fedora
- name: Build on fedora:38
image: fedora:38
distribution: fedora
- name: Build on openeuler:24.03
image: openeuler/openeuler:24.03
distribution: openeuler
- name: Build on openeuler:22.03
image: openeuler/openeuler:22.03
distribution: openeuler
name: "${{ matrix.name }}"
runs-on: ubuntu-latest
container: "${{ matrix.image }}"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
set -eux
if [ "${{ matrix.distribution }}" = "openeuler" ]; then
yum group install -y "Development Tools"
yum install -y apr-devel bison bzip2-devel cmake3 flex krb5-devel libcurl-devel libevent-devel libkadm5 libxml2-devel libzstd-devel openssl-devel perl-ExtUtils-Embed perl-ExtUtils-MakeMaker perl-File-Compare python3 python3-devel python3-pip python3-psutil python3-psutil python3-psycopg2 python3-pyyaml readline-devel rsync xerces-c-devel zlib-devel
fi
if [ "${{ matrix.distribution }}" = "oraclelinux" ]; then
yum group install -y "Development Tools"
yum install -y epel-release
yum install -y apr-devel bison bzip2-devel cmake3 flex krb5-devel libcurl-devel libevent-devel libkadm5 libxml2-devel libzstd-devel openssl-devel perl-ExtUtils-Embed perl-ExtUtils-MakeMaker perl-File-Compare perl-File-Copy perl-FindBin perl-Opcode python3 python3-devel python3-pip python3-psutil python3-psutil python3-psycopg2 python3-pyyaml readline-devel rsync xerces-c-devel zlib-devel
fi
if [ "${{ matrix.distribution }}" = "fedora" ]; then
yum group install -y "Development Tools"
yum install -y apr-devel bison bzip2-devel cmake3 flex g++ gcc krb5-devel libcurl-devel libevent-devel libkadm5 libxml2-devel libzstd-devel openssl-devel perl-ExtUtils-Embed perl-ExtUtils-MakeMaker perl-File-Compare perl-File-Copy perl-FindBin perl-Opcode python3 python3-devel python3-pip python3-psutil python3-psutil python3-psycopg2 python3-pyyaml readline-devel rsync xerces-c-devel zlib-devel
fi
if [ "${{ matrix.distribution }}" = "ubuntu" ] || [ "${{ matrix.distribution }}" = "debian" ]; then
TZ=Asia/Shanghai
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y -qq bison ccache cmake curl flex g++ gcc git-core inetutils-ping krb5-admin-server krb5-kdc libapr1-dev libbz2-dev libcurl4-gnutls-dev libevent-dev libkrb5-dev libpam-dev libperl-dev libreadline-dev libssl-dev libxerces-c-dev libxml2-dev libyaml-dev libzstd-dev locales net-tools ninja-build openssh-client openssh-server openssl pkg-config python3-dev python3-pip python3-psutil python3-pygresql python3-yaml zlib1g-dev
fi
- name: Build from source
run: |
set -eux
CPUS=$(grep -c ^processor /proc/cpuinfo)
./configure --with-perl --with-python --with-libxml --with-gssapi --prefix=`pwd`/inst
make -j${CPUS}
make -j${CPUS} install