Introducing GitHub Actions
As we all know, continuous integration consists of many operations, such as scraping code, running tests, logging into remote servers, publishing to third-party services, and so on. GitHub calls these actions actions. Github Action is a continuous integration (CI) service launched by GitHub, which provides a well-configured virtual server environment based on which it can build, test, package, and deploy projects. A platform that allows developers to automate custom workflow logic and integrates continuous integration and delivery (CI/CD) capabilities that allow developers to automate a range of workflows.
GitHub ActionsEach job is provided with a virtual machine to execute, each virtual machine has the same hardware resources:
2-core CPU, 7 GB RAM, 14 GB SSD hard disk space, the total hard drive capacity is about 90G, and the free space is about 30G.
Each warehouse can only support 20 workflows in parallel at the same time. You can make 1000 calls to the GitHub API per hour. Each job can be executed for up to 6 hours. The free version supports up to 20 concurrent job executions, while macOS only supports up to 5 jobs. Private warehouses have a cumulative monthly usage time of 2000 minutes, after $0.008/minute, and public warehouses have no limit. In terms of operating systems, you can choose from Windows server, Linux, macOS, and a large number of software packages and tools are pre-installed.
Official introduction to GitHub-hosted runners:The hyperlink login is visible.
OpenWrt Introduction
At the end of 2002, Linksys launched a router called WRT-54G, which was very popular, but WRT-54G uses the Linux operating system, and the software core is developed under the GPL license, which needs to follow open source standards. Linksys opened the source code in 2003, and in January 2004, the first open-source routing system based on Linksys source code named OpenWRT appeared. In addition, the subsequent LEDE is a fork of OpenWRT that emerged in 2016, and openwrt and LEDE merged into one in January 2018.
Official website address:The hyperlink login is visible.
Lienol, Lean, ImmortalWrt project presentation
All three projects are open source projects that have been modified and customized based on the official OpenWrt project. Ported more packages, support for more devices, better performance, and special optimizations for users in Chinese mainland.
Lienol Address:The hyperlink login is visible.
Lean Address:The hyperlink login is visible.
ImmortalWrt Address:The hyperlink login is visible.
Compile the OpenWrt firmware
Now that we've got the general introduction, let's start teaching you how to use GitHub Actions to compile OpenWRT firmware, and why use GitHub Actions to compile firmware?
1. No need for your own physical resources, directly use the server provided by GitHub 2. Since some resources are inaccessible domestically, they will fail to compile, so using GitHub servers may not be troubled
First, you need to have a GitHub account.Fork AutoBuild-OpenWrt project by the author of "esirplayground", because he has already written the script for Actions in the project.
Address:The hyperlink login is visible., as shown in the figure below:
In this way, we are equivalent to creating an AutoBuild-OpenWrt project ourselves, the actions function is not turned on by default, we need to turn it on, click "I understand my workflows, go ahead and enable themAs shown below:
Workflows aren’t being run on this forked repository Because this repository contained workflow files when it was forked, we have disabled them from running on this fork. Make sure you understand the configured workflows and their expected usage before enabling Actions on this repository.
I understand my workflows, go ahead and enable them
Then edit/.github/workflows/Build_OP_x86_64.ymlThe file is as shown below:
Uncomment the push-related comment, and then submit the code, as shown in the image below:
Look at the Actions page and select Build_x86_64 Workflow, and you can see that the compilation work has already begun, as shown in the following figure:
After about 3 hours of execution, the build finally succeeded, as shown below:
You can click OpenWrt under Artifacts to download the compressed package, and after downloading, the contents of the compressed package are as shown below:
Finally, attach the firmware download address built on ImmortalWrt:The hyperlink login is visible.
(End)
|