What is a build in a scripting language?

Asked 2 years ago, Updated 2 years ago, 413 views

What exactly does a build do in a scripting language like Ruby?
The builds here are meant to be built into the CI/CD pipeline.

Also, I understand that building in compilation languages like Java and Golang is to generate executable files from source code.

build

2022-11-17 07:23

2 Answers

I think it depends on how you think about the part where [build] appears on the CI/CD.

The CI description in the GitHub document is followed by an example of how to write CI in each language, so we will look at it with reference.
https://docs.github.com/ja/actions/automating-builds-and-tests/about-continuous-integration

The names of each step clearly indicate "Build" as Go, Java, .NET, Swift, and Xamarin app, which are actually compiled as "Build".Conversely, the usual examples of Node.js, PowerShell, Python, and Ruby do not show "Build" in the name.However, in some examples, the characters "build" can be seen in comments and execution commands.

  • Run if "npm run build" exists in Node.js.This seems to be intended for transfiling AltJS.
  • In the example of creating a package with Python and Ruby, you can see the letters "build" in comments and commands.

In other words, there is no "build" course in a script language that does not require compilation for normal execution.However, AltJS's transpile and final product package creation can be called "build."

Now, what we've done so far is a process commonly called "build."Rather than "build" for the ○○ language, it's just a collective term for "compile", "transpile", "package generation", and "installer generation".Then, I think the CI/CD build is something else.

"If it is my own interpretation, I think it is all the processes before the ""test""."In Github's example, all necessary steps before the last test step are considered to be "build".There are many differences between languages and apps, but most of them are as follows:

  • Checking out source code
  • Set up your language environment (compiler or interprinter)
  • Set up required services such as DB
  • Installing a library or package that depends (may be an OS package or a package in that language)
  • Compilation and Transpile
  • Packaging and installer generation
  • Application initialization process

Anyway, isn't it okay to call everything you need "build" before you do "test" or "deploy"?If you only say "build" for compilation, you wonder where the rest of the "build" → "test" → "deployment" framework goes.

In fact, the steps themselves don't seem to be so clearly divided.If you look at GitHub's Java example, it seems that compilation and testing are done together with ant and gradle.Even though CI/CD is a "build" → "test" → "deployment", it is better to flexibly understand that it is a series of such elements rather than a strictly divided step.


2022-11-17 09:16

At a minimum, the expression "build script" is used by individuals in situations such as creating configure from configure.ac or CMakeLists.txt to Makefile.If you write a script yourself, you don't call it "build."

Integrated into CI/CD Pipeline

Isn't that deployment?Or is it about something like Jenkins? It's hard to figure out the details or intentions.


2022-11-17 20:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.