Skip to content

Releases: lbrugnara/sbs

Version 0.1.2

07 Aug 01:25
Compare
Choose a tag to compare

Notes

This release includes all the supported combinations of platforms, toolchains and configurations. To report a bug the --version or -v flag can be used to retrieve the binary information:

$ ./sbs -v
sbs build system (0.1.2)


    Build information:
       - Host OS: linux
       - Host architecture: x86_64
       - Target OS: linux
       - Target architecture: x86_64
       - Toolchain:
           - Compiler: clang
           - Linker: clang
       - Configuration: clang-debug

Changes

General

  • Keep track of target's commands to properly invalidate the build when something changes
  • Added the --working-dir or -cwd flag that allows changing the program's working directory. Example:
    • ./sbs -cwd=../some/other/project build debug
  • Detection of the host OS and architecture that is used to select the combination of environment, toolchain, and config (so-called "triplets" in sbs jargon)
  • Added a scripting mode: a dry-run of a build command for unsupported triplets in the host machine. This allows to generate build scripts to bootstrap sbs

Improvements in the language to support scripting capabilities:

  • Added some basic types:
    • Arrays: [ $sbs.win, $sbs.linux ]
    • Strings: "hello world"
  • Added relational operators:
    • ==: $sbs.host.os == $sbs.linux
    • !=: $sbs.host.os != $sbs.linux
    • in <array>: $sbs.host.arch in [ "x86", "x86_64" ]
  • Added logical operators:
    • and: $sbs.host.os == $sbs.win and $sbs.host.arch == $sbs.x86
    • or: $sbs.host.os == $sbs.win or $sbs.os == $sbs.win
    • not: not($sbs.host.os == $sbs.win)
  • Conditional expressions using if-else statements and the ternary operator. Examples:
    • if-else: if $sbs.host.os == $sbs.linux { ... } else if $sbs.host.os == $sbs.win { ... } else { ... }
    • Ternary operator: env example { arch: $env.Platform == "x64" ? "x86_64" : ($env.Platform == "x86" ? "x86" : "unk" ) }
  • Added support for string variable declaration (top-level declaration):
    • $var_name = "hello world!"
  • Added built-in variables:
    • sbs.bin: Path to the sbs binary (argv[0])
    • sbs.host.os: The OS of the host machine
    • sbs.host.arch: The architecture of the host machine
    • sbs.preset: The preset name (if preset)
    • sbs.env: The environment name
      • sbs.os: The environment OS property (you can use an environment with an $sbs.linux OS on a $sbs.win host machine: WSL)
      • sbs.arch: The environment architecture property (for cross-compilation)
      • sbs.shell: The type of shell that the environment uses to run the commands
    • sbs.toolchain: The toolchain name
      • sbs.compiler: The toolchain's compiler binary
      • sbs.archiver: The toolchain's archiver binary
      • sbs.linker: The toolchain's linker binary
    • sbs.config: The configuration name
    • sbs.target: The name of the invoked target
      • sbs.input_file: Takes the value of each input source the target needs in order to run (specific to each target type)
      • sbs.output_file: The value of the target's output file
    • sbs.win: A constant-like variable that represents the family of the Windows operating system
    • sbs.linux: A constant-like variable that represents the family of Linux operating systems
    • sbs.x86: A constant-like variable that identifies the x86 architecture
    • sbs.x86_64: A constant-like variable that identifies the x86_64 architecture
  • Added the special pseudo-varible env.<name> that retrieves values from the environment. Example:
    • $env.PATH
    • $env.PWD
  • Added string interpolation support for variables. Examples:
    • In properties: env example { arch: "${env.Platform}" } is similar to env example { arch: $env.Platform }
    • In actions: env example { actions: { before: [ `echo ${sbs.host.os}` ] }}

Environments:

  • Added the for clause
  • Now the arch property is tied to the environment instead of the host machine

Presets:

  • Added the envs, toolchains, and configs properties that accepts multiple values (arrays) that can be combined to form the "triplets"
  • Added the targets property to run more than one target on the same build command

Checksums

The checksums.sha512 file contains the checksums for all the files in this release:

