gitea cicd 01
This commit is contained in:
parent
f1992edb8e
commit
6b26a5231f
38
.gitea/workflows/build.yml
Normal file
38
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,38 @@
|
||||
name: Build & Pack Release # 工作流的名称
|
||||
|
||||
# 当有代码推送到仓库的 main 分支时,这个 Actions 工作流会被触发并执行
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build: # 定义一个名为 build 的作业
|
||||
runs-on: windows # 指定了作业运行的环境
|
||||
|
||||
steps:
|
||||
|
||||
- name: Run CMake build and install
|
||||
run: |
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser # 允许本地脚本执行
|
||||
echo "Set up conda environment"
|
||||
cd D:/code/test/Build # 构建输出的路径
|
||||
conda init powershell
|
||||
echo "Set up conda environment completed"
|
||||
|
||||
echo "Starting software environment"
|
||||
conda activate software
|
||||
echo "Successfully started the software environment"
|
||||
|
||||
echo "Generate build files "
|
||||
cmake -DCMAKE_INSTALL_PREFIX=D:/code/test/Build -S D:/code/test -B D:/code/test/Build
|
||||
echo "Build file completed "
|
||||
|
||||
echo "Starting CMake build "
|
||||
cmake --build D:/code/test/Build --config Release
|
||||
echo "Completed CMake build"
|
||||
|
||||
echo "Starting CMake install"
|
||||
cmake --install D:/code/test/Build --config Release
|
||||
echo "Completed CMake install"
|
||||
|
Loading…
x
Reference in New Issue
Block a user