use dedicated thread #9
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: build | |
on: push | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-latest] | |
fail-fast: false | |
runs-on: ${{matrix.os}} | |
env: | |
OS: ${{matrix.os}} | |
CC: ${{matrix.cc}} | |
CXX: ${{matrix.cxx}} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Prepare Environment | |
run: | | |
./.github/workflows/install_gtest.sh | |
./.github/workflows/install_gbench.sh | |
if [[ $OS == ubuntu* ]]; then | |
sudo ./dependencies.sh | |
./.github/workflows/install_grpc.sh | |
./.github/workflows/install_gtest_parallel.sh | |
else | |
./dependencies.sh | |
fi | |
- name: Build Reindexer | |
run: | | |
export CPLUS_INCLUDE_PATH=$GITHUB_WORKSPACE/grpc/third_party/abseil-cpp | |
mkdir build && cd build | |
if [[ $OS == ubuntu-latest ]]; then | |
cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On .. | |
elif [[ $OS == macos* ]]; then | |
cmake -DGH_CI_OSX=ON .. | |
else | |
cmake -DENABLE_GRPC=ON .. | |
fi | |
make -j4 | |
STRIP=/bin/true cpack | |
- name: 'C++ tests' | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
echo "Running C++ directly in this job due to Action's problem with artifacts transition for macos-11 and macos-12 runners" | |
cd build | |
ctest --verbose -R gtests | |
- name: 'Tar Artifacts' | |
run: | | |
find ./build/ -name CMakeFiles | xargs -n1 rm -rf | |
rm -rf ./build/_CPack_Packages ./build/cpp_src/server/reindexer_server_resources | |
tar -cvf artifacts.tar build/ bindings/builtin/builtin_posix.go bindings/builtinserver/builtinserver_posix.go dependencies.sh | |
- name: Archive Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{matrix.os}}${{matrix.sanitizer}} | |
path: artifacts.tar | |
if-no-files-found: error | |