This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
run and uses #3
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: C++ CI | |
on: | |
push: | |
branches: | |
- main # 当 main 分支有代码推送时触发工作流 | |
pull_request: | |
branches: | |
- main # 当有针对 main 分支的 PR 时触发工作流 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 # 检出代码 | |
- name: Set up C++ compiler | |
run: sudo apt-get update && sudo apt-get install -y g++ # 设置 C++ 编译环境 | |
- name: Build | |
run: make # 执行编译命令 | |
- name: Test | |
run: ./main # run |