5a7515510c0751f245be340a94e2767054d510431ba4d9439b8dbc1590513806587472506388e8c078c3831ec4bdffc727d00a1183be4ded0f297cb48cf3cb44  sbs.debug.win-x86.clang.zip
2656ee2a0f018d44ceb5154d39695b5d222acb22176aa8423b96ba66aad1bcffdd455fd5e09034c4f8b74c132724047b90c9bdadb7590d6fb8f7b852052171cd  sbs.release.win-x86.clang.zip
f3d7544325e16fb959b8ebde700f6d054902887cbd673521fe1130e08fa159b996de925174a03c0c2990ddcf2c1f508c36da05511d9ba8c733776e8a86e6b073  sbs.debug.win-x86_64.clang.zip
a38be391aac539cddb3c12c8617efc97ec3ffd37c4f1904b864db9e1b60d2ace5e4f9ec024d47d33bb781c0247c35a9e2f6858ee749b815fa22a152a02bf811b  sbs.release.win-x86_64.clang.zip
1b20f19cc8ad9437ab4a89a9ae478a975a37275c7282a4daf7cf990ff72518af2b0a58580282f853a9702ad6a299c31fe3eebaa5eb05d001c1f0147255c8bcfb  sbs.debug.win-x86.msvc.zip
6735eabf88d58730333b7d999451fa181ce8e462a6d1fd26e98e414bbbf4c17afb8d050ef00a15d38538df785f935ad0ef5536303dae78056b516f790c6d2b0e  sbs.release.win-x86.msvc.zip
3c2f47f4498e81957c4c7fadc6c4bc9d7bc17c7fa469daf13f3acb5468affb17751f9c476a60f35e00d610efcaddecb05d2e04185d28d82cb3bd37e3b250a78b  sbs.debug.win-x86_64.msvc.zip
a0853bb9d5066aa5819b2ec1c7024bb6e67498b65dd6c6558b1ebba5a33f57a25ee6d0f0ecd79e90c298138aa449fab37aba4d81bdee2c274e94f296122b6e67  sbs.release.win-x86_64.msvc.zip
81624c934c7ea6c6c57a039ab58482147378f60494eaaec0137175384efbb93282838d7a8382c3377e14e44803812ea1e5f89b1029dc1114560bf93e02cc4cb1  sbs.debug.linux-x86.clang.tar.gz
be484fa5a937aa13e6d5910ba47cad7dc11364ff825d925e8020b20a5e3e9ba07e8895d9d595a971c98e47a9b6df15784c56125a6f8352d6c4bca3ebf4272350  sbs.release.linux-x86.clang.tar.gz
63d467ac0368fe34fbe6e090120613540378fba455cd65846a0cd2d5069ad7edba0197a260b13423f3b6aa5bebb71ffa3da611a23b25da986a09e7d1e5c8a620  sbs.debug.linux-x86_64.clang.tar.gz
1b89e181d26e5fbf8b20a0ece99daaef1ec267eded7aa770193586656310941fd669e9c922020e5f15c2b97ca136f51ab6154ac843a23e079be443b489459ccb  sbs.release.linux-x86_64.clang.tar.gz
89f13dcc5848f8d9bcd2eb2760ca41a6c55f84a2e85c0b33f354150b96ccb5bf83d4e4d7aaecf6a7aa4dfcfebc6f1057ab43ee86a20fb87bdeabe8db7e62aed0  sbs.debug.linux-x86.gcc.tar.gz
5ad77f33ef064b4644f3fc40356d242ed54b28a22ef8a29d941e093e4bf36a19c523349d7eb9eecaf88dd42d84a793951b20dda63d2d9beef2e2a619d5e95133  sbs.release.linux-x86.gcc.tar.gz
bc926b1b54c7eb5561c868c581ce0883668842610bf875d8e75cbae82305ff5d818523ef7740dc60a9eb8ad169599a30bf5d46e4578cd270c453b07ae09aed04  sbs.debug.linux-x86_64.gcc.tar.gz
d443f1e3f4dcf1b57b86139dadc4a5b3a18fda334c7d7f2e9af6b4bccf349cd46428fd903713f4b8ba56b5c56c47a4c61f3f58fa266f00272decd4d89636448b  sbs.release.linux-x86_64.gcc.tar.gz

v0.1.0

04 Mar 22:52
Compare
Choose a tag to compare
Add README