Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Super-LeWH committed Dec 6, 2024
1 parent 05924e7 commit 370ef49
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: C++ CI Build

on:
push:
branches:
- master # 触发工作流的分支,可以根据需要修改
pull_request:
branches:
- master # 触发PR时的工作流分支

jobs:
build:
runs-on: ubuntu-latest # 可以选择适合你的操作系统,如ubuntu-latest, windows-latest等

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up CMake
uses: actions/setup-cmake@v3
with:
cmake-version: '3.30.3' # 使用你的项目中需要的CMake版本,可以根据实际情况调整

- name: Set up C++ Build Environment
uses: actions/setup-toolchain@v1
with:
toolchain: 'clang' # 你也可以根据需要改成gcc或其他工具链

- name: Install dependencies (optional, based on your project)
run: |
sudo apt update
sudo apt install -y build-essential
- name: Configure CMake project
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../ # 你可以根据需要调整构建类型
- name: Build the project
run: |
cd build
cmake --build . --config Release # 指定构建配置,可以根据需要调整
- name: Run tests (optional)
run: |
cd build
cmake --build . --target test # 如果你的项目有测试,可以启用此步骤
- name: Upload build artifacts (optional)
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build # 将构建目录上传为构建产物(如果需要)

0 comments on commit 370ef49

Please sign in to comment.