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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ build*/
*.exe
*.bin

# External dependency directories (use system packages instead)
ext/
# External dependency directories - exclude only build artifacts, not source
ext/*/build/
ext/*/build*/
ext/*/.git/
# Note: Allow ext/ CPM configuration files for header-only libraries

# Git directory
.git/
Expand Down
84 changes: 81 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,16 +457,94 @@ jobs:
fetch-depth: 1
- name: Install Dependencies (Brew)
run: |
brew install mariadb zeromq zmq luajit
brew install mariadb zeromq zmq luajit cmake ninja
- name: Cache 'build' folder
uses: actions/cache@v4
with:
path: build
key: ${{ github.repository }}-${{ runner.os }}-macos
- name: Configure CMake
run: |
mkdir -p build
# Clear CMake cache if it exists to avoid path conflicts
rm -f build/CMakeCache.txt
cmake -S . -B build
# Optimize for Apple Silicon or Intel
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build -j4
cmake --build build --parallel $(sysctl -n hw.ncpu)
- name: Archive Executables
uses: actions/upload-artifact@v4
with:
name: macos_executables
path: |
xi_connect
xi_map
xi_search
xi_world
xi_test

MacOS_Integration_Tests:
needs: MacOS_64bit
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/download-artifact@v4
with:
name: macos_executables
path: .
- name: Install Dependencies
run: |
brew install mariadb zeromq zmq luajit python3
# Start MariaDB service
brew services start mariadb
sleep 10
# Set up database
mysql -u root -e "CREATE DATABASE IF NOT EXISTS xidb;"
mysql -u root -e "CREATE USER IF NOT EXISTS 'xiuser'@'localhost' IDENTIFIED BY 'xipass';"
mysql -u root -e "GRANT ALL PRIVILEGES ON xidb.* TO 'xiuser'@'localhost';"
mysql -u root -e "FLUSH PRIVILEGES;"
- name: Install Python Dependencies
run: |
python3 -m pip install --break-system-packages -r tools/requirements.txt
- name: Import SQL files
run: |
python3 ./tools/dbtool.py setup
- name: Copy settings
run: |
cp settings/default/* settings/
- name: Run macOS-specific tests
run: |
chmod +x xi_connect xi_map xi_search xi_world xi_test

# Test executables can start
timeout 10 ./xi_connect --version || echo "Version check completed"
timeout 10 ./xi_map --version || echo "Version check completed"
timeout 10 ./xi_search --version || echo "Version check completed"
timeout 10 ./xi_world --version || echo "Version check completed"

# Test database connectivity
python3 -c "
import mysql.connector
try:
conn = mysql.connector.connect(
host='localhost',
user='xiuser',
password='xipass',
database='xidb'
)
print('Database connection successful')
conn.close()
except Exception as e:
print(f'Database connection failed: {e}')
exit(1)
"
- name: Cleanup
if: always()
run: |
brew services stop mariadb || true

Database_Performance_Tests:
runs-on: ubuntu-24.04
Expand Down
39 changes: 38 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,21 @@ jobs:
exit 1
fi

if [ ! -f "docker/Dockerfile.windows" ]; then
echo "ERROR: docker/Dockerfile.windows not found!"
exit 1
fi

if [ ! -f "docker/scripts/entrypoint.sh" ]; then
echo "ERROR: docker/scripts/entrypoint.sh not found!"
exit 1
fi

if [ ! -f "docker/scripts/entrypoint.ps1" ]; then
echo "ERROR: docker/scripts/entrypoint.ps1 not found!"
exit 1
fi

if [ ! -f "docker/supervisord.conf" ]; then
echo "ERROR: docker/supervisord.conf not found!"
exit 1
Expand Down Expand Up @@ -118,7 +128,7 @@ jobs:
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down Expand Up @@ -168,6 +178,33 @@ jobs:
anchore-results.sarif
continue-on-error: true

# Windows container build job (experimental)
docker-windows-build:
runs-on: windows-2022
if: github.event_name != 'pull_request'
permissions:
contents: read
packages: write

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

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Windows Docker image
run: |
docker build -f docker/Dockerfile.windows -t ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:windows-latest .

- name: Push Windows Docker image
run: |
docker push ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:windows-latest

docker-test:
runs-on: ubuntu-24.04
needs: docker-build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,4 @@ cloudflare-tunnel.json
# Docker build cache
.docker/
test_build/
test_build/
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,22 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/ext)
add_subdirectory(ext)
endif()

# Ensure argparse dependency is properly configured for Docker builds
if(TARGET argparse)
message(STATUS "argparse target found and configured")
get_target_property(ARGPARSE_INCLUDE_DIRS argparse INTERFACE_INCLUDE_DIRECTORIES)
if(ARGPARSE_INCLUDE_DIRS)
message(STATUS "argparse include directories: ${ARGPARSE_INCLUDE_DIRS}")
endif()
endif()

include(ClangTidy)
include(Fuzzing)

message(STATUS "Configuring src/common/version.h")
configure_file(${CMAKE_SOURCE_DIR}/src/common/version.h.in
${CMAKE_SOURCE_DIR}/src/common/version.h)

message(STATUS "Configuring src/common/version.cpp")
configure_file(${CMAKE_SOURCE_DIR}/src/common/version.cpp.in
${CMAKE_SOURCE_DIR}/src/common/version.cpp)
Expand Down
Loading
Loading