Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: pin vcpkg on Alpine Arm64 #389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 dist/legacy/lib.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2 dist/legacy/lib.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2 dist/legacy/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ninja":"1.12.1","cmake":"3.31.4","task":"3.40.1","powershell":"7.4.5","pip":">=22.2.0","python":">=3.7.9","meson":{"linux":{"ubuntu":{"20":"1.6.1","18":"0.61.4","else":"0.61.4"},"else":"1.6.1"},"else":"1.6.1"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.13.2-1","ubuntu":{"22":"1.13.2","18":"1.10.0","else":"1.10.0"},"else":"1.13.2"},"else":"1.13.2"},"gcc":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"mingw":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"}}
{"ninja":"1.12.1","cmake":"3.31.4","task":"3.40.1","powershell":"7.4.5","pip":">=22.2.0","python":">=3.7.9","vcpkg":{"linux":{"alpine":{"else":{"arm64":"d172727ef04337ef0021640302a9a3a91ad17414","else":""}},"else":""},"else":""},"meson":{"linux":{"ubuntu":{"20":"1.6.1","18":"0.61.4","else":"0.61.4"},"else":"1.6.1"},"else":"1.6.1"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.13.2-1","ubuntu":{"22":"1.13.2","18":"1.10.0","else":"1.10.0"},"else":"1.13.2"},"else":"1.13.2"},"gcc":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"mingw":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"}}
2 changes: 1 addition & 1 deletion 2 dist/modern/lib.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2 dist/modern/lib.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2 dist/modern/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ninja":"1.12.1","cmake":"3.31.4","task":"3.40.1","powershell":"7.4.5","pip":">=22.2.0","python":">=3.7.9","meson":{"linux":{"ubuntu":{"20":"1.6.1","18":"0.61.4","else":"0.61.4"},"else":"1.6.1"},"else":"1.6.1"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.13.2-1","ubuntu":{"22":"1.13.2","18":"1.10.0","else":"1.10.0"},"else":"1.13.2"},"else":"1.13.2"},"gcc":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"mingw":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"}}
{"ninja":"1.12.1","cmake":"3.31.4","task":"3.40.1","powershell":"7.4.5","pip":">=22.2.0","python":">=3.7.9","vcpkg":{"linux":{"alpine":{"else":{"arm64":"d172727ef04337ef0021640302a9a3a91ad17414","else":""}},"else":""},"else":""},"meson":{"linux":{"ubuntu":{"20":"1.6.1","18":"0.61.4","else":"0.61.4"},"else":"1.6.1"},"else":"1.6.1"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.13.2-1","ubuntu":{"22":"1.13.2","18":"1.10.0","else":"1.10.0"},"else":"1.13.2"},"else":"1.13.2"},"gcc":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"mingw":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"}}
2 changes: 1 addition & 1 deletion 2 packages/setup-alpine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-alpine",
"version": "1.0.0",
"version": "1.1.0",
"description": "Setup apk packages and repositories in Alpine Linux distributions",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-alpine",
Expand Down
6 changes: 5 additions & 1 deletion 6 packages/setup-alpine/src/has-apk.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import memoizee from "memoizee"
import which from "which"
import { isAlpine } from "./is-alpine.js"

async function hasApk_() {
if (!isAlpine()) {
return false
}
try {
await which("apk")
return true
} catch (error) {
} catch {
return false
}
}
Expand Down
1 change: 1 addition & 0 deletions 1 packages/setup-alpine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export * from "./apk-repository.js"
export * from "./has-apk.js"
export * from "./init-apt.js"
export * from "./install-package.js"
export * from "./is-alpine.js"
export * from "./qualify-install.js"
export * from "./update.js"
15 changes: 15 additions & 0 deletions 15 packages/setup-alpine/src/is-alpine.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { pathExistsSync } from "path-exists"

/**
* Check if the current platform is Alpine
*/
export function isAlpine() {
if (process.platform !== "linux") {
return false
}
try {
return pathExistsSync("/etc/alpine-release")
} catch {
return false
}
}
12 changes: 12 additions & 0 deletions 12 src/versions/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
"powershell": "7.4.5",
"pip": ">=22.2.0",
"python": ">=3.7.9",
"vcpkg": {
"linux": {
"alpine": {
"else": {
"arm64": "d172727ef04337ef0021640302a9a3a91ad17414",
"else": ""
}
},
"else": ""
},
"else": ""
},
"meson": {
"linux": {
"ubuntu": {
Expand Down
17 changes: 15 additions & 2 deletions 17 src/versions/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import fs from "fs"
import path from "path"
import { fileURLToPath } from "url"
import memoize from "memoizee"
import { isAlpine } from "setup-alpine"
import type { CompilerInfo } from "../compilers.js"
import type { Opts } from "../options.js"
import type { Inputs, ToolName } from "../tool.js"
import { hasDnf } from "../utils/env/hasDnf.js"
import { isArch } from "../utils/env/isArch.js"
import { isUbuntu } from "../utils/env/isUbuntu.js"

Expand All @@ -21,7 +23,10 @@ type DistroVersionMap = Record<
`${number}` | `${number}.${number}` | `${number}.${number}.${number}` | string | "else",
ArchVersionMap | string | undefined
>
type DistroMap = Record<"ubuntu" | "archlinux" | string | "else", DistroVersionMap | string | undefined>
type DistroMap = Record<
"ubuntu" | "archlinux" | "alpine" | "fedora" | string | "else",
DistroVersionMap | string | undefined
>
type PlatformMap = Record<NodeJS.Platform | "else", DistroMap | string | undefined>
type Versions = Record<ToolName | "pip", PlatformMap | string | undefined>

Expand Down Expand Up @@ -62,7 +67,15 @@ export function getVersionDefault(
const distroMap = distroMapOrVersion

// check for distro-specific versions
const distro = isUbuntu() ? "ubuntu" : isArch() ? "archlinux" : "else"
const distro = isUbuntu()
? "ubuntu"
: isArch()
? "archlinux"
: isAlpine()
? "alpine"
: hasDnf()
? "fedora"
: "else"
const distroVersionMapOrVersion = distroMap[distro] ?? distroMap.else
if (distroVersionMapOrVersion === undefined) {
throw new Error(`Distro "${distro}" not found in versions data for tool "${tool}"`)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.