diff --git a/.github/workflows/package_all.yaml b/.github/workflows/package_all.yaml new file mode 100644 index 000000000..656f1016a --- /dev/null +++ b/.github/workflows/package_all.yaml @@ -0,0 +1,248 @@ +name: Package All + +# TODO(gitbuda): Cleanup docker container if GHA job was canceled. + +on: workflow_dispatch + +jobs: + centos-7_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package community centos-7 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: centos-7_community + path: build/output/centos-7/memgraph*.rpm + + centos-8_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package community centos-8 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: centos-8_community + path: build/output/centos-8/memgraph*.rpm + + debian-9_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package community debian-9 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: debian-9_community + path: build/output/debian-9/memgraph*.deb + + debian-10_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package community debian-10 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: debian-10_community + path: build/output/debian-10/memgraph*.deb + + docker_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + cd release/package + ./run.sh package community debian-10 --for-docker + ./run.sh docker + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: docker_community + path: build/output/docker/memgraph*.tar.gz + + ubuntu-1804_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package community ubuntu-18.04 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: ubuntu-1804_community + path: build/output/ubuntu-18.04/memgraph*.deb + + ubuntu-2004_community: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package community ubuntu-20.04 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: ubuntu-2004_community + path: build/output/ubuntu-20.04/memgraph*.deb + + centos-7_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package enterprise centos-7 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: centos-7_enterprise + path: build/output/centos-7/memgraph*.rpm + + centos-8_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package enterprise centos-8 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: centos-8_enterprise + path: build/output/centos-8/memgraph*.rpm + + debian-9_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package enterprise debian-9 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: debian-9_enterprise + path: build/output/debian-9/memgraph*.deb + + debian-10_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package enterprise debian-10 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: debian-10_enterprise + path: build/output/debian-10/memgraph*.deb + + docker_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + cd release/package + ./run.sh package enterprise debian-10 --for-docker + ./run.sh docker + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: docker_enterprise + path: build/output/docker/memgraph*.tar.gz + + ubuntu-1804_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package enterprise ubuntu-18.04 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: ubuntu-1804_enterprise + path: build/output/ubuntu-18.04/memgraph*.deb + + ubuntu-2004_enterprise: + runs-on: [self-hosted, DockerMgBuild] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package enterprise ubuntu-20.04 + - name: "Upload package" + uses: actions/upload-artifact@v2 + with: + name: ubuntu-2004_enterprise + path: build/output/ubuntu-20.04/memgraph*.deb diff --git a/.github/workflows/release_debian10.yaml b/.github/workflows/release_debian10.yaml index da94818ea..d6c5991f4 100644 --- a/.github/workflows/release_debian10.yaml +++ b/.github/workflows/release_debian10.yaml @@ -1,4 +1,4 @@ -name: Release Debian10 +name: Release Debian 10 on: workflow_dispatch: diff --git a/.github/workflows/release_ubuntu2004.yaml b/.github/workflows/release_ubuntu2004.yaml index 41421b5a7..d69c2d038 100644 --- a/.github/workflows/release_ubuntu2004.yaml +++ b/.github/workflows/release_ubuntu2004.yaml @@ -1,4 +1,4 @@ -name: Release Ubuntu20.04 +name: Release Ubuntu 20.04 on: workflow_dispatch: diff --git a/environment/os/centos-7.sh b/environment/os/centos-7.sh index 3b381c97d..b5fa816c1 100755 --- a/environment/os/centos-7.sh +++ b/environment/os/centos-7.sh @@ -18,6 +18,7 @@ TOOLCHAIN_BUILD_DEPS=( libffi-devel libxml2-devel perl-Digest-MD5 # llvm libedit-devel pcre-devel automake bison # swig ) + TOOLCHAIN_RUN_DEPS=( make # generic build tools tar gzip bzip2 xz # used for archive unpacking @@ -26,6 +27,7 @@ TOOLCHAIN_RUN_DEPS=( readline # for cmake and llvm libffi libxml2 # for llvm ) + MEMGRAPH_BUILD_DEPS=( git # source code control make pkgconfig # build system @@ -48,9 +50,11 @@ MEMGRAPH_BUILD_DEPS=( which mono-complete dotnet-sdk-3.1 golang nodejs zip unzip java-11-openjdk-devel # for driver tests autoconf # for jemalloc code generation ) + list() { echo "$1" } + check() { local missing="" for pkg in $1; do @@ -75,16 +79,13 @@ check() { exit 1 fi } + install() { cd "$DIR" if [ "$EUID" -ne 0 ]; then echo "Please run as root." exit 1 fi - if [ "$SUDO_USER" == "" ]; then - echo "Please run as sudo." - exit 1 - fi # If GitHub Actions runner is installed, append LANG to the environment. # Python related tests doesn't work the LANG export. if [ -d "/home/gh/actions-runner" ]; then @@ -118,11 +119,16 @@ install() { continue fi if [ "$pkg" == PyYAML ]; then - sudo -H -u "$SUDO_USER" bash -c "pip3 install --user PyYAML" + if [ -z ${SUDO_USER+x} ]; then # Running as root (e.g. Docker). + pip3 install --user PyYAML + else # Running using sudo. + sudo -H -u "$SUDO_USER" bash -c "pip3 install --user PyYAML" + fi continue fi yum install -y "$pkg" done } + deps=$2"[*]" "$1" "${!deps}" diff --git a/environment/os/centos-8.sh b/environment/os/centos-8.sh index aa61f8afe..2b316484b 100755 --- a/environment/os/centos-8.sh +++ b/environment/os/centos-8.sh @@ -17,6 +17,7 @@ TOOLCHAIN_BUILD_DEPS=( libffi-devel libxml2-devel # for llvm libedit-devel pcre-devel automake bison # for swig ) + TOOLCHAIN_RUN_DEPS=( make # generic build tools tar gzip bzip2 xz # used for archive unpacking @@ -25,6 +26,7 @@ TOOLCHAIN_RUN_DEPS=( readline # for cmake and llvm libffi libxml2 # for llvm ) + MEMGRAPH_BUILD_DEPS=( git # source code control make pkgconf-pkg-config # build system @@ -47,9 +49,11 @@ MEMGRAPH_BUILD_DEPS=( sbcl # for custom Lisp C++ preprocessing autoconf # for jemalloc code generation ) + list() { echo "$1" } + check() { local missing="" for pkg in $1; do @@ -68,16 +72,13 @@ check() { exit 1 fi } + install() { cd "$DIR" if [ "$EUID" -ne 0 ]; then echo "Please run as root." exit 1 fi - if [ "$SUDO_USER" == "" ]; then - echo "Please run as sudo." - exit 1 - fi # If GitHub Actions runner is installed, append LANG to the environment. # Python related tests doesn't work the LANG export. if [ -d "/home/gh/actions-runner" ]; then @@ -86,6 +87,7 @@ install() { echo "NOTE: export LANG=en_US.utf8" fi dnf install -y epel-release + dnf install -y 'dnf-command(config-manager)' dnf config-manager --set-enabled powertools # Required to install texinfo. dnf update -y dnf install -y wget git python36 python3-pip @@ -135,11 +137,16 @@ install() { continue fi if [ "$pkg" == PyYAML ]; then - sudo -H -u "$SUDO_USER" bash -c "pip3 install --user PyYAML" + if [ -z ${SUDO_USER+x} ]; then # Running as root (e.g. Docker). + pip3 install --user PyYAML + else # Running using sudo. + sudo -H -u "$SUDO_USER" bash -c "pip3 install --user PyYAML" + fi continue fi dnf install -y "$pkg" done } + deps=$2"[*]" "$1" "${!deps}" diff --git a/environment/os/debian-10.sh b/environment/os/debian-10.sh index 87cde6588..ccbd55f4b 100755 --- a/environment/os/debian-10.sh +++ b/environment/os/debian-10.sh @@ -17,6 +17,7 @@ TOOLCHAIN_BUILD_DEPS=( libffi-dev libxml2-dev # for llvm libedit-dev libpcre3-dev automake bison # for swig ) + TOOLCHAIN_RUN_DEPS=( make # generic build tools tar gzip bzip2 xz-utils # used for archive unpacking @@ -26,6 +27,7 @@ TOOLCHAIN_RUN_DEPS=( libreadline7 # for cmake and llvm libffi6 libxml2 # for llvm ) + MEMGRAPH_BUILD_DEPS=( git # source code control make pkg-config # build system @@ -45,12 +47,15 @@ MEMGRAPH_BUILD_DEPS=( dotnet-sdk-3.1 golang nodejs npm autoconf # for jemalloc code generation ) + list() { echo "$1" } + check() { check_all_dpkg "$1" } + install() { cat >/etc/apt/sources.list <