{"id":337022,"date":"2022-08-15T03:00:11","date_gmt":"2022-08-15T03:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=337022"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=337022","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 GitHub Actions \u0441 C++ \u0438 CMake<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;Using GitHub Actions with C++ and CMake&#187; \u043e\u0442 Cristian Adam, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u043e\u043b\u043e \u0442\u0440\u0435\u0445 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434. \u0417\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432 GitHub Actions \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044d\u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0432\u043e\u0434\u043d\u044b\u043c \u043e\u0431\u0437\u043e\u0440\u043e\u043c.<\/p>\n<hr\/>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 GitHub Actions \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 C++, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e CMake.<\/p>\n<p><a href=\"https:\/\/github.com\/features\/actions\" rel=\"noopener noreferrer nofollow\">GitHub Actions<\/a> \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f GitHub \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 CI\/CD. \u0421\u0435\u0439\u0447\u0430\u0441 GitHub Actions \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b (runners)<\/a>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u0418\u043c\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 YAML<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Windows Server 2022<\/p>\n<\/td>\n<td>\n<p align=\"left\">windows-latest<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ubuntu 20.04<\/p>\n<\/td>\n<td>\n<p align=\"left\">ubuntu-latest \u0438\u043b\u0438 ubuntu-20.04<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ubuntu 18.04<\/p>\n<\/td>\n<td>\n<p align=\"left\">ubuntu-18.04<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">macOS Catalina 10.15<\/p>\n<\/td>\n<td>\n<p align=\"left\">macos-latest<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>2\u0445 \u044f\u0434\u0435\u0440\u043d\u043e\u0435 CPU<\/p>\n<\/li>\n<li>\n<p>7 \u0413\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>14 \u0413\u0431 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 SSD<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e <a href=\"https:\/\/docs.github.com\/en\/actions\/learn-github-actions\/usage-limits-billing-and-administration#usage-limits\" rel=\"noopener noreferrer nofollow\">6 \u0447\u0430\u0441\u043e\u0432<\/a>.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b GitHub Actions \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 C++, \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441:<\/p>\n<pre><code>.\/configure make make check make distcheck <\/code><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 CMake.<\/p>\n<h3>Hello World<\/h3>\n<p>\u042f \u0445\u043e\u0447\u0443 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 C++:<\/p>\n<pre><code>#include &lt;iostream>  int main() {   std::cout &lt;&lt; \"Hello world\\n\"; } <\/code><\/pre>\n<p>\u0421\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c CMake:<\/p>\n<pre><code>cmake_minimum_required(VERSION 3.16)  project(main)  add_executable(main main.cpp)  install(TARGETS main)  enable_testing() add_test(NAME main COMMAND main) <\/code><\/pre>\n<p><strong>TL;DR<\/strong> \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 <a href=\"https:\/\/github.com\/cristianadam\/HelloWorld\/\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<h3>Build Matrix<\/h3>\n<p>\u042f \u043d\u0430\u0447\u0430\u043b \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>name: CMake Build Matrix  on: [push]  jobs:   build:     name: ${\u200a{ matrix.config.name }\u200a}     runs-on: ${\u200a{ matrix.config.os }\u200a}     strategy:       fail-fast: false       matrix:         config:         - {             name: \"Windows Latest MSVC\", artifact: \"Windows-MSVC.tar.xz\",             os: windows-latest,             build_type: \"Release\", cc: \"cl\", cxx: \"cl\",             environment_script: \"C:\/Program Files (x86)\/Microsoft Visual Studio\/2019\/Enterprise\/VC\/Auxiliary\/Build\/vcvars64.bat\"           }         - {             name: \"Windows Latest MinGW\", artifact: \"Windows-MinGW.tar.xz\",             os: windows-latest,             build_type: \"Release\", cc: \"gcc\", cxx: \"g++\"           }         - {             name: \"Ubuntu Latest GCC\", artifact: \"Linux.tar.xz\",             os: ubuntu-latest,             build_type: \"Release\", cc: \"gcc\", cxx: \"g++\"           }         - {             name: \"macOS Latest Clang\", artifact: \"macOS.tar.xz\",             os: macos-latest,             build_type: \"Release\", cc: \"clang\", cxx: \"clang++\"           } <\/code><\/pre>\n<h3>\u0421\u0432\u0435\u0436\u0438\u0435 CMake \u0438 Ninja<\/h3>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/software-installed-on-github-hosted-runners\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u041f\u041e<\/a> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e CMake \u0435\u0441\u0442\u044c \u0432\u0435\u0437\u0434\u0435, \u043d\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f CMake<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Windows Server 2019<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.16.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ubuntu 18.04<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.12.4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">macOS Catalina 10.15<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.15.5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e CMake \u0434\u043e 3.12 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c CMake.<\/p>\n<p>CMake 3.16 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/command\/target_precompile_headers.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432<\/a> \u0438 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/prop_tgt\/UNITY_BUILD.html\" rel=\"noopener noreferrer nofollow\">Unity Builds<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 CMake \u0438 Ninja \u0435\u0441\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u0441 GitHub.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/workflow-syntax-for-github-actions#using-a-specific-shell\" rel=\"noopener noreferrer nofollow\">\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043c<\/a> \u044f\u0437\u044b\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 (bash \u0434\u043b\u044f Linux \u0438 powershell \u0434\u043b\u044f Windows). CMake \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u044b \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439.<\/p>\n<pre><code>- name: Download Ninja and CMake   id: cmake_and_ninja   shell: cmake -P {0}   run: |     set(ninja_version \"1.9.0\")     set(cmake_version \"3.16.2\")      message(STATUS \"Using host CMake version: ${CMAKE_VERSION}\")      if (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\")       set(ninja_suffix \"win.zip\")       set(cmake_suffix \"win64-x64.zip\")       set(cmake_dir \"cmake-${cmake_version}-win64-x64\/bin\")     elseif (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Linux\")       set(ninja_suffix \"linux.zip\")       set(cmake_suffix \"Linux-x86_64.tar.gz\")       set(cmake_dir \"cmake-${cmake_version}-Linux-x86_64\/bin\")     elseif (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"macOS\")       set(ninja_suffix \"mac.zip\")       set(cmake_suffix \"Darwin-x86_64.tar.gz\")       set(cmake_dir \"cmake-${cmake_version}-Darwin-x86_64\/CMake.app\/Contents\/bin\")     endif()      set(ninja_url \"https:\/\/github.com\/ninja-build\/ninja\/releases\/download\/v${ninja_version}\/ninja-${ninja_suffix}\")     file(DOWNLOAD \"${ninja_url}\" .\/ninja.zip SHOW_PROGRESS)     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf .\/ninja.zip)      set(cmake_url \"https:\/\/github.com\/Kitware\/CMake\/releases\/download\/v${cmake_version}\/cmake-${cmake_version}-${cmake_suffix}\")     file(DOWNLOAD \"${cmake_url}\" .\/cmake.zip SHOW_PROGRESS)     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf .\/cmake.zip)      # Save the path for other steps     file(TO_CMAKE_PATH \"$ENV{GITHUB_WORKSPACE}\/${cmake_dir}\" cmake_dir)     message(\"::set-output name=cmake_dir::${cmake_dir}\")      if (NOT \"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\")       execute_process(         COMMAND chmod +x ninja         COMMAND chmod +x ${cmake_dir}\/cmake       )     endif() <\/code><\/pre>\n<h3>\u0428\u0430\u0433 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c CMake \u0438 Ninja, \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>- name: Configure   shell: cmake -P {0}   run: |     set(ENV{CC} ${\u200a{ matrix.config.cc }\u200a})     set(ENV{CXX} ${\u200a{ matrix.config.cxx }\u200a})      if (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\" AND NOT \"x${\u200a{ matrix.config.environment_script }\u200a}\" STREQUAL \"x\")       execute_process(         COMMAND \"${\u200a{ matrix.config.environment_script }\u200a}\" &amp;&amp; set         OUTPUT_FILE environment_script_output.txt       )       file(STRINGS environment_script_output.txt output_lines)       foreach(line IN LISTS output_lines)         if (line MATCHES \"^([a-zA-Z0-9_-]+)=(.*)$\")           set(ENV{${CMAKE_MATCH_1}\u200a} \"${CMAKE_MATCH_2}\")         endif()       endforeach()     endif()      file(TO_CMAKE_PATH \"$ENV{GITHUB_WORKSPACE}\/ninja\" ninja_program)      execute_process(       COMMAND ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake         -S .         -B build         -D CMAKE_BUILD_TYPE=${\u200a{ matrix.config.build_type }\u200a}         -G Ninja         -D CMAKE_MAKE_PROGRAM=${ninja_program}       RESULT_VARIABLE result     )     if (NOT result EQUAL 0)       message(FATAL_ERROR \"Bad exit status\")     endif() <\/code><\/pre>\n<p>\u042f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>CC<\/code> \u0438 <code>CXX<\/code>, \u0430 \u0434\u043b\u044f MSVC \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 <code>vcvars64.bat<\/code>, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 CMake.<\/p>\n<h3>\u0428\u0430\u0433 \u0441\u0431\u043e\u0440\u043a\u0438<\/h3>\n<p>\u0428\u0430\u0433 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0437\u0430\u043f\u0443\u0441\u043a CMake \u0441  \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--build<\/code>:<\/p>\n<pre><code>- name: Build   shell: cmake -P {0}   run: |     set(ENV{NINJA_STATUS} \"[%f\/%t %o\/sec] \")      if (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\" AND NOT \"x${\u200a{ matrix.config.environment_script }\u200a}\" STREQUAL \"x\")       file(STRINGS environment_script_output.txt output_lines)       foreach(line IN LISTS output_lines)         if (line MATCHES \"^([a-zA-Z0-9_-]+)=(.*)$\")           set(ENV{${CMAKE_MATCH_1}\u200a} \"${CMAKE_MATCH_2}\")         endif()       endforeach()     endif()      execute_process(       COMMAND ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake --build build       RESULT_VARIABLE result     )     if (NOT result EQUAL 0)       message(FATAL_ERROR \"Bad exit status\")     endif() <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>NINJA_STATUS<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 MSVC \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 <code>environment_script_output.txt<\/code>, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0448\u0430\u0433\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<h3>\u0428\u0430\u0433 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>ctest<\/code> \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0447\u0438\u0441\u043b\u0430 \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>-j<\/code>:<\/p>\n<pre><code>- name: Run tests   shell: cmake -P {0}   run: |     include(ProcessorCount)     ProcessorCount(N)      execute_process(       COMMAND ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/ctest -j ${N}       WORKING_DIRECTORY build       RESULT_VARIABLE result     )     if (NOT result EQUAL 0)       message(FATAL_ERROR \"Running tests failed!\")     endif() <\/code><\/pre>\n<h3>\u0428\u0430\u0433\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/h3>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0437\u0430\u043f\u0443\u0441\u043a CMake \u0441 <code>--install<\/code>, \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0437\u043e\u0432 CMake \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 <code>tar.xz<\/code> \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0430\u0440\u0445\u0438\u0432\u0430 \u043a\u0430\u043a \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code>- name: Install Strip   run: ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake --install build --prefix instdir --strip  - name: Pack   working-directory: instdir   run: ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake -E tar cJfv ..\/${\u200a{ matrix.config.artifact }\u200a} .  - name: Upload   uses: actions\/upload-artifact@v1   with:     path: .\/${\u200a{ matrix.config.artifact }\u200a}     name: ${\u200a{ matrix.config.artifact }\u200a} <\/code><\/pre>\n<p>\u042f \u043d\u0435 \u0441\u0442\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CMake \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 CMake \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u043b\u0438\u0437\u043e\u0432<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0435 \u0440\u0435\u043b\u0438\u0437 \u0432 git, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u043b\u0438\u0441\u044c \u043a \u0440\u0435\u043b\u0438\u0437\u0443:<\/p>\n<pre><code>git tag -a v1.0.0 -m \"Release v1.0.0\" git push origin v1.0.0 <\/code><\/pre>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 git refpath \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>tags\/v<\/code>:<\/p>\n<pre><code>release:   if: contains(github.ref, 'tags\/v')   runs-on: ubuntu-latest   needs: build    steps:   - name: Create Release     id: create_release     uses: actions\/create-release@v1.0.0     env:       GITHUB_TOKEN: ${\u200a{ secrets.GITHUB_TOKEN }\u200a}     with:       tag_name: ${\u200a{ github.ref }\u200a}       release_name: Release ${\u200a{ github.ref }\u200a}       draft: false       prerelease: false    - name: Store Release url     run: |       echo \"${\u200a{ steps.create_release.outputs.upload_url }\u200a}\" > .\/upload_url    - uses: actions\/upload-artifact@v1     with:       path: .\/upload_url       name: upload_url  publish:   if: contains(github.ref, 'tags\/v')   name: ${\u200a{ matrix.config.name }\u200a}   runs-on: ${\u200a{ matrix.config.os }\u200a}   strategy:     fail-fast: false     matrix:       config:       - {           name: \"Windows Latest MSVC\", artifact: \"Windows-MSVC.tar.xz\",           os: ubuntu-latest         }       - {           name: \"Windows Latest MinGW\", artifact: \"Windows-MinGW.tar.xz\",           os: ubuntu-latest         }       - {           name: \"Ubuntu Latest GCC\", artifact: \"Linux.tar.xz\",           os: ubuntu-latest         }       - {           name: \"macOS Latest Clang\", artifact: \"macOS.tar.xz\",           os: ubuntu-latest         }   needs: release    steps:   - name: Download artifact     uses: actions\/download-artifact@v1     with:       name: ${\u200a{ matrix.config.artifact }\u200a}       path: .\/    - name: Download URL     uses: actions\/download-artifact@v1     with:       name: upload_url       path: .\/   - id: set_upload_url     run: |       upload_url=`cat .\/upload_url`       echo ::set-output name=upload_url::$upload_url    - name: Upload to Release     id: upload_to_release     uses: actions\/upload-release-asset@v1.0.1     env:       GITHUB_TOKEN: ${\u200a{ secrets.GITHUB_TOKEN }\u200a}     with:       upload_url: ${\u200a{ steps.set_upload_url.outputs.upload_url }\u200a}       asset_path: .\/${\u200a{ matrix.config.artifact }\u200a}       asset_name: ${\u200a{ matrix.config.artifact }\u200a}       asset_content_type: application\/x-gtar <\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u043c, \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0442\u0430\u043a \u043a\u0430\u043a <code>actions\/create-release<\/code> \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u042d\u0442\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/github.com\/actions\/create-release\/issues\/14\" rel=\"noopener noreferrer nofollow\">issue #14<\/a> \u0438 <a href=\"https:\/\/github.com\/actions\/create-release\/issues\/27\" rel=\"noopener noreferrer nofollow\">issue #27<\/a>.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e 6 \u0447\u0430\u0441\u043e\u0432, \u0442\u043e\u043a\u0435\u043d <code>secrets.GITHUB_TOKEN<\/code> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/authenticating-with-the-github_token#about-the-github_token-secret\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u0438\u043d \u0447\u0430\u0441<\/a>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0432 \u0440\u0435\u043b\u0438\u0437 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 <a href=\"https:\/\/github.community\/t5\/GitHub-Actions\/error-Bad-credentials\/td-p\/33500\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0438<\/a> \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 GitHub.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c GitHub Actions \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 CMake \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0449\u0435, \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>.github\/workflows\/build_cmake.yml<\/code> \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0438\u0437 <a href=\"https:\/\/cristianadam.eu\/assets\/github-actions\/build_cmake.yml\" rel=\"noopener noreferrer nofollow\">build_cmake.yml<\/a>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c GitHub Actions \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u041a\u0440\u0438\u0441\u0442\u0438\u0430\u043d\u0430 \u0410\u0434\u0430\u043c\u0430 <a href=\"https:\/\/github.com\/cristianadam\/HelloWorld\/\" rel=\"noopener noreferrer nofollow\">Hello World GitHub<\/a>.<\/p>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u043d\u0430 <a href=\"https:\/\/cristianadam.eu\/20191222\/using-github-actions-with-c-plus-plus-and-cmake\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 <a href=\"http:\/\/creativecommons.org\/licenses\/by\/4.0\/\" rel=\"noopener noreferrer nofollow\">CC BY 4.0<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/682458\/\"> https:\/\/habr.com\/ru\/post\/682458\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;Using GitHub Actions with C++ and CMake&#187; \u043e\u0442 Cristian Adam, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043e\u043a\u043e\u043b\u043e \u0442\u0440\u0435\u0445 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434. \u0417\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432 GitHub Actions \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044d\u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0432\u043e\u0434\u043d\u044b\u043c \u043e\u0431\u0437\u043e\u0440\u043e\u043c.<\/p>\n<hr\/>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 GitHub Actions \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 C++, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e CMake.<\/p>\n<p><a href=\"https:\/\/github.com\/features\/actions\" rel=\"noopener noreferrer nofollow\">GitHub Actions<\/a> \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f GitHub \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 CI\/CD. \u0421\u0435\u0439\u0447\u0430\u0441 GitHub Actions \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b (runners)<\/a>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u0418\u043c\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 YAML<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Windows Server 2022<\/p>\n<\/td>\n<td>\n<p align=\"left\">windows-latest<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ubuntu 20.04<\/p>\n<\/td>\n<td>\n<p align=\"left\">ubuntu-latest \u0438\u043b\u0438 ubuntu-20.04<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ubuntu 18.04<\/p>\n<\/td>\n<td>\n<p align=\"left\">ubuntu-18.04<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">macOS Catalina 10.15<\/p>\n<\/td>\n<td>\n<p align=\"left\">macos-latest<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>2\u0445 \u044f\u0434\u0435\u0440\u043d\u043e\u0435 CPU<\/p>\n<\/li>\n<li>\n<p>7 \u0413\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>14 \u0413\u0431 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 SSD<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e <a href=\"https:\/\/docs.github.com\/en\/actions\/learn-github-actions\/usage-limits-billing-and-administration#usage-limits\" rel=\"noopener noreferrer nofollow\">6 \u0447\u0430\u0441\u043e\u0432<\/a>.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b GitHub Actions \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 C++, \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441:<\/p>\n<pre><code>.\/configure make make check make distcheck <\/code><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 CMake.<\/p>\n<h3>Hello World<\/h3>\n<p>\u042f \u0445\u043e\u0447\u0443 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 C++:<\/p>\n<pre><code>#include &lt;iostream>  int main() {   std::cout &lt;&lt; \"Hello world\\n\"; } <\/code><\/pre>\n<p>\u0421\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c CMake:<\/p>\n<pre><code>cmake_minimum_required(VERSION 3.16)  project(main)  add_executable(main main.cpp)  install(TARGETS main)  enable_testing() add_test(NAME main COMMAND main) <\/code><\/pre>\n<p><strong>TL;DR<\/strong> \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 <a href=\"https:\/\/github.com\/cristianadam\/HelloWorld\/\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<h3>Build Matrix<\/h3>\n<p>\u042f \u043d\u0430\u0447\u0430\u043b \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>name: CMake Build Matrix  on: [push]  jobs:   build:     name: ${\u200a{ matrix.config.name }\u200a}     runs-on: ${\u200a{ matrix.config.os }\u200a}     strategy:       fail-fast: false       matrix:         config:         - {             name: \"Windows Latest MSVC\", artifact: \"Windows-MSVC.tar.xz\",             os: windows-latest,             build_type: \"Release\", cc: \"cl\", cxx: \"cl\",             environment_script: \"C:\/Program Files (x86)\/Microsoft Visual Studio\/2019\/Enterprise\/VC\/Auxiliary\/Build\/vcvars64.bat\"           }         - {             name: \"Windows Latest MinGW\", artifact: \"Windows-MinGW.tar.xz\",             os: windows-latest,             build_type: \"Release\", cc: \"gcc\", cxx: \"g++\"           }         - {             name: \"Ubuntu Latest GCC\", artifact: \"Linux.tar.xz\",             os: ubuntu-latest,             build_type: \"Release\", cc: \"gcc\", cxx: \"g++\"           }         - {             name: \"macOS Latest Clang\", artifact: \"macOS.tar.xz\",             os: macos-latest,             build_type: \"Release\", cc: \"clang\", cxx: \"clang++\"           } <\/code><\/pre>\n<h3>\u0421\u0432\u0435\u0436\u0438\u0435 CMake \u0438 Ninja<\/h3>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/software-installed-on-github-hosted-runners\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u041f\u041e<\/a> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e CMake \u0435\u0441\u0442\u044c \u0432\u0435\u0437\u0434\u0435, \u043d\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f CMake<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Windows Server 2019<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.16.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ubuntu 18.04<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.12.4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">macOS Catalina 10.15<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.15.5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e CMake \u0434\u043e 3.12 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c CMake.<\/p>\n<p>CMake 3.16 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/command\/target_precompile_headers.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432<\/a> \u0438 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/prop_tgt\/UNITY_BUILD.html\" rel=\"noopener noreferrer nofollow\">Unity Builds<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 CMake \u0438 Ninja \u0435\u0441\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u0441 GitHub.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <a href=\"https:\/\/help.github.com\/en\/actions\/automating-your-workflow-with-github-actions\/workflow-syntax-for-github-actions#using-a-specific-shell\" rel=\"noopener noreferrer nofollow\">\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043c<\/a> \u044f\u0437\u044b\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 (bash \u0434\u043b\u044f Linux \u0438 powershell \u0434\u043b\u044f Windows). CMake \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u044b \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439.<\/p>\n<pre><code>- name: Download Ninja and CMake   id: cmake_and_ninja   shell: cmake -P {0}   run: |     set(ninja_version \"1.9.0\")     set(cmake_version \"3.16.2\")      message(STATUS \"Using host CMake version: ${CMAKE_VERSION}\")      if (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\")       set(ninja_suffix \"win.zip\")       set(cmake_suffix \"win64-x64.zip\")       set(cmake_dir \"cmake-${cmake_version}-win64-x64\/bin\")     elseif (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Linux\")       set(ninja_suffix \"linux.zip\")       set(cmake_suffix \"Linux-x86_64.tar.gz\")       set(cmake_dir \"cmake-${cmake_version}-Linux-x86_64\/bin\")     elseif (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"macOS\")       set(ninja_suffix \"mac.zip\")       set(cmake_suffix \"Darwin-x86_64.tar.gz\")       set(cmake_dir \"cmake-${cmake_version}-Darwin-x86_64\/CMake.app\/Contents\/bin\")     endif()      set(ninja_url \"https:\/\/github.com\/ninja-build\/ninja\/releases\/download\/v${ninja_version}\/ninja-${ninja_suffix}\")     file(DOWNLOAD \"${ninja_url}\" .\/ninja.zip SHOW_PROGRESS)     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf .\/ninja.zip)      set(cmake_url \"https:\/\/github.com\/Kitware\/CMake\/releases\/download\/v${cmake_version}\/cmake-${cmake_version}-${cmake_suffix}\")     file(DOWNLOAD \"${cmake_url}\" .\/cmake.zip SHOW_PROGRESS)     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf .\/cmake.zip)      # Save the path for other steps     file(TO_CMAKE_PATH \"$ENV{GITHUB_WORKSPACE}\/${cmake_dir}\" cmake_dir)     message(\"::set-output name=cmake_dir::${cmake_dir}\")      if (NOT \"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\")       execute_process(         COMMAND chmod +x ninja         COMMAND chmod +x ${cmake_dir}\/cmake       )     endif() <\/code><\/pre>\n<h3>\u0428\u0430\u0433 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c CMake \u0438 Ninja, \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>- name: Configure   shell: cmake -P {0}   run: |     set(ENV{CC} ${\u200a{ matrix.config.cc }\u200a})     set(ENV{CXX} ${\u200a{ matrix.config.cxx }\u200a})      if (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\" AND NOT \"x${\u200a{ matrix.config.environment_script }\u200a}\" STREQUAL \"x\")       execute_process(         COMMAND \"${\u200a{ matrix.config.environment_script }\u200a}\" &amp;&amp; set         OUTPUT_FILE environment_script_output.txt       )       file(STRINGS environment_script_output.txt output_lines)       foreach(line IN LISTS output_lines)         if (line MATCHES \"^([a-zA-Z0-9_-]+)=(.*)$\")           set(ENV{${CMAKE_MATCH_1}\u200a} \"${CMAKE_MATCH_2}\")         endif()       endforeach()     endif()      file(TO_CMAKE_PATH \"$ENV{GITHUB_WORKSPACE}\/ninja\" ninja_program)      execute_process(       COMMAND ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake         -S .         -B build         -D CMAKE_BUILD_TYPE=${\u200a{ matrix.config.build_type }\u200a}         -G Ninja         -D CMAKE_MAKE_PROGRAM=${ninja_program}       RESULT_VARIABLE result     )     if (NOT result EQUAL 0)       message(FATAL_ERROR \"Bad exit status\")     endif() <\/code><\/pre>\n<p>\u042f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>CC<\/code> \u0438 <code>CXX<\/code>, \u0430 \u0434\u043b\u044f MSVC \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 <code>vcvars64.bat<\/code>, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 CMake.<\/p>\n<h3>\u0428\u0430\u0433 \u0441\u0431\u043e\u0440\u043a\u0438<\/h3>\n<p>\u0428\u0430\u0433 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0437\u0430\u043f\u0443\u0441\u043a CMake \u0441  \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--build<\/code>:<\/p>\n<pre><code>- name: Build   shell: cmake -P {0}   run: |     set(ENV{NINJA_STATUS} \"[%f\/%t %o\/sec] \")      if (\"${\u200a{ runner.os }\u200a}\" STREQUAL \"Windows\" AND NOT \"x${\u200a{ matrix.config.environment_script }\u200a}\" STREQUAL \"x\")       file(STRINGS environment_script_output.txt output_lines)       foreach(line IN LISTS output_lines)         if (line MATCHES \"^([a-zA-Z0-9_-]+)=(.*)$\")           set(ENV{${CMAKE_MATCH_1}\u200a} \"${CMAKE_MATCH_2}\")         endif()       endforeach()     endif()      execute_process(       COMMAND ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake --build build       RESULT_VARIABLE result     )     if (NOT result EQUAL 0)       message(FATAL_ERROR \"Bad exit status\")     endif() <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>NINJA_STATUS<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 MSVC \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 <code>environment_script_output.txt<\/code>, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0448\u0430\u0433\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<h3>\u0428\u0430\u0433 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>ctest<\/code> \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0447\u0438\u0441\u043b\u0430 \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>-j<\/code>:<\/p>\n<pre><code>- name: Run tests   shell: cmake -P {0}   run: |     include(ProcessorCount)     ProcessorCount(N)      execute_process(       COMMAND ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/ctest -j ${N}       WORKING_DIRECTORY build       RESULT_VARIABLE result     )     if (NOT result EQUAL 0)       message(FATAL_ERROR \"Running tests failed!\")     endif() <\/code><\/pre>\n<h3>\u0428\u0430\u0433\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/h3>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0437\u0430\u043f\u0443\u0441\u043a CMake \u0441 <code>--install<\/code>, \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0437\u043e\u0432 CMake \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 <code>tar.xz<\/code> \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0430\u0440\u0445\u0438\u0432\u0430 \u043a\u0430\u043a \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code>- name: Install Strip   run: ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake --install build --prefix instdir --strip  - name: Pack   working-directory: instdir   run: ${\u200a{ steps.cmake_and_ninja.outputs.cmake_dir }\u200a}\/cmake -E tar cJfv ..\/${\u200a{ matrix.config.artifact }\u200a} .  - name: Upload   uses: actions\/upload-artifact@v1   with:     path: .\/${\u200a{ matrix.config.artifact }\u200a}     name: ${\u200a{ matrix.config.artifact }\u200a} <\/code><\/pre>\n<p>\u042f \u043d\u0435 \u0441\u0442\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CMake \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 CMake \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u043b\u0438\u0437\u043e\u0432<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0435 \u0440\u0435\u043b\u0438\u0437 \u0432 git, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u043b\u0438\u0441\u044c \u043a \u0440\u0435\u043b\u0438\u0437\u0443:<\/p>\n<pre><code>git tag -a v1.0.0 -m \"Release v1.0.0\" git push origin v1.0.0 <\/code><\/pre>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 git refpath \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>tags\/v<\/code>:<\/p>\n<pre><code>release:   if: contains(github.ref, 'tags\/v')   runs-on: ubuntu-latest   needs: build    steps:   - name: Create Release     id: create_release     uses: actions\/create-release@v1.0.0     env:       GITHUB_TOKEN: ${\u200a{ secrets.GITHUB_TOKEN }\u200a}     with:       tag_name: ${\u200a{ github.ref }\u200a}       release_name: Release ${\u200a{ github.ref }\u200a}       draft: false       prerelease: false    - name: Store Release url     run: |       echo \"${\u200a{ steps.create_release.outputs.upload_url }\u200a}\" > .\/upload_url    - uses: actions\/upload-artifact@v1     with:       path: .\/upload_url       name: upload_url  publish:   if: contains(github.ref, 'tags\/v')   name: ${\u200a{ matrix.config.name }\u200a}   runs-on: ${\u200a{ matrix.config.os }\u200a}   strategy:     fail-fast: false     matrix:       config:       - {           name: \"Windows Latest MSVC\", artifact: \"Windows-MSVC.tar.xz\",           os: ubuntu-latest         }       - {           name: \"Windows Latest MinGW\", artifact: \"Windows-MinGW.tar.xz\",           os: ubuntu-latest         }       - {           name: \"Ubuntu Latest GCC\", artifact: \"Linux.tar.xz\",           os: ubuntu-latest         }       - {           name: \"macOS<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-337022","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=337022"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337022\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}