.github/workflows
时间: 2024-05-09 08:13:20 浏览: 14
GitHub Workflows 是 GitHub 提供的一种 CI/CD 工具,可以自动化构建、测试和部署你的代码。它基于 GitHub Actions 平台,可以使用 YAML 文件来定义一系列的任务和操作,比如编译代码、运行测试、打包部署等等。GitHub Workflows 可以帮助你自动化你的开发流程,提高生产力和代码质量。
一些常用的功能包括:
- 触发条件:可以设置定时触发、提交代码触发、PR 合并触发等等。
- Job:一个 Workflow 可以包含多个 Job,每个 Job 可以运行一组任务。
- Action:Job 中的每个任务称为一个 Action,可以使用现有的 Action 或自己编写。
- 缓存:可以缓存依赖包或者编译结果,提高构建速度。
- 环境变量:可以设置环境变量来传递参数或者密钥。
相关问题
github .github/workflows如何创建
要创建 GitHub Actions workflow,您需要在您的代码仓库中创建一个 `.github/workflows` 目录,然后在该目录下创建一个 YAML 文件。您可以使用 GitHub 提供的模板,也可以自己编写。下面是一个简单的 workflow YAML 文件示例:
```yaml
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run a one-line script
run: echo Hello, world!
```
这个 workflow 的名称是 `CI`,当有代码提交(push)时触发。它只有一个 job `build`,运行在 `ubuntu-latest` 上。该 job 包含两个步骤:`actions/checkout` 和一个简单的 shell 命令,输出 `Hello, world!`。
您可以通过以下步骤创建一个新的 workflow 文件:
1. 打开您的代码仓库。
2. 创建一个 `.github/workflows` 目录。
3. 在该目录下创建一个新的 YAML 文件,例如 `ci.yml`。
4. 编辑该文件并添加您的 workflow 配置。
5. 提交并推送更改。
这样您的 workflow 就会在您的代码仓库中启动。更多关于 GitHub Actions workflow 的信息,请参阅官方文档:[GitHub Actions 文档](https://docs.github.com/cn/actions)。
![libplctag CI](https://github.com/libplctag/libplctag/workflows/libplctag%20CI/badge.svg?branch=release) **libplctag** is an open source C library for Linux, Windows and macOS using **EtherNet/IP** or **Modbus TCP** to read and write tags in PLCs. The library has been in production since early 2012 and is used by multiple organizations for many tasks including controlling radio telescopes, large and precision manufacturing, controlling fitness equipment, food handling and many, many more. Current Stable Version: 2.5 Old Stable Version: 2.4 ## WARNING - DISCLAIMER Note: **PLCs control many kinds of equipment and loss of property, production or even life can happen if mistakes in programming or access are made. Always use caution when accessing or programming PLCs!** We make no claims or warrants about the suitability of this code for any purpose. Be careful! ## Get It Do you know what you want already? Download it from the [releases page](https://github.com/libplctag/libplctag/releases)! ## Features ### High Level Features - EtherNet/IP and Modbus TCP support. - Open source licensing under the MPL 2.0 or LGPL 2+. - Pure C library for portability across Linux, Windows and macOS as well as 32-bit and 64-bit. - Support for x86, ARM and MIPS, and probably others. - Very stable API with almost no changes other than feature additions since 2012. - Low memory use and very high performance and capacity. Uses protocol-specific features to increase performance. - Simple API with minimal use of language-specific data to enable easy wrapping in other languages. - Extensive example programs showing use of all library features. - Wrappers for higher level languages like C#/.Net, Julia etc. - Free! ### Detailed Features
libplctag是一个开源的C库,用于在Linux、Windows和macOS上使用EtherNet/IP或Modbus TCP读写PLC中的标签。该库自2012年初以来一直在生产中,并被多个组织用于控制射电望远镜、大型精密制造、健身设备控制、食品处理等众多任务。
当前稳定版本:2.5
旧稳定版本:2.4
## 警告 - 免责声明
注意:PLC控制着许多类型的设备,如果在编程或访问中出现错误,可能会导致财产损失、生产损失甚至生命危险。在访问或编程PLC时务必小心谨慎!
我们对这段代码的适用性不作任何声明或保证。
请谨慎操作!
## 获取
您已经知道您需要什么吗?从[发布页面](https://github.com/libplctag/libplctag/releases)下载吧!
## 特点
### 高级特点
- 支持EtherNet/IP和Modbus TCP。
- 使用MPL 2.0或LGPL 2+开源许可证。
- 纯C库,可在Linux、Windows和macOS以及32位和64位上进行移植。
- 支持x86、ARM和MIPS,可能还支持其他架构。
- 非常稳定的API,自2012年以来几乎没有进行除了功能添加之外的更改。
- 低内存使用,非常高的性能和容量。使用协议特定的功能来提高性能。
- 简单的API,最小化使用特定语言的数据,以便轻松包装到其他语言中。
- 大量示例程序展示所有库功能的使用。
- 针对C#/.Net、Julia等高级语言的包装器。
- 免费!