Skip to content

[test] osx13, no go #41

[test] osx13, no go

[test] osx13, no go #41

Workflow file for this run

name: build
on: push
jobs:
build:
strategy:
matrix:
os: [macos-13]
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-13 ]]; then
cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On ..
elif [[ $OS == macos* ]]; then
cmake ..
else
cmake -DENABLE_GRPC=ON ..
fi
make -j4
STRIP=/bin/true cpack
- name: 'C++ tests'
if: ${{ matrix.os == 'macos-13' }}
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
test:
strategy:
matrix:
os: [macos-13]
test: ['GO']
fail-fast: false
runs-on: ${{matrix.os}}
needs: build
if: always()
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
TEST: ${{matrix.test}}
steps:
- name: Checkout repository
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
uses: actions/checkout@v4
# - name: Install Go
# uses: actions/setup-go@v5
# if: ${{ matrix.os == 'macos-13' }}
# with:
# go-version: '1.22.x'
# check-13: true
# - name: Set LD_LIBRARY_PATH
# run: echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/homebrew/lib" >> $GITHUB_ENV
- name: Download ${{matrix.os}}${{matrix.sanitizer}} Artifacts
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
uses: actions/download-artifact@v4
with:
name: ${{matrix.os}}${{matrix.sanitizer}}
- name: 'Untar Artifacts'
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
run: tar -xvf artifacts.tar
- name: Prepare Environment
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
env:
OS: ${{matrix.os}}
run: |
if [[ $OS == ubuntu* ]]; then
sudo ./dependencies.sh
else
./dependencies.sh
#go env
#find / -name libleveldb* 2>/dev/null
#ln -s /opt/homebrew/lib/libsnappy.dylib /usr/local/lib/libsnappy.dylib || true
#ln -s /opt/homebrew/lib/libleveldb.a /usr/local/lib/libleveldb.a || true
# ln -s /opt/homebrew/lib/libleveldb.dylib /usr/local/lib/libleveldb.dylib || true
fi
if [[ $TEST == 'GO' ]]; then
go mod download
elif [[ $OS == ubuntu* ]]; then
./.github/workflows/install_gtest_parallel.sh
fi

Check failure on line 112 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

You have an error in your yaml syntax on line 112
- name: Tests
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
run: |
if [[ $TEST == 'GO' ]]; then
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/homebrew/lib
# export PATH=$PATH:/opt/homebrew/lib
# echo $LD_LIBRARY_PATH
# echo $PATH
#go env
if [[ -z "${{matrix.sanitizer}}" ]]; then
go test -timeout 15m ./test/... -bench . -benchmem -benchtime 100ms -seedcount=50000
else
go test -timeout 35m ./test/... -bench . -benchmem -benchtime 100ms -seedcount=50000
fi
else
cd build
ctest --verbose
fi