From 51a8702c6d1b2febc85a366e46c20d3cbcc1ff16 Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Thu, 29 Feb 2024 16:25:43 +0100 Subject: [PATCH 1/6] Added basic macos CI without deploying --- .github/workflows/build-deploy.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-deploy.yml diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml new file mode 100644 index 000000000000..2896fa30505e --- /dev/null +++ b/.github/workflows/build-deploy.yml @@ -0,0 +1,32 @@ +name: build-deploy + +on: + # Launch on manual trigger + workflow_dispatch: + # Launch on any push + push: + +jobs: + build-deploy: + # TODO: github.ref_name is 22.10.\d+ or 21.04.\d+ + # if: github.repository == 'logicalclocks/rondb' && (github.ref_name == '22.10.1' || github.ref_name == '21.04.16') + runs-on: macos-13-xlarge + + steps: + - name: Checkout main repo + uses: actions/checkout@v4 + + - name: Build with Docker + run: | + export DOCKER_CLI_EXPERIMENTAL=enabled + export BUILDKIT_PROGRESS=plain + + docker buildx build . \ + -f Dockerfile.ubuntu22 \ + --tag rondb-build-all:22.10.1 \ + --target build-all \ + --no-cache \ + --build-arg BUILD_THREADS=$BUILD_CORES \ + --build-arg RELEASE_TARBALL=1 # \ + # --build-arg RELEASE_FINAL_CLUSTERJ=1 \ + # --build-arg DEPLOY_TO_REPO=1 \ From 95d08750d40831032e809b62639cf8b2bd209e0a Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Thu, 29 Feb 2024 16:26:06 +0100 Subject: [PATCH 2/6] Added fix for building for ARM --- build_scripts/release_scripts/build_gen.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build_scripts/release_scripts/build_gen.sh b/build_scripts/release_scripts/build_gen.sh index b87d995a3641..380d1115beed 100755 --- a/build_scripts/release_scripts/build_gen.sh +++ b/build_scripts/release_scripts/build_gen.sh @@ -10,6 +10,8 @@ if [[ -z "$TYPE" || -z "$SRC_DIR" || -z "$INSTALL_DIR" ]]; then exit 1 fi +CPU_ARCH=$(uname -m) + ADDITIONAL_FLAGS="" # Enabling additional security checks in standard library functions to protect against buffer @@ -42,7 +44,9 @@ if test -f "$HARDENED_CC1"; then fi #-m64: This flag specifies that the code should be compiled for a 64-bit target platform. -ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -m64" +if [ "$CPU_ARCH" != "amd64" ]; then + ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -m64" +fi # -mtune=generic: This flag tells the compiler to optimize code for a generic (i.e., # not architecture-specific) target. @@ -59,7 +63,9 @@ ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -fstack-clash-protection" # -fcf-protection: This flag adds control flow protection to protect against various # control flow attacks. -ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -fcf-protection" +if [ "$CPU_ARCH" != "amd64" ]; then + ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -fcf-protection" +fi COMMON_OPTIONS=( "-DCMAKE_C_FLAGS='${CMAKE_C_FLAGS} ${ADDITIONAL_FLAGS}'" From 51301f5bf75a727c07fd0806b493f12e2979ea73 Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Thu, 29 Feb 2024 16:56:55 +0100 Subject: [PATCH 3/6] Specified branches to trigger builds --- .github/workflows/build-deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 2896fa30505e..e5b27bca355d 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -3,8 +3,10 @@ name: build-deploy on: # Launch on manual trigger workflow_dispatch: - # Launch on any push push: + branches: + - 22.10.[0-9]+ + - 21.04.[0-9]+ jobs: build-deploy: From cc3a50a4b5d02c05c34b32a9b44ce3bf95c5a654 Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Thu, 29 Feb 2024 16:58:25 +0100 Subject: [PATCH 4/6] Added temporary on-PR trigger --- .github/workflows/build-deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index e5b27bca355d..04dd029de58a 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -7,6 +7,10 @@ on: branches: - 22.10.[0-9]+ - 21.04.[0-9]+ + # TODO: Remove this once done with testing + pull_request: + # Not running on "closed" - that is taken care of by "push" (if merged) + types: [opened, synchronize, reopened] jobs: build-deploy: From cfa14207aa1ab62357b6d8a2f7e566dd0456169e Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Thu, 29 Feb 2024 17:00:07 +0100 Subject: [PATCH 5/6] Removed comment --- .github/workflows/build-deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 04dd029de58a..51c0273db57f 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -14,8 +14,7 @@ on: jobs: build-deploy: - # TODO: github.ref_name is 22.10.\d+ or 21.04.\d+ - # if: github.repository == 'logicalclocks/rondb' && (github.ref_name == '22.10.1' || github.ref_name == '21.04.16') + # if: github.repository == 'logicalclocks/rondb' runs-on: macos-13-xlarge steps: From 98ac7517ac7f85e48c4fb29b37d17302889dc5be Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Thu, 29 Feb 2024 17:12:24 +0100 Subject: [PATCH 6/6] Using macos-14-xlarge --- .github/workflows/build-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 51c0273db57f..5b58638bfc6e 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -15,7 +15,7 @@ on: jobs: build-deploy: # if: github.repository == 'logicalclocks/rondb' - runs-on: macos-13-xlarge + runs-on: macos-14-xlarge steps: - name: Checkout main repo