Skip to content

Commit 382ae4c

Browse files
committed
Add nuget, vcpkg, conan, homebrew, swift, kotlin, maven ecosystems and CI workflows
1 parent 674ce06 commit 382ae4c

File tree

17 files changed

+603
-48
lines changed

17 files changed

+603
-48
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: github-actions
10+
directory: /
11+
schedule:
12+
interval: weekly
13+
open-pull-requests-limit: 5

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions: {}
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
go-version: ['1.25']
17+
18+
steps:
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20+
with:
21+
persist-credentials: false
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
25+
with:
26+
go-version: ${{ matrix.go-version }}
27+
28+
- name: Build
29+
run: go build -v ./...
30+
31+
- name: Test
32+
run: go test -v -race ./...
33+
34+
lint:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
38+
with:
39+
persist-credentials: false
40+
41+
- name: Set up Go
42+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
43+
with:
44+
go-version: '1.25'
45+
46+
- name: golangci-lint
47+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
48+
with:
49+
version: latest

.github/workflows/zizmor.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/**'
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- '.github/workflows/**'
14+
workflow_dispatch:
15+
16+
jobs:
17+
zizmor:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
security-events: write
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
persist-credentials: false
27+
28+
- name: Run zizmor
29+
uses: zizmorcore/zizmor-action@135698455da5c3b3e55f73f4419e481ab68cdd95 # v0.4.1

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ s, _ = platforms.Normalize(platforms.Python, "linux_x86_64")
3535
| `python` | `manylinux_2_17_x86_64` | `tag_version_arch` |
3636
| `debian` | `x86_64-linux-gnu` | `arch-os-abi` |
3737
| `llvm` | `aarch64-apple-darwin` | `arch-vendor-os` |
38+
| `nuget` | `linux-x64` | `os-arch` |
39+
| `vcpkg` | `x64-linux` | `arch-os` |
40+
| `conan` | `Linux/armv8` | `os/arch` (settings) |
41+
| `homebrew` | `arm64_sonoma` | `arch_codename` |
42+
| `swift` | `aarch64-apple-darwin` | LLVM triples |
43+
| `kotlin` | `linuxX64` | `osArch` (camelCase) |
44+
| `maven` | `linux-aarch_64` | `os-arch` |
3845

3946
## How it works
4047

SPEC.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OS names use lowercase kernel names:
3232

3333
## Ecosystems
3434

35-
Seven ecosystems are supported: `go`, `node`, `rust`, `rubygems`, `python`, `debian`, `llvm`.
35+
Fourteen ecosystems are supported: `go`, `node`, `rust`, `rubygems`, `python`, `debian`, `llvm`, `nuget`, `vcpkg`, `conan`, `homebrew`, `swift`, `kotlin`, `maven`.
3636

3737
## Data files
3838

@@ -63,6 +63,13 @@ Only ecosystems that have a distinct string for the exact combination should app
6363
- **Python**: match against `manylinux_M_m_arch`, `musllinux_M_m_arch`, `macosx_M_m_arch`, `win_arch`, `win32`, or `linux_arch`
6464
- **Debian**: split on `-` as `arch-os-abi`
6565
- **LLVM**: split on `-` as `arch-vendor-os[-abi]`
66+
- **NuGet**: split on `-` as `os-arch` or `os-musl-arch`
67+
- **vcpkg**: split on `-` as `arch-os`
68+
- **Conan**: split on `/` or `-` as `os/arch` or `os-arch`
69+
- **Homebrew**: split on `_` as `arch_codename` (always macOS)
70+
- **Swift**: same as LLVM (`arch-vendor-os[-abi]`)
71+
- **Kotlin**: split camelCase as `osArch` (e.g., `linuxX64`)
72+
- **Maven**: split on `-` as `os-arch`
6673
3. Resolve each component through the arch/OS reverse lookup indices
6774
4. Return `ErrUnknownPlatform` if neither approach works
6875

data/arches.json

Lines changed: 104 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
"rubygems": "x86_64",
77
"python": "x86_64",
88
"debian": "x86_64",
9-
"llvm": "x86_64"
9+
"llvm": "x86_64",
10+
"nuget": "x64",
11+
"vcpkg": "x64",
12+
"conan": "x86_64",
13+
"homebrew": null,
14+
"swift": "x86_64",
15+
"kotlin": "X64",
16+
"maven": "x86_64"
1017
},
1118
"aarch64": {
1219
"go": "arm64",
@@ -15,7 +22,14 @@
1522
"rubygems": ["aarch64", "arm64"],
1623
"python": "aarch64",
1724
"debian": "aarch64",
18-
"llvm": "aarch64"
25+
"llvm": "aarch64",
26+
"nuget": "arm64",
27+
"vcpkg": "arm64",
28+
"conan": "armv8",
29+
"homebrew": "arm64",
30+
"swift": "aarch64",
31+
"kotlin": "Arm64",
32+
"maven": ["aarch_64", "aarch64"]
1933
},
2034
"i686": {
2135
"go": "386",
@@ -24,7 +38,14 @@
2438
"rubygems": "x86",
2539
"python": "i686",
2640
"debian": "i386",
27-
"llvm": "i686"
41+
"llvm": "i686",
42+
"nuget": "x86",
43+
"vcpkg": "x86",
44+
"conan": "x86",
45+
"homebrew": null,
46+
"swift": "i686",
47+
"kotlin": null,
48+
"maven": "x86_32"
2849
},
2950
"arm": {
3051
"go": "arm",
@@ -33,7 +54,14 @@
3354
"rubygems": "arm",
3455
"python": "arm",
3556
"debian": "arm",
36-
"llvm": "arm"
57+
"llvm": "arm",
58+
"nuget": "arm",
59+
"vcpkg": "arm",
60+
"conan": "armv7",
61+
"homebrew": null,
62+
"swift": "arm",
63+
"kotlin": "Arm32",
64+
"maven": "arm_32"
3765
},
3866
"riscv64": {
3967
"go": "riscv64",
@@ -42,7 +70,14 @@
4270
"rubygems": "riscv64",
4371
"python": "riscv64",
4472
"debian": "riscv64",
45-
"llvm": "riscv64"
73+
"llvm": "riscv64",
74+
"nuget": null,
75+
"vcpkg": null,
76+
"conan": null,
77+
"homebrew": null,
78+
"swift": "riscv64",
79+
"kotlin": null,
80+
"maven": null
4681
},
4782
"s390x": {
4883
"go": "s390x",
@@ -51,7 +86,14 @@
5186
"rubygems": "s390x",
5287
"python": "s390x",
5388
"debian": "s390x",
54-
"llvm": "s390x"
89+
"llvm": "s390x",
90+
"nuget": "s390x",
91+
"vcpkg": null,
92+
"conan": null,
93+
"homebrew": null,
94+
"swift": "s390x",
95+
"kotlin": null,
96+
"maven": "s390_64"
5597
},
5698
"ppc64": {
5799
"go": "ppc64",
@@ -60,7 +102,14 @@
60102
"rubygems": "ppc64",
61103
"python": "ppc64",
62104
"debian": "ppc64",
63-
"llvm": "powerpc64"
105+
"llvm": "powerpc64",
106+
"nuget": null,
107+
"vcpkg": null,
108+
"conan": null,
109+
"homebrew": null,
110+
"swift": "powerpc64",
111+
"kotlin": null,
112+
"maven": "ppc_64"
64113
},
65114
"ppc64le": {
66115
"go": "ppc64le",
@@ -69,7 +118,14 @@
69118
"rubygems": "ppc64le",
70119
"python": "ppc64le",
71120
"debian": "ppc64el",
72-
"llvm": "powerpc64le"
121+
"llvm": "powerpc64le",
122+
"nuget": null,
123+
"vcpkg": null,
124+
"conan": null,
125+
"homebrew": null,
126+
"swift": "powerpc64le",
127+
"kotlin": null,
128+
"maven": null
73129
},
74130
"loong64": {
75131
"go": "loong64",
@@ -78,7 +134,14 @@
78134
"rubygems": null,
79135
"python": "loongarch64",
80136
"debian": "loong64",
81-
"llvm": "loongarch64"
137+
"llvm": "loongarch64",
138+
"nuget": null,
139+
"vcpkg": null,
140+
"conan": null,
141+
"homebrew": null,
142+
"swift": null,
143+
"kotlin": null,
144+
"maven": null
82145
},
83146
"mips": {
84147
"go": "mips",
@@ -87,7 +150,14 @@
87150
"rubygems": "mips",
88151
"python": "mips",
89152
"debian": "mips",
90-
"llvm": "mips"
153+
"llvm": "mips",
154+
"nuget": null,
155+
"vcpkg": null,
156+
"conan": "mips",
157+
"homebrew": null,
158+
"swift": "mips",
159+
"kotlin": null,
160+
"maven": null
91161
},
92162
"mips64": {
93163
"go": "mips64",
@@ -96,7 +166,14 @@
96166
"rubygems": "mips64",
97167
"python": "mips64",
98168
"debian": "mips64",
99-
"llvm": "mips64"
169+
"llvm": "mips64",
170+
"nuget": null,
171+
"vcpkg": null,
172+
"conan": "mips64",
173+
"homebrew": null,
174+
"swift": "mips64",
175+
"kotlin": null,
176+
"maven": null
100177
},
101178
"mipsle": {
102179
"go": "mipsle",
@@ -105,7 +182,14 @@
105182
"rubygems": "mipsel",
106183
"python": "mipsel",
107184
"debian": "mipsel",
108-
"llvm": "mipsel"
185+
"llvm": "mipsel",
186+
"nuget": null,
187+
"vcpkg": null,
188+
"conan": null,
189+
"homebrew": null,
190+
"swift": "mipsel",
191+
"kotlin": null,
192+
"maven": null
109193
},
110194
"mips64le": {
111195
"go": "mips64le",
@@ -114,6 +198,13 @@
114198
"rubygems": "mips64el",
115199
"python": "mips64el",
116200
"debian": "mips64el",
117-
"llvm": "mips64el"
201+
"llvm": "mips64el",
202+
"nuget": null,
203+
"vcpkg": null,
204+
"conan": null,
205+
"homebrew": null,
206+
"swift": "mips64el",
207+
"kotlin": null,
208+
"maven": null
118209
}
119210
}

0 commit comments

Comments
 (0)