GitHubActions快速入门GitHubActions入门教程-阮一峰的网络日志GitHubActionsbyExample
githubaction的简单使用
目标:一个简单的C++项目。项目需要在windows和linux上编译。项目依赖qt和boost。
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions
on: [push]
jobs:
量化接口,build-on-window-22:
runs-on: windows-2022
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: install boost
id: install-boost
uses: MarkusJx/install-boost@v2.4.1
with:
boost_version: "1.80.0"
platform_version: 2022
toolset: "msvc"
- name: install qt
uses: jurplel/install-qt-action@v3
with:
version: "5.15.2"
host: "windows"
target: "desktop"
arch: "win64_msvc2019_64"
- name: 量化接口,build demo
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
build-on-ubuntu-22:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: install boost
id: install-boost
uses: MarkusJx/install-boost@v2.4.1
with:
boost_version: "1.80.0"
platform_version: 22.04
toolset: "gcc"
- name: install qt
uses: jurplel/install-qt-action@v3
with:
version: "5.15.2"
target: "desktop"
- name: build demo
run: |
mkdir build
cd build
cmake ..
make
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
文章为作者独立观点,不代表 股票程序化软件自动交易接口观点