Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 5 additions & 67 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,70 +184,8 @@ jobs:

tests:
needs: [calc_ver, build]
runs-on: ubuntu-latest
env:
JOSHUA_DB_VER: "6.3.15"
N_OF_TESTS: 500 # to fit in 360 minutes job run limit
JOSHUA_AGENT_URL: "docker.io/1inker"
JOSHUA_AGENT_TAG: "rhel8-20220816"

steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ${{github.workspace}}/src

- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y sudo wget crudini git python3 python3-pip
sudo pip3 install wheel setuptools python-dateutil lxml boto3

- name: Install FoundationDb
shell: bash
run: |
mkdir deb
pushd deb
MY_ARCH=`dpkg-architecture -q DEB_BUILD_ARCH`
wget https://github.com/apple/foundationdb/releases/download/${{ env.JOSHUA_DB_VER }}/foundationdb-clients_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb https://github.com/apple/foundationdb/releases/download/${{ env.JOSHUA_DB_VER }}/foundationdb-server_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb
sudo apt-get install -y ./foundationdb-clients_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb ./foundationdb-server_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb
popd
sudo systemctl stop foundationdb
MY_IP=`hostname -I | awk '{print $1}'`
sudo sed -i s/127.0.0.1/$MY_IP/ /etc/foundationdb/fdb.cluster
sudo crudini --set /etc/foundationdb/foundationdb.conf fdbserver memory 4GiB
sudo systemctl start foundationdb
pip3 install 'foundationdb==${{ env.JOSHUA_DB_VER }}'

- name: Download the correctness package
uses: actions/download-artifact@v4
id: download_correctness
with:
name: correctness-${{needs.calc_ver.outputs.full_ver}}.tar.gz

- name: 'Echo download path'
run: echo ${{steps.download_correctness.outputs.download-path}}

- name: Display structure of downloaded files
run: ls -R
working-directory: ${{github.workspace}}

- name: Download joshua
shell: bash
run: |
git clone https://github.com/FoundationDB/fdb-joshua.git

- name: run joshua-agent
shell: bash
run: |
podman pull ${{ env.JOSHUA_AGENT_URL }}/joshua-agent:${{ env.JOSHUA_AGENT_TAG }}
podman create --name joshua-agent -v /etc/foundationdb:/etc/foundationdb -it joshua-agent:${{ env.JOSHUA_AGENT_TAG }}
podman start joshua-agent

- name: run tests
shell: bash
working-directory: ${{github.workspace}}/fdb-joshua
run: |
podman ps
${{github.workspace}}/src/build-scripts/for-linux/test-joshua.bash ${{github.workspace}}/correctness-${{needs.calc_ver.outputs.full_ver}}.tar.gz ${{env.N_OF_TESTS}}
uses: ./.github/workflows/run-tests.yml
with:
full_ver: ${{needs.calc_ver.outputs.full_ver}}
build_run_id: ${{ github.run_id }}
secrets: inherit
95 changes: 95 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Run Tests (reusable)

on:
workflow_call:
inputs:
full_ver:
description: 'Version of the build to test (e.g. 7.4.0-3.1.ow)'
required: true
type: string
build_run_id:
description: 'Run ID to download the correctness package from'
required: true
type: string

jobs:
tests:
runs-on: ubuntu-latest
env:
JOSHUA_DB_VER: "7.1.57"
N_OF_TESTS: 500 # to fit in 360 minutes job run limit
JOSHUA_AGENT_TAG: "rockylinux9.6-20260309"
# parameter that controls the maximum lifetime of the Joshua agent (in seconds).
AGENT_TIMEOUT: 18000

steps:
- name: Set agent URL
run: |
echo "JOSHUA_AGENT_URL=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
echo "Agent URL: ghcr.io/${GITHUB_REPOSITORY_OWNER,,}"

- name: Checkout
uses: actions/checkout@v4
with:
path: ${{github.workspace}}/src

- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y sudo wget crudini git python3 python3-pip
sudo pip3 install wheel setuptools python-dateutil lxml boto3

- name: Install FoundationDb
shell: bash
run: |
mkdir deb
pushd deb
MY_ARCH=`dpkg-architecture -q DEB_BUILD_ARCH`
wget https://github.com/apple/foundationdb/releases/download/${{ env.JOSHUA_DB_VER }}/foundationdb-clients_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb https://github.com/apple/foundationdb/releases/download/${{ env.JOSHUA_DB_VER }}/foundationdb-server_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb
sudo apt-get install -y ./foundationdb-clients_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb ./foundationdb-server_${{ env.JOSHUA_DB_VER }}-1_${MY_ARCH}.deb
popd
sudo systemctl stop foundationdb
MY_IP=`hostname -I | awk '{print $1}'`
sudo sed -i s/127.0.0.1/$MY_IP/ /etc/foundationdb/fdb.cluster
sudo crudini --set /etc/foundationdb/foundationdb.conf fdbserver memory 4GiB
sudo systemctl start foundationdb
pip3 install 'foundationdb==${{ env.JOSHUA_DB_VER }}'

- name: Download the correctness package
uses: actions/download-artifact@v4
id: download_correctness
with:
name: correctness-${{ inputs.full_ver }}.tar.gz
run-id: ${{ inputs.build_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Echo download path
run: echo ${{steps.download_correctness.outputs.download-path}}

- name: Display structure of downloaded files
run: ls -R
working-directory: ${{github.workspace}}

- name: Download joshua
shell: bash
run: |
git clone https://github.com/FoundationDB/fdb-joshua.git

- name: run joshua-agent
shell: bash
run: |
podman pull ${{ env.JOSHUA_AGENT_URL }}/joshua-agent:${{ env.JOSHUA_AGENT_TAG }}
for i in 1 2 3 4; do
podman run -d \
-v /etc/foundationdb:/etc/foundationdb \
-e AGENT_TIMEOUT=${{ env.AGENT_TIMEOUT }} \
joshua-agent:${{ env.JOSHUA_AGENT_TAG }}
done

- name: run tests
shell: bash
working-directory: ${{github.workspace}}/fdb-joshua
run: |
podman ps
${{github.workspace}}/src/build-scripts/for-linux/test-joshua.bash ${{github.workspace}}/correctness-${{ inputs.full_ver }}.tar.gz ${{env.N_OF_TESTS}}
19 changes: 19 additions & 0 deletions .github/workflows/tests-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tests only
Comment thread
oleg68 marked this conversation as resolved.

on:
workflow_dispatch:
inputs:
full_ver:
description: 'Version of the build to test (e.g. 7.4.0-3.1.ow)'
required: true
build_run_id:
description: 'Run ID of the build workflow (find it in the URL of the build run)'
required: true

jobs:
tests:
uses: ./.github/workflows/run-tests.yml
with:
full_ver: ${{ github.event.inputs.full_ver }}
build_run_id: ${{ github.event.inputs.build_run_id }}
secrets: inherit
41 changes: 41 additions & 0 deletions .github/workflows/windows-boost-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Windows Boost CONFIG Test
Comment thread
oleg68 marked this conversation as resolved.

on:
pull_request:
push:
branches:
- 'test-*'
- 'boost-*'
workflow_dispatch:

jobs:
test-windows-boost:
name: Test Boost CONFIG Mode on Windows
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup CMake
uses: lukka/get-cmake@latest

- name: Install Boost via vcpkg
run: |
vcpkg install boost-filesystem:x64-windows boost-iostreams:x64-windows boost-serialization:x64-windows boost-system:x64-windows boost-program-options:x64-windows boost-url:x64-windows boost-context:x64-windows
shell: cmd

- name: Configure and Build FoundationDB (without Swift)
run: |
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DWITH_SWIFT=OFF -DBUILD_TESTING=OFF
shell: cmd

- name: Verify Build Success
run: |
echo "Build completed successfully - Boost CONFIG mode works on Windows!"
shell: cmd

- name: Report Success
run: echo "✓ Boost CONFIG mode working on Windows!"
12 changes: 12 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file maps author names and email addresses to canonical identities
# Format: Preferred Name <preferred@email> [Commit Name <commit@email>]
# See git-shortlog(1) for more information
#
# Single entries establish the canonical identity for a contributor

A.J. Beamon <aj.beamon@snowflake.com> <ajbeamon@apple.com>
Alex Miller <alex.r.miller@snowflake.com> <alexander_r_miller@apple.com> <alexmiller@apple.com> <millerdevel@gmail.com>
Evan Tschannen <evan.tschannen@snowflake.com> <ejt@apple.com>
Jingyu Zhou <jingyu_zhou@apple.com> <jingyuzhou@gmail.com>
Steve Atherton <steve.atherton@snowflake.com> <stevea@apple.com> <steve.atherton@gmail.com> <s_atherton@apple.com>
Trevor Clinkenbeard <tclinkenbeard@openai.com> <trevor.clinkenbeard@snowflake.com>
71 changes: 57 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,68 @@ endif()

include(utils)

# Flow and other tools are written in C# - so we need that dependency
include(EnableCsharp)
# First thing we need is the actor compiler
option(
WITH_CSHARP
"Prefer C# build tools (actor compiler, coverage tool, vexillographer) when a toolchain is available"
ON)

set(FDB_USE_CSHARP_TOOLS_EXPLICIT FALSE)
if(DEFINED FDB_USE_CSHARP_TOOLS)
set(FDB_USE_CSHARP_TOOLS_EXPLICIT TRUE)
endif()

# First thing we need is the actor compiler - and to compile and run the actor
# compiler, we need mono
include(CompileActorCompiler)
if(NOT DEFINED FDB_USE_CSHARP_TOOLS)
set(FDB_USE_CSHARP_TOOLS ${WITH_CSHARP})
else()
set(WITH_CSHARP ${FDB_USE_CSHARP_TOOLS})
endif()

include(CompileCoverageTool)
set(CSHARP_TOOLCHAIN_FOUND FALSE)
set(COVERAGETOOL_AVAILABLE FALSE)
if(FDB_USE_CSHARP_TOOLS)
if(WIN32)
find_program(dotnet_EXECUTABLE NAMES dotnet dotnet.exe)
if(dotnet_EXECUTABLE)
set(CSHARP_TOOLCHAIN_FOUND TRUE)
endif()
else()
find_package(dotnet)
if(dotnet_FOUND)
set(CSHARP_TOOLCHAIN_FOUND TRUE)
endif()
endif()

# with the actor compiler, we can now make the flow commands available
include(FlowCommands)
if(NOT CSHARP_TOOLCHAIN_FOUND)
find_package(mono)
if(mono_FOUND)
set(CSHARP_TOOLCHAIN_FOUND TRUE)
set(CSHARP_USE_MONO TRUE)
endif()
endif()
endif()

###############################################################################
# Vexilographer
###############################################################################
if(FDB_USE_CSHARP_TOOLS_EXPLICIT AND FDB_USE_CSHARP_TOOLS
AND NOT CSHARP_TOOLCHAIN_FOUND)
message(
FATAL_ERROR
"FDB_USE_CSHARP_TOOLS is enabled, but CSHARP_TOOLCHAIN_FOUND is FALSE. Install .NET (dotnet) or Mono, or set WITH_CSHARP=OFF.")
endif()

include(CompileActorCompiler)

if(FDB_USE_CSHARP_TOOLS AND CSHARP_TOOLCHAIN_FOUND)
include(CompileCoverageTool)
set(COVERAGETOOL_AVAILABLE TRUE)
else()
message(STATUS "C# tooling disabled or not found; skipping coverage tool build")
endif()
# Vexilographer generation is configured inside fdbclient
include(CompileVexillographer)

# with the actor compiler, we can now make the flow commands available
include(FlowCommands)

###############################################################################
# Generate config file
###############################################################################
Expand Down Expand Up @@ -261,13 +305,12 @@ add_subdirectory(fdbctl)
add_subdirectory(fdbclient)
add_subdirectory(fdbserver)
add_subdirectory(fdbcli)
add_subdirectory(contrib/replay)
if(NOT WIN32)
if(NOT FOUNDATIONDB_CROSS_COMPILING) # FIXME(swift): make this work when
# x-compiling.
add_subdirectory(fdbmonitor)
endif()
else()
add_subdirectory(fdbservice)
endif()
add_subdirectory(fdbbackup)
add_subdirectory(tests)
Expand All @@ -283,7 +326,7 @@ if(WITH_PYTHON AND WITH_C_BINDING)
endif()
if(WITH_DOCUMENTATION)
add_subdirectory(documentation)
if(BUILD_JAVA_BINDING)
if(BUILD_JAVA_BINDING AND TARGET CopyJavadoc)
add_dependencies(html CopyJavadoc)
endif()
endif()
Expand Down
Loading
Loading