Skip to content

Commit 09041e3

Browse files
authored
docs: update github actions runner and docker image related information in README.md (#16)
1 parent ef36fd7 commit 09041e3

File tree

2 files changed

+63
-68
lines changed

2 files changed

+63
-68
lines changed

README.md

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,38 @@ Node repackaging(wrapping) of the `clang-format` native binary inspired by ['ang
1010

1111
This package intends to release a new npm package for every **latest** release of the `clang-format`. It **checks** for the latest LLVM release every week, builds `clang-format` using its own pipeline, and makes a **pull request**. All processes are run automatically. If you are interested in build process, take a look at [`.github/workflows/llvm-build-bump-pr.yml`](/.github/workflows/llvm-build-bump-pr.yml)
1212

13+
> [!IMPORTANT]
14+
>
15+
> Please participate in the issue regarding the introduction of a **glob pattern**. Click [here](https://github.com/lumirlumir/npm-clang-format-node/issues/14).
16+
1317
## Why I started this project
1418

1519
['angular/clang-format'](https://github.com/angular/clang-format) is no longer maintained. (See [#79](https://github.com/angular/clang-format/issues/79) [#82](https://github.com/angular/clang-format/issues/82) [#83](https://github.com/angular/clang-format/pull/83)) Nevertheless, new versions of `clang-format` continue to be released. Bugs are fixed, and new features are added. However, using `clang-format` directly in a Node.js environment without any support can be somewhat cumbersome. So I decided to make a **new**, **maintained** one.
1620

1721
Note that some feautures from 'angular/clang-format' are not included in this package. Specifically `check-clang-format` and `git-clang-format` are not used. There are a few reasons for this. Both commands **rely on Python**, so if you haven't installed Python, they cannot be executed. Many people would prefer if this package worked without dependencies beyond Node.js. **So, this package relies only on Node.js.** See the [Migration](#migration-from-angularclang-format) for alternative methods to `check-clang-format` and `git-clang-format`.
1822

19-
## Supported OS platforms and architectures
23+
## Supported
24+
25+
### OS Platforms and Architectures
2026

2127
It supports **ALL** [**Tier1**](https://github.com/nodejs/node/blob/main/BUILDING.md#strategy) and some [**Tier2**](https://github.com/nodejs/node/blob/main/BUILDING.md#strategy) platforms of Node.js. *Note that the functionality cannot be guaranteed on platforms which is not mentioned below*.
2228

2329
(To see the full list of platforms supported by Node.js, click [here](<https://github.com/nodejs/node/blob/main/BUILDING.md#platform-list>).)
2430

25-
<br> | Operating System | Architectures | Versions | Support Type |
26-
---- | ---------------- | ---------------- | --------------------------------- | ------------ |
27-
1 | macOS | arm64 | >= 11.0 | Tier 1 |
28-
2 | macOS | x64 | >= 11.0 | Tier 1 |
29-
3 | GNU/Linux | armv7 | kernel >= 4.18, glibc >= 2.28 | Tier 1 |
30-
4 | GNU/Linux | arm64 | kernel >= 4.18, glibc >= 2.28 | Tier 1 |
31-
5 | GNU/Linux | ppc64le >=power8 | kernel >= 4.18, glibc >= 2.28 | Tier 2 |
32-
6 | GNU/Linux | s390x | kernel >= 4.18, glibc >= 2.28 | Tier 2 |
33-
7 | GNU/Linux | x64 | kernel >= 4.18, glibc >= 2.28 | Tier 1 |
34-
8 | Windows | x64 | >= Windows 10/Server 2016 | Tier 1 |
31+
<br> | Operating System | Architectures | Support Type |
32+
---- | ---------------- | ---------------- | ------------ |
33+
1 | macOS | arm64 | Tier 1 |
34+
2 | macOS | x64 | Tier 1 |
35+
3 | GNU/Linux | armv7 | Tier 1 |
36+
4 | GNU/Linux | arm64 | Tier 1 |
37+
5 | GNU/Linux | ppc64le >=power8 | Tier 2 |
38+
6 | GNU/Linux | s390x | Tier 2 |
39+
7 | GNU/Linux | x64 | Tier 1 |
40+
8 | Windows | x64 | Tier 1 |
3541

3642
> [!TIP]
3743
>
38-
> 1. If your platform isn't yet supported, you can build the `clang-format` native binary from the latest upstream clang sources. Refer to [`docs/llvm-build-linux.sh`](/docs/llvm-build-linux.sh) and [`docs/llvm-build-linux-x64.yml`](/docs/llvm-build-linux-x64.yml) for the Linux build scripts for **Shell** and **GitHub Actions**, respectively.
44+
> 1. If your platform isn't yet supported, you can build the `clang-format` native binary from the latest upstream clang sources. Refer to [`docs/llvm-build-linux.sh`](/docs/llvm-build-linux.sh) and [`.github/workflows/llvm-build-bump-pr.yml`](/.github/workflows/llvm-build-bump-pr.yml) for the build scripts for **Linux Shell** and **GitHub Actions**, respectively.
3945
>
4046
> 1. Or you can download `clang-format` native binary from [LLVM release assets](https://github.com/llvm/llvm-project/releases) that match your operating system platform and architecture like the lists below.
4147
>
@@ -45,6 +51,47 @@ It supports **ALL** [**Tier1**](https://github.com/nodejs/node/blob/main/BUILDIN
4551
> - `clang+llvm-18.1.7-x86_64-pc-windows-msvc.tar.xz`
4652
> - `and more...`
4753
54+
### [GitHub Actions Runner Images](https://github.com/actions/runner-images?tab=readme-ov-file#available-images)
55+
56+
If you want to use `clang-format-node` in continuous integration (CI), You can use **GitHub Actions**. The following basic runner images are compatible(available) with `clang-format-node`.
57+
58+
Image | YAML Label | Included Software |
59+
---------------------------- | ---------------------------------------------------------------------- | ----------------- |
60+
macOS 14 | `macos-latest-large` or `macos-14-large` | [macOS-14] |
61+
macOS 14 Arm64 | `macos-latest`, `macos-14`, `macos-latest-xlarge` or `macos-14-xlarge` | [macOS-14-arm64] |
62+
macOS 13 | `macos-13` or `macos-13-large` | [macOS-13] |
63+
macOS 13 Arm64 | `macos-13-xlarge` | [macOS-13-arm64] |
64+
macOS 12 | `macos-12` or `macos-12-large` | [macOS-12] |
65+
Ubuntu 24.04 <sup>beta</sup> | `ubuntu-24.04` | [ubuntu-24.04] |
66+
Ubuntu 22.04 | `ubuntu-latest` or `ubuntu-22.04` | [ubuntu-22.04] |
67+
Windows Server 2022 | `windows-latest` or `windows-2022` | [windows-2022] |
68+
69+
However, the following basic runner images are **NOT** compatible(available) with `clang-format-node`. It's because the ***dependencies*** for LLVM's latest release version are not compatible with the following images.
70+
71+
Image | YAML Label | Included Software |
72+
----------------------- | -------------- | ----------------- |
73+
~~Ubuntu 20.04~~ | `ubuntu-20.04` | [ubuntu-20.04] |
74+
~~Windows Server 2019~~ | `windows-2019` | [windows-2019] |
75+
76+
### Docker(Build) Images
77+
78+
I used the following Images to build `clang-format` excuatable binaries.
79+
80+
> [!TIP]
81+
>
82+
> If you want to see which software is included in **GitHub Actions runner**, click [here](https://github.com/actions/runner-images?tab=readme-ov-file#available-images) and refer to the 'Included Software' column.
83+
84+
binary folder name | Build(Docker) Image |
85+
------------------ | ------------------------------------------------------------------ |
86+
`darwin-arm64` | GitHub Actions runner `macos-14` |
87+
`darwin-x64` | GitHub Actions runner `macos-12` |
88+
`linux-arm` | [`arm32v7/ubuntu:22.04`](https://hub.docker.com/r/arm32v7/ubuntu/) |
89+
`linux-arm64` | [`arm64v8/ubuntu:22.04`](https://hub.docker.com/r/arm64v8/ubuntu/) |
90+
`linux-ppc64` | [`ppc64le/ubuntu:22.04`](https://hub.docker.com/r/ppc64le/ubuntu/) |
91+
`linux-s390x` | [`s390x/ubuntu:22.04`](https://hub.docker.com/r/s390x/ubuntu/) |
92+
`linux-x64` | GitHub Actions runner `ubuntu-22.04` |
93+
`win32-x64` | GitHub Actions runner `windows-2022` |
94+
4895
## Installation
4996

5097
### global
@@ -321,7 +368,7 @@ I recommend you to read the guides on [LLVM and clang-format mentioned in issues
321368
322369
The return value is equivalent to `process.platform`.
323370
324-
OS | return value of `os.platform()` |
371+
OS | return value of `os.platform()` |
325372
------- | ---------------------------------- |
326373
macOS | `darwin` |
327374
Linux | `linux` |
@@ -331,7 +378,7 @@ Windows | `win32` |
331378
332379
The return value is equivalent to `process.arch`.
333380
334-
Architecture | return value of `os.arch()` | LLVM | Docker Platform | Docker Ubuntu Image |
381+
Architecture | return value of `os.arch()` | LLVM | Docker Platform | Docker Ubuntu Image |
335382
------------------ | ------------------------------ | --------- | --------------- | ------------------- |
336383
arm(armv7, armv7l) | `arm` | `ARM` | `arm/v7` | `arm32v7` |
337384
arm64 | `arm64` | `AArch64` | `arm64/v8` | `arm64v8` |
@@ -343,9 +390,9 @@ x64 | `x64` | `X86` | `amd64`
343390
344391
### Build process
345392
346-
Some packages for **cross-compilation** have been deprecated, making it difficult to make build processes directly, so **cross-compilation** is not used.
393+
Some packages for **cross-compilation** have been deprecated, making it difficult to make build processes directly, so **cross-compilation** is not used. Instead, I utilize **QEMU** and **Docker** to build cross-compiled binaries.
347394
348-
**Linux** is built using QEMU and Docker. **macOS** and **Windows** are built using the `macos-13`, `macos-14`, and `windows-latest` runners on GitHub Actions.
395+
If you want to learn more about the images I used, see [Docker(Build) Images](#dockerbuild-images)
349396
350397
## Versioning
351398

docs/llvm-build-linux-x64.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)