Skip to content

Commit

Permalink
Clean before merge archive
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Oct 7, 2023
1 parent 87dfc84 commit 235b80c
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 11 deletions.
44 changes: 42 additions & 2 deletions .github/workflows/ci.linux.arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "main" ]

jobs:
centos8-gcc921-epoll:
centos8-gcc921-epoll-release:
runs-on: [self-hosted, Linux, ARM64]

container:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_BUILD_DEPENDENCIES=OFF -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON
Expand All @@ -46,3 +46,43 @@ jobs:
ulimit -l unlimited
cd build
ctest --timeout 3600 -V
centos8-gcc921-epoll-debug:
runs-on: [self-hosted, Linux, ARM64]

container:
image: dokken/centos-stream-8:sha-40294ce
options: --cpus 4

steps:
- uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Asia/Shanghai"
timezoneMacos: "Asia/Shanghai"
timezoneWindows: "China Standard Time"

- uses: actions/checkout@v3

- name: Install Dependencies
run: |
dnf install -y git gcc-c++ cmake 'dnf-command(config-manager)'
dnf install -y gcc-toolset-9-gcc-c++
dnf install -y openssl-devel libcurl-devel libaio-devel
dnf install -y epel-release
dnf config-manager --set-enabled powertools
dnf install -y gtest-devel gmock-devel gflags-devel fuse-devel libgsasl-devel e2fsprogs-devel
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=Debug \
-D PHOTON_BUILD_DEPENDENCIES=OFF -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON
cmake --build build -j -- VERBOSE=1
- name: Test
run: |
ulimit -l unlimited
cd build
ctest --timeout 3600 -V
48 changes: 44 additions & 4 deletions .github/workflows/ci.linux.x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "main" ]

jobs:
centos8-gcc921-epoll:
centos8-gcc921-epoll-release:
runs-on: [self-hosted, Linux, X64]

container:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_BUILD_DEPENDENCIES=OFF -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON
Expand All @@ -47,7 +47,47 @@ jobs:
cd build
ctest --timeout 3600 -V
centos8-gcc921-iouring:
centos8-gcc921-epoll-debug:
runs-on: [self-hosted, Linux, X64]

container:
image: dokken/centos-stream-8:sha-40294ce
options: --cpus 4

steps:
- uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Asia/Shanghai"
timezoneMacos: "Asia/Shanghai"
timezoneWindows: "China Standard Time"

- uses: actions/checkout@v3

- name: Install Dependencies
run: |
dnf install -y git gcc-c++ cmake 'dnf-command(config-manager)'
dnf install -y gcc-toolset-9-gcc-c++
dnf install -y openssl-devel libcurl-devel libaio-devel
dnf install -y epel-release
dnf config-manager --set-enabled powertools
dnf install -y gtest-devel gmock-devel gflags-devel fuse-devel libgsasl-devel e2fsprogs-devel
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=Debug \
-D PHOTON_BUILD_DEPENDENCIES=OFF -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON
cmake --build build -j -- VERBOSE=1
- name: Test
run: |
ulimit -l unlimited
cd build
ctest --timeout 3600 -V
centos8-gcc921-iouring-release:
runs-on: [self-hosted, Linux, X64]

container:
Expand Down Expand Up @@ -75,7 +115,7 @@ jobs:
- name: Build
run: |
source /opt/rh/gcc-toolset-9/enable
cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
-D PHOTON_BUILD_DEPENDENCIES=ON -D PHOTON_BUILD_TESTING=ON \
-D PHOTON_ENABLE_SASL=ON -D PHOTON_ENABLE_FUSE=ON \
-D PHOTON_ENABLE_EXTFS=ON \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.macos.arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "main" ]

jobs:
macOS-clang:
macOS-clang-debug:
runs-on: [self-hosted, macOS, ARM64]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "main" ]

jobs:
macOS-12-Monterey:
macOS-12-Monterey-debug:
runs-on: macos-12

steps:
Expand Down
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ set(CMAKE_CXX_STANDARD ${PHOTON_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# CMake didn't provide an abstraction of optimization level for now.
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") # For development
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") # For production
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g") # For CI test
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-O3 -g") # Only for CI test
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down Expand Up @@ -306,6 +307,7 @@ target_link_libraries(photon_static
# Merge static libs into libphoton.a
# Do NOT use this target directly.
add_custom_target(_photon_static_archive ALL
COMMAND rm -rf libphoton.a
COMMAND ar -crT libphoton.a $<TARGET_FILE:photon_static> $<TARGET_FILE:easy_weak> $<TARGET_FILE:fstack_weak>
DEPENDS photon_static
WORKING_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
Expand Down

0 comments on commit 235b80c

Please sign in to comment.