Merge branch 'master' of github.com:chenxuan520/cppnet #74
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: commit_test | |
on: | |
push: #设置触发规则 | |
branches: | |
- main | |
- master | |
jobs: | |
build: | |
strategy: | |
matrix: # 会分开成两个任务分别执行 | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
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 | |