Update c-cpp.yml #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C++ CI Searcher/Indexer | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Clone mongo-cxx-driver repository into /search/mongo-cxx-driver directory | |
- name: Clone mongo-cxx-driver repository for Search | |
run: git clone --branch releases/v3.10 https://github.com/mongodb/mongo-cxx-driver.git search/mongo-cxx-driver | |
# Clone mongo-cxx-driver repository into /indexer/mongo-cxx-driver directory | |
- name: Clone mongo-cxx-driver repository for Indexer | |
run: git clone --branch releases/v3.10 https://github.com/mongodb/mongo-cxx-driver.git indexer/mongo-cxx-driver | |
# Build mongo-cxx-driver for Search | |
- name: Build mongo-cxx-driver for Search | |
run: | | |
mkdir -p search/mongo-cxx-driver/buildcmake | |
pwd | |
cd search/mongo-cxx-driver/buildcmake | |
pwd | |
cmake .. | |
make | |
make install | |
- name: Set CMAKE_PREFIX_PATH for mongocxx and bsoncxx | |
run: export CMAKE_PREFIX_PATH=mongo-cxx-driver/buildmake:$CMAKE_PREFIX_PATH | |
# Build mongo-cxx-driver for Indexer | |
#- name: Build mongo-cxx-driver for Indexer | |
# run: | | |
# mkdir -p indexer/mongo-cxx-driver/buildcmake | |
# cd indexer/mongo-cxx-driver/buildcmake | |
#cmake .. | |
#make | |
# Ensure directories exist and run build commands in /search/build directory | |
- name: Create search/build directory | |
run: | | |
mkdir -p search/build | |
pwd | |
- name: Configure in search/build | |
run: | | |
cd search/build | |
pwd | |
cmake .. | |
pwd | |
- name: Make in search/build | |
run: | | |
cd search/build | |
pwd | |
make | |
pwd | |
- name: Make check in search/build | |
run: | | |
cd search/build | |
make check | |
- name: Make distcheck in search/build | |
run: | | |
cd search/build | |
make distcheck | |
# Ensure directories exist and run build commands in /indexer/build directory | |
- name: Create indexer/build directory | |
run: mkdir -p indexer/build | |
- name: Configure in indexer/build | |
run: | | |
cd indexer/build | |
cmake .. | |
- name: Make in indexer/build | |
run: | | |
cd indexer/build | |
make | |
- name: Make check in indexer/build | |
run: | | |
cd indexer/build | |
make check | |
- name: Make distcheck in indexer/build | |
run: | | |
cd indexer/build | |
make distcheck |