Skip to content

fix:cicd mac openssl problem about https://github.com/actions/runner-… #64

fix:cicd mac openssl problem about https://github.com/actions/runner-…

fix:cicd mac openssl problem about https://github.com/actions/runner-… #64

Workflow file for this run

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: Install macos build tools #这部分是安装依赖
if: matrix.os == 'macos-latest'
run: |
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar -xvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
./config --prefix=/usr/local/openssl
make
sudo make install
export PATH=/usr/local/openssl/bin:$PATH
- name: Run in windows
if: matrix.os == 'windows-latest'
run: |
cd src
mkdir build
cd build
cmake -G "MinGW Makefiles" .. -DENABLE_SSL=OFF
make
../bin/test_bin.exe
- name: Run test #需要执行的命令
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
cd src
./build.sh
./bin/test_bin