Skip to content

Commit

Permalink
PHOTON_ENABLE_ECOSYSTEM defaults to off
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Jun 11, 2024
1 parent d857aea commit 9fe484b
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 23 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.linux.arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ jobs:
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON -D PHOTON_ENABLE_EXTFS=ON
cmake -B build \
-D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_ENABLE_ECOSYSTEM=ON \
-D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON \
-D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON
cmake --build build -j $(nproc) -- VERBOSE=1
- name: Test
Expand All @@ -54,8 +59,13 @@ jobs:
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=Debug -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON -D PHOTON_ENABLE_EXTFS=ON
cmake -B build \
-D CMAKE_BUILD_TYPE=Debug \
-D PHOTON_ENABLE_ECOSYSTEM=ON \
-D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON \
-D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON
cmake --build build -j $(nproc) -- VERBOSE=1
- name: Test
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.linux.x86-64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
run: |
rm -fr build
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_ENABLE_ECOSYSTEM=ON \
-D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON \
-D PHOTON_ENABLE_FUSE=ON \
Expand Down Expand Up @@ -158,7 +159,7 @@ jobs:
- name: Build1121
run: |
source /opt/rh/gcc-toolset-10/enable
cmake --build build -j --clean-first -- VERBOSE=1
cmake --build build -j $(nproc) --clean-first -- VERBOSE=1
ln -f common/checksum/test/checksum.in build/output/
tar -c --use-compress-program=zstdmt -f output1121.tzs build/output/
- name: Upload1121
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ci.macos.arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ jobs:
- name: Build
run: |
cmake -B ${{github.workspace}}/build -D PHOTON_BUILD_TESTING=ON -D CMAKE_BUILD_TYPE=Release \
-D PHOTON_ENABLE_SASL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/Cellar/[email protected]/1.1.1w
cmake --build ${{github.workspace}}/build -j $(nproc)
cmake -B ${{github.workspace}}/build \
-D PHOTON_ENABLE_ECOSYSTEM=ON \
-D PHOTON_BUILD_TESTING=ON \
-D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_ENABLE_SASL=ON \
-D OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/[email protected]/1.1.1w
cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)
- name: Test
working-directory: ${{github.workspace}}/build
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ci.macos.x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ jobs:
- name: Build
run: |
cmake -B ${{github.workspace}}/build -D PHOTON_BUILD_TESTING=ON -D CMAKE_BUILD_TYPE=Release \
-D PHOTON_ENABLE_SASL=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3
cmake --build ${{github.workspace}}/build -j $(nproc)
cmake -B ${{github.workspace}}/build \
-D PHOTON_ENABLE_ECOSYSTEM=ON \
-D PHOTON_BUILD_TESTING=ON \
-D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_ENABLE_SASL=ON \
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3
cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)
- name: Test
working-directory: ${{github.workspace}}/build
Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ option(PHOTON_ENABLE_SASL "enable sasl" OFF)
option(PHOTON_ENABLE_MIMIC_VDSO "enable mimic vdso" OFF)
option(PHOTON_ENABLE_FSTACK_DPDK "Use f-stack + DPDK as the event engine" OFF)
option(PHOTON_ENABLE_EXTFS "enable extfs" OFF)
option(PHOTON_ENABLE_ECOSYSTEM "enable ecosystem" ON)
option(PHOTON_ENABLE_ECOSYSTEM "enable ecosystem" OFF)

option(PHOTON_BUILD_DEPENDENCIES "" OFF)
set(PHOTON_AIO_SOURCE "https://pagure.io/libaio/archive/libaio-0.3.113/libaio-0.3.113.tar.gz" CACHE STRING "")
Expand All @@ -44,12 +44,11 @@ set(PHOTON_RAPIDXML_SOURCE "https://sourceforge.net/projects/rapidxml/files/rapi
set(PHOTON_RAPIDYAML_SOURCE "https://github.com/biojppm/rapidyaml/releases/download/v0.5.0/rapidyaml-0.5.0.hpp" CACHE STRING "")
set(PHOTON_CPP_REDIS_SOURCE "https://github.com/cpp-redis/cpp_redis/archive/refs/tags/4.3.1.tar.gz" CACHE STRING "")

# Get CPU arch and number
# Get CPU arch
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT (${ARCH} STREQUAL x86_64) AND NOT (${ARCH} STREQUAL aarch64) AND NOT (${ARCH} STREQUAL arm64))
message(FATAL_ERROR "Unknown CPU architecture ${ARCH}")
endif ()
ProcessorCount(NumCPU)

# Global compile options, only effective within this project
set(global_compile_options -Wall -Wno-error=pragmas)
Expand Down Expand Up @@ -77,7 +76,6 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "-O2") # Only for CI test
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_BUILD_PARALLEL_LEVEL ${NumCPU})

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-packed-bitfield-compat")
Expand Down
12 changes: 6 additions & 6 deletions doc/docs/introduction/how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ brew install cmake [email protected] pkg-config
```bash
cd PhotonLibOS
cmake -B build
cmake --build build -j
cmake --build build -j 8
```

```mdx-code-block
Expand All @@ -75,7 +75,7 @@ cmake --build build -j
```bash
cd PhotonLibOS
cmake -B build
cmake --build build -j
cmake --build build -j 8
```

```mdx-code-block
Expand All @@ -86,7 +86,7 @@ cmake --build build -j
```bash
cd PhotonLibOS
cmake -B build -D OPENSSL_ROOT_DIR=/usr/local/opt/[email protected]
cmake --build build -j
cmake --build build -j 8
```

```mdx-code-block
Expand Down Expand Up @@ -115,7 +115,7 @@ dnf install gtest-devel gmock-devel gflags-devel fuse-devel libgsasl-devel

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake --build build -j
cmake --build build -j 8

# Run all test cases
cd build
Expand All @@ -133,7 +133,7 @@ apt install libgtest-dev libgmock-dev libgflags-dev libfuse-dev libgsasl7-dev

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake --build build -j
cmake --build build -j 8

# Run all test cases
cd build
Expand All @@ -151,7 +151,7 @@ brew install gflags googletest gsasl

# Build examples and test code
cmake -B build -D PHOTON_BUILD_TESTING=ON
cmake --build build -j
cmake --build build -j 8

# Run all test cases
cd build
Expand Down
2 changes: 1 addition & 1 deletion doc/docs/performance/network-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ https://github.com/alibaba/PhotonLibOS/blob/main/examples/perf/net-perf.cpp

```cmake
cmake -B build -D PHOTON_BUILD_TESTING=1 -D PHOTON_ENABLE_URING=1 -D CMAKE_BUILD_TYPE=Release
cmake --build build -j -t net-perf
cmake --build build -j 8 -t net-perf
```

### Run
Expand Down
3 changes: 2 additions & 1 deletion fs/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ TEST(range_split_power2, random_test) {
offset = rand();
length = rand();
auto interval_shift = rand()%32 + 1;
interval = 1<<interval_shift;
interval = uint64_t(1) << interval_shift;
fs::range_split_power2 split(offset, length, interval);
EXPECT_EQ(offset, split.begin);
EXPECT_EQ(offset + length, split.end);
Expand Down Expand Up @@ -1373,6 +1373,7 @@ TEST(Walker, basic) {
}

int main(int argc, char **argv){
srand(time(nullptr));
::testing::InitGoogleTest(&argc, argv);
if (photon::init(photon::INIT_EVENT_DEFAULT, photon::INIT_IO_NONE))
return -1;
Expand Down

0 comments on commit 9fe484b

Please sign in to comment.