Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI job for macOS #2222

Merged
merged 7 commits into from
Oct 17, 2023
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
66 changes: 63 additions & 3 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: codecov/codecov-action@v3
with:
file: cover.info
functionalities: 'search'
functionalities: "search"

- name: C and C++ Examples
run: |
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Ensure python dependencies
- name: Ensure Python dependencies
run: |
pip install torch~=2.0.0 --extra-index-url https://download.pytorch.org/whl/cpu &&\
pip install --user -r tools/python_api/requirements_dev.txt -f https://data.pyg.org/whl/torch-2.0.0+cpu.html
Expand Down Expand Up @@ -159,7 +159,6 @@ jobs:
- name: Run clang-tidy on examples
run: run-clang-tidy -p build/release -quiet -j 32 "^$(realpath examples)"


msvc-build-test:
name: msvc build & test
needs: [clang-formatting-check, header-include-guard-check]
Expand Down Expand Up @@ -254,3 +253,64 @@ jobs:

- name: Benchmark
run: python3 benchmark/benchmark_runner.py --dataset ldbc-sf100 --thread 10

macos-build-test:
name: apple clang build & test
needs: [clang-formatting-check, header-include-guard-check, rustfmt-check]
runs-on: self-hosted-mac-x64
steps:
- uses: actions/checkout@v3

- name: Ensure Python dependencies
run: |
pip3 install torch~=2.0.0 --extra-index-url https://download.pytorch.org/whl/cpu &&\
pip3 install --user -r tools/python_api/requirements_dev.txt -f https://data.pyg.org/whl/torch-2.0.0+cpu.html

- name: Ensure Node.js dependencies
run: npm install --include=dev
working-directory: tools/nodejs_api

- name: Build
run: make release NUM_THREADS=32

- name: Test
run: |
ulimit -n 10240
make test NUM_THREADS=32

- name: Python test
run: |
ulimit -n 10240
make pytest NUM_THREADS=32

- name: C and C++ Examples
run: |
ulimit -n 10240
make example NUM_THREADS=32

- name: Node.js test
run: |
ulimit -n 10240
make nodejstest NUM_THREADS=32

- name: Java test
run: |
ulimit -n 10240
make javatest NUM_THREADS=32

- name: Rust share build
# Share build cache when building rust API and the example project
run: echo $'[workspace]\nmembers = ["tools/rust_api","examples/rust"]' > Cargo.toml

- name: Rust test
run: |
ulimit -n 10240
source /Users/runner/.cargo/env
make rusttest NUM_THREADS=32

- name: Rust example
working-directory: examples/rust
run: |
ulimit -n 10240
source /Users/runner/.cargo/env
cargo build --features arrow
4 changes: 3 additions & 1 deletion test/c_api/database_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class CApiDatabaseTest : public APIEmptyDBTest {

TEST_F(CApiDatabaseTest, CreationAndDestroy) {
auto databasePathCStr = databasePath.c_str();
auto database = kuzu_database_init(databasePathCStr, kuzu_default_system_config());
auto systemConfig = kuzu_default_system_config();
systemConfig.buffer_pool_size = 512 * 1024;
auto database = kuzu_database_init(databasePathCStr, systemConfig);
ASSERT_NE(database, nullptr);
ASSERT_NE(database->_database, nullptr);
auto databaseCpp = static_cast<Database*>(database->_database);
Expand Down
4 changes: 3 additions & 1 deletion test/include/c_api_test/c_api_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class CApiTest : public APIDBTest {
database.reset();
auto databasePath = getDatabasePath();
auto databasePathCStr = databasePath.c_str();
_database = kuzu_database_init(databasePathCStr, kuzu_default_system_config());
auto systemConfig = kuzu_default_system_config();
systemConfig.buffer_pool_size = 512 * 1024 * 1024;
_database = kuzu_database_init(databasePathCStr, systemConfig);
connection = kuzu_connection_init(_database);
}

Expand Down