aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Le Molgat <corentinl@google.com>2023-08-30 08:44:40 +0200
committerMizux <mizux.dev@gmail.com>2023-08-30 13:19:47 +0200
commit60aa4e343a51de62337de30b5a61ebc4f51f9641 (patch)
tree8ef762963fb3823fab0b975f6fe6794bcb20d366
parentc57960579b4e9341965d5e9f0a3e7c33c3d7b1b7 (diff)
downloadcpu_features-60aa4e343a51de62337de30b5a61ebc4f51f9641.tar.gz
Update badges generator.
-rw-r--r--README.md4
-rw-r--r--scripts/generate_badges.d5
2 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index f31b085..69df0b5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ instructions) at runtime.
| Os | amd64 | AArch64 | ARM | MIPS | POWER | RISCV | LOONGARCH | s390x |
| :-- | --: | --: | --: | --: | --: | --: | --: | --: |
-| Linux | [![][i1a0]][l1a0]<br/>[![][i1a1]][l1a1] | [![][i1b0]][l1b0]<br/>![][d1] | [![][i1c0]][l1c0]<br/>![][d1] | [![][i1d0]][l1d0]<br/>![][d1] | [![][i1e0]][l1e0]<br/>![][d1] | [![][i1f0]][l1f0]<br/>![][d1] | [![][i1g0]][l1g0]<br/>![][d1] | [![][i1h0]][l1h0]<br/>![][d1] |
+| Linux | [![][i1a0]][l1a0]<br/>[![][i1a1]][l1a1] | [![][i1b0]][l1b0]<br/>[![][i1b1]][l1b1] | [![][i1c0]][l1c0]<br/>![][d1] | [![][i1d0]][l1d0]<br/>![][d1] | [![][i1e0]][l1e0]<br/>![][d1] | [![][i1f0]][l1f0]<br/>![][d1] | [![][i1g0]][l1g0]<br/>![][d1] | [![][i1h0]][l1h0]<br/>![][d1] |
| FreeBSD | [![][i2a0]][l2a0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
| MacOS | [![][i3a0]][l3a0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
| Windows | [![][i4a0]][l4a0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
@@ -19,6 +19,7 @@ instructions) at runtime.
[i1a0]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/amd64_linux_cmake.yml?branch=main&label=CMake
[i1a1]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/amd64_linux_bazel.yml?branch=main&label=Bazel
[i1b0]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/aarch64_linux_cmake.yml?branch=main&label=CMake
+[i1b1]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/aarch64_linux_bazel.yml?branch=main&label=Bazel
[i1c0]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/arm_linux_cmake.yml?branch=main&label=CMake
[i1d0]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/mips_linux_cmake.yml?branch=main&label=CMake
[i1e0]: https://img.shields.io/github/actions/workflow/status/google/cpu_features/power_linux_cmake.yml?branch=main&label=CMake
@@ -31,6 +32,7 @@ instructions) at runtime.
[l1a0]: https://github.com/google/cpu_features/actions/workflows/amd64_linux_cmake.yml
[l1a1]: https://github.com/google/cpu_features/actions/workflows/amd64_linux_bazel.yml
[l1b0]: https://github.com/google/cpu_features/actions/workflows/aarch64_linux_cmake.yml
+[l1b1]: https://github.com/google/cpu_features/actions/workflows/aarch64_linux_bazel.yml
[l1c0]: https://github.com/google/cpu_features/actions/workflows/arm_linux_cmake.yml
[l1d0]: https://github.com/google/cpu_features/actions/workflows/mips_linux_cmake.yml
[l1e0]: https://github.com/google/cpu_features/actions/workflows/power_linux_cmake.yml
diff --git a/scripts/generate_badges.d b/scripts/generate_badges.d
index eef00ef..8524737 100644
--- a/scripts/generate_badges.d
+++ b/scripts/generate_badges.d
@@ -1,3 +1,6 @@
+// usage:
+// 1. copy paste the whole code to https://run.dlang.io/ then click `run`
+// 2. `docker run --rm -it -v $(pwd):/src dlanguage/dmd dmd -run generate_badges.d`
import std.algorithm : each, map, cartesianProduct, filter, joiner, sort, uniq;
import std.array : array;
import std.conv : to;
@@ -67,7 +70,7 @@ const:
case BuildSystem.CMake:
return os == Os.Linux || cpu == Cpu.amd64;
case BuildSystem.Bazel:
- return os == Os.Linux && cpu == Cpu.amd64;
+ return os == Os.Linux && (cpu == Cpu.amd64 || cpu == Cpu.AArch64);
}
}