diff --git a/.github/workflows/CMakeLists.txt b/.github/workflows/CMakeLists.txt new file mode 100644 index 0000000..f78ee32 --- /dev/null +++ b/.github/workflows/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.21) +project(vAlerain_Ark) + +set(CMAKE_CXX_STANDARD 14) + +# 添加头文件目录 +include_directories(Header-file) +include_directories(Header-file/sys) + +# 添加可执行文件目标 +add_executable(main + Preview-version/1.0.0.1/main.cpp) + + diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml deleted file mode 100644 index 89828da..0000000 --- a/.github/workflows/c-cpp.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: C/C++ CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml new file mode 100644 index 0000000..5e14041 --- /dev/null +++ b/.github/workflows/cmake-single-platform.yml @@ -0,0 +1,37 @@ +name: CMake Build + +on: + push: + branches: + - main # 触发条件可以根据你的需要进行调整 + pull_request: + branches: + - main # 同样,根据需要进行调整 + +jobs: + build: + runs-on: windows-latest # 使用 Windows 最新版本 + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Install CMake + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 + + - name: Install Visual Studio Build Tools + uses: microsoft/setup-msbuild@v1.0.2 # 设置 MSBuild 环境 + + - name: Configure + run: cmake -Bbuild + + - name: Build + run: cmake --build build --config Release # 编译 Release 版本,可以根据需要调整 + + - name: Test + run: cmake --build build --target test # 运行测试,如果有的话 + + - name: Install + run: cmake --install build # 安装生成的文件 diff --git a/build/void b/build/void new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/build/void @@ -0,0 +1 @@ +