Skip to content

feat: Add retry strategy and update documentation links #137

feat: Add retry strategy and update documentation links

feat: Add retry strategy and update documentation links #137

Workflow file for this run

name: commit_test

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

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

(Line: 14, Col: 7): Unexpected value 'retries'
on:
push: #设置触发规则
branches:
- main
- master
jobs:
build:
strategy:
matrix: # 会分开成两个任务分别执行
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false # 一个系统失败不终止其他系统的任务
retries:
max_attempts: 3 # 每个失败的任务重试3次
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code #这部分是为了从github自动clone代码
uses: actions/checkout@v4
with:
submodules: true
- name: Run in windows
if: matrix.os == 'windows-latest'
run: |
cd src
mkdir build
cd build
cmake -G "MinGW Makefiles" .. -DENABLE_SSL=OFF
make
cd ..
./bin/test_bin.exe
- name: Run test #需要执行的命令
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
cd src
./build.sh
./bin/test_bin
- name: Run Memory Check
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt -y install valgrind
cd src
valgrind --leak-check=full ./bin/test_bin