refactory: improvments of typo and some hotfix #542
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 and test | |
on: | |
push: | |
# file paths to consider in the event. Optional; defaults to all. | |
paths: | |
- 'cmake/**' | |
- 'examples/**' | |
- 'scripts/**' | |
- 'src/**' | |
- 'test/**' | |
- 'thirdparty/**' | |
- '.github/workflows/main.yaml' | |
- '!**.md' | |
- '.clang-format' | |
- '.clang-tidy' | |
pull_request: | |
# file paths to consider in the event. Optional; defaults to all. | |
paths: | |
- 'cmake/**' | |
- 'examples/**' | |
- 'scripts/**' | |
- 'src/**' | |
- 'test/**' | |
- 'thirdparty/**' | |
- '.github/workflows/main.yaml' | |
- '!**.md' | |
- '.clang-format' | |
- '.clang-tidy' | |
jobs: | |
linux: | |
name: Build and test AMD64 ${{ matrix.os.distro }} ${{ matrix.os.version }} | |
runs-on: ubuntu-latest | |
container: ${{ matrix.os.image }} | |
timeout-minutes: 75 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- distro: Ubuntu | |
version: 18.04 | |
image: ubuntu:18.04 | |
key: u1804 | |
- distro: Ubuntu | |
version: 22.04 | |
image: ubuntu:22.04 | |
key: u2204 | |
- distro: CentOS | |
version: 7 | |
image: centos:7 | |
key: c7 | |
- distro: Fedora | |
version: 36 | |
image: fedora:36 | |
key: fc36 | |
- distro: Fedora | |
version: 37 | |
image: fedora:37 | |
key: fc37 | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPILERCHECK: content | |
CCACHE_COMPRESS: 1 | |
CCACHE_COMPRESSLEVEL: 5 | |
CCACHE_MAXSIZE: 2G | |
steps: | |
- name: Env | |
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache ccache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/.ccache | |
key: linux-${{ matrix.os.key }}-ccache-${{ github.sha }} | |
restore-keys: linux-${{ matrix.os.key }}-ccache- | |
- name: Prepare | |
run: | | |
sh scripts/install_deps.sh | |
- name: Lint | |
if: ${{ matrix.os.distro == 'Ubuntu' }} | |
run: | | |
make lint | |
- name: Uint Testing | |
run: | | |
make test | |
st-ubuntu: | |
name: Test all with coverage | |
runs-on: ubuntu-${{ matrix.ubuntu }} | |
timeout-minutes: 75 | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu: [22.04] | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPILERCHECK: content | |
CCACHE_COMPRESS: 1 | |
CCACHE_COMPRESSLEVEL: 5 | |
CCACHE_MAXSIZE: 2G | |
steps: | |
- name: Env | |
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache ccache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/.ccache | |
key: ubuntu-${{ matrix.ubuntu }}-ccache-${{ github.sha }} | |
restore-keys: ubuntu-${{ matrix.ubuntu }}-ccache- | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Prepare | |
run: | | |
sh scripts/install_deps.sh | |
- name: Testing With Coverage | |
run: | | |
make coverage | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./code_coverage/lcov_output.info | |
name: ubuntu-${{ matrix.ubuntu }}-coverage | |
macos: | |
name: Build and test macOS ${{ matrix.macos }} | |
runs-on: macos-${{ matrix.macos }} | |
timeout-minutes: 75 | |
strategy: | |
fail-fast: false | |
matrix: | |
macos: [11] | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPILERCHECK: content | |
CCACHE_COMPRESS: 1 | |
CCACHE_CPP2: true | |
CCACHE_COMPRESSLEVEL: 5 | |
CCACHE_MAXSIZE: 2G | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache ccache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/.ccache | |
key: macos-${{ matrix.macos }}-ccache-${{ github.sha }} | |
restore-keys: macos-${{ matrix.macos }}-ccache- | |
- name: Prepare | |
run: | | |
sh scripts/install_deps.sh | |
- name: Uint Testing | |
run: | | |
make test | |
windows: | |
name: Build and test windows | |
runs-on: windows-2022 | |
timeout-minutes: 75 | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPILERCHECK: content | |
CCACHE_COMPRESS: 1 | |
CCACHE_COMPRESSLEVEL: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache ccache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/.ccache | |
key: windows-ccache-${{ github.sha }} | |
restore-keys: windows-ccache- | |
- name: Install dependencies on windows | |
shell: cmd | |
run: | | |
choco install cmake ninja ccache | |
cmake --version | |
ninja --version | |
- name: Build | |
shell: cmd | |
run: | | |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cmake -S . -B build -DMILVUS_BUILD_TEST=YES -G Ninja | |
cmake --build build | |
- name: Uint Testing | |
shell: cmd | |
run: | | |
build\test\testing-ut | |
build\test\testing-it | |