From a6fb61f9203f3f4c0da18e7bfc785401ca774d0f Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:17:55 +0800 Subject: [PATCH 1/8] Delete .github/workflows directory --- .github/workflows/c-cpp.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/c-cpp.yml 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 From ebd9b48ffa7b1e9c228a8726f2c9eac680fcb02f Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:19:49 +0800 Subject: [PATCH 2/8] Create cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 39 +++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml new file mode 100644 index 0000000..93a0f48 --- /dev/null +++ b/.github/workflows/cmake-single-platform.yml @@ -0,0 +1,39 @@ +# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml +name: CMake on a single platform + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + From cd114f99cccec63a21ae487572b5e1b2aed1ce84 Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:26:47 +0800 Subject: [PATCH 3/8] Add files via upload --- .github/workflows/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/CMakeLists.txt 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) + + From f0bf662044efd7fd547a33b130d59dbe16d689b8 Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:27:09 +0800 Subject: [PATCH 4/8] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 26 ++++++--------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 93a0f48..bd553a7 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -1,6 +1,4 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml -name: CMake on a single platform +name: Build specific CPP file on: push: @@ -9,31 +7,21 @@ on: branches: [ "main" ] env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + # 自定义 CMake 构建类型 (Release, Debug, RelWithDebInfo, 等等) BUILD_TYPE: Release jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + # CMake 配置和构建命令是平台无关的,应该在 Windows 或 Mac 上同样有效。 runs-on: windows-latest steps: - uses: actions/checkout@v3 - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + # 在 'build' 子目录中配置 CMake。`CMAKE_BUILD_TYPE` 仅在使用单配置生成器(如 make)时才需要。 run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} - + - name: Build specific CPP file + # 编译特定的 CPP 文件 + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target your_specific_target_name From 70fa6d19c4af7d63644f770d63a24040fea5c93a Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:30:42 +0800 Subject: [PATCH 5/8] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 39 ++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index bd553a7..5f610ee 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -1,27 +1,34 @@ -name: Build specific CPP file +name: CMake Build on: push: - branches: [ "main" ] + branches: + - main # 触发条件可以根据你的需要进行调整 pull_request: - branches: [ "main" ] - -env: - # 自定义 CMake 构建类型 (Release, Debug, RelWithDebInfo, 等等) - BUILD_TYPE: Release + branches: + - main # 同样,根据需要进行调整 jobs: build: - # CMake 配置和构建命令是平台无关的,应该在 Windows 或 Mac 上同样有效。 - runs-on: windows-latest + runs-on: windows-latest # 这里使用 Windows 最新版本 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 + + - name: Set up MSVC + uses: microsoft/setup-msbuild@v1.0.2 # 设置 MSVC 环境 + + - name: Set up CMake + uses: cmake/action@v2 + + - name: Configure + run: cmake -Bbuild + + - name: Build + run: cmake --build build --config Release # 编译 Release 版本,可以根据需要调整 - - name: Configure CMake - # 在 'build' 子目录中配置 CMake。`CMAKE_BUILD_TYPE` 仅在使用单配置生成器(如 make)时才需要。 - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Test + run: cmake --build build --target test # 运行测试,如果有的话 - - name: Build specific CPP file - # 编译特定的 CPP 文件 - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target your_specific_target_name + - name: Install + run: cmake --install build # 安装生成的文件 From 2e050f37281609e7e2b98893cc2492379366a271 Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:32:14 +0800 Subject: [PATCH 6/8] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 5f610ee..802d7e0 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -10,16 +10,18 @@ on: jobs: build: - runs-on: windows-latest # 这里使用 Windows 最新版本 + runs-on: windows-latest # 使用 Windows 最新版本 steps: - uses: actions/checkout@v2 - - name: Set up MSVC - uses: microsoft/setup-msbuild@v1.0.2 # 设置 MSVC 环境 + - name: Install CMake + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' + RefreshEnv.cmd - - name: Set up CMake - uses: cmake/action@v2 + - name: Install Visual Studio Build Tools + uses: microsoft/setup-msbuild@v1.0.2 # 设置 MSBuild 环境 - name: Configure run: cmake -Bbuild From fd40aed9acfcb80a527f4d4290260e997970893c Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:34:36 +0800 Subject: [PATCH 7/8] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 802d7e0..5e14041 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -13,12 +13,13 @@ jobs: runs-on: windows-latest # 使用 Windows 最新版本 steps: - - uses: actions/checkout@v2 + - name: Checkout Repository + uses: actions/checkout@v2 - name: Install CMake run: | choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' - RefreshEnv.cmd + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 - name: Install Visual Studio Build Tools uses: microsoft/setup-msbuild@v1.0.2 # 设置 MSBuild 环境 From 93131be83f706ce6e1c372f733076e482fe1849e Mon Sep 17 00:00:00 2001 From: vAlerian <151636139+WhiteFoxLinux@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:07:58 +0800 Subject: [PATCH 8/8] Create void void --- build/void | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/void diff --git a/build/void b/build/void new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/build/void @@ -0,0 +1 @@ +