From 6b26a5231f32484937fcde4a384ced078ba39f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A8=81=E5=8B=9D=20=E5=BC=B5?= Date: Sat, 22 Feb 2025 20:37:31 +0800 Subject: [PATCH] gitea cicd 01 --- .gitea/workflows/build.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..9efa177 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -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" +