mirror of https://github.com/aminya/setup-cpp
Merge pull request #240 from aminya/dprint [skip ci]
This commit is contained in:
commit
072c438abb
|
@ -0,0 +1,71 @@
|
||||||
|
{
|
||||||
|
"[dockerfile]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[javascript]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[javascriptreact]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[json]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[jsonc]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[typescriptreact]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"[yaml]": {
|
||||||
|
"editor.defaultFormatter": "dprint.dprint"
|
||||||
|
},
|
||||||
|
"cSpell.advanced.feature.useReferenceProviderWithRename": true,
|
||||||
|
"cSpell.checkOnlyEnabledFileTypes": false,
|
||||||
|
"cSpell.numSuggestions": 3,
|
||||||
|
"cSpell.showAutocompleteSuggestions": true,
|
||||||
|
"eslint.enable": true,
|
||||||
|
"eslint.options": {
|
||||||
|
"cache": true,
|
||||||
|
"cacheLocation": "./node_modules/.cache/eslint/",
|
||||||
|
"errorOnUnmatchedPattern": false,
|
||||||
|
"extensions": [
|
||||||
|
"ts",
|
||||||
|
"tsx",
|
||||||
|
"js",
|
||||||
|
"jsx",
|
||||||
|
"cjs",
|
||||||
|
"mjs",
|
||||||
|
"json",
|
||||||
|
"yaml",
|
||||||
|
"astro",
|
||||||
|
"mdx",
|
||||||
|
"html"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"eslint.probe": [
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"yaml",
|
||||||
|
"markdown",
|
||||||
|
"html",
|
||||||
|
"astro"
|
||||||
|
],
|
||||||
|
"explorer.copyRelativePathSeparator": "/",
|
||||||
|
"files.eol": "\n",
|
||||||
|
"files.insertFinalNewline": true,
|
||||||
|
"files.trimFinalNewlines": true,
|
||||||
|
"hadolint.hadolintPath": "./target/bin/hadolint",
|
||||||
|
// use dprint instead
|
||||||
|
"prettier.enable": false
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ ignorePaths:
|
||||||
- .vscode/extensions.json
|
- .vscode/extensions.json
|
||||||
words:
|
words:
|
||||||
- aarch
|
- aarch
|
||||||
|
- hadolint
|
||||||
- aminya
|
- aminya
|
||||||
- applellvm
|
- applellvm
|
||||||
- bazel
|
- bazel
|
||||||
|
@ -33,6 +34,7 @@ words:
|
||||||
- dearmor
|
- dearmor
|
||||||
- deps
|
- deps
|
||||||
- devel
|
- devel
|
||||||
|
- dprint
|
||||||
- DVCPKG
|
- DVCPKG
|
||||||
- dyld
|
- dyld
|
||||||
- eabi
|
- eabi
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
## base image
|
## base image
|
||||||
FROM archlinux:base as setup-cpp-arch
|
FROM archlinux:base AS setup-cpp-arch
|
||||||
|
|
||||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||||
|
|
||||||
RUN pacman -Syuu --noconfirm && \
|
RUN pacman -Syuu --noconfirm && \
|
||||||
pacman-db-upgrade && \
|
pacman-db-upgrade && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
pacman -S --noconfirm --needed nodejs npm && \
|
pacman -S --noconfirm --needed nodejs npm && \
|
||||||
|
# install the compiler and tools
|
||||||
# install the compiler and tools
|
|
||||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||||
--compiler llvm \
|
--compiler llvm \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -21,7 +20,7 @@ RUN pacman -Syuu --noconfirm && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# arch cleanup
|
# arch cleanup
|
||||||
pacman -Scc --noconfirm && \
|
pacman -Scc --noconfirm && \
|
||||||
rm -rf /var/cache/pacman/pkg/* && \
|
rm -rf /var/cache/pacman/pkg/* && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
## base image
|
## base image
|
||||||
FROM archlinux:base as setup-cpp-arch-mingw
|
FROM archlinux:base AS setup-cpp-arch-mingw
|
||||||
|
|
||||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||||
|
|
||||||
RUN pacman -Syuu --noconfirm && \
|
RUN pacman -Syuu --noconfirm && \
|
||||||
pacman-db-upgrade && \
|
pacman-db-upgrade && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
pacman -S --noconfirm --needed nodejs npm && \
|
pacman -S --noconfirm --needed nodejs npm && \
|
||||||
|
# install the compiler and tools
|
||||||
# install the compiler and tools
|
|
||||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -21,7 +20,7 @@ RUN pacman -Syuu --noconfirm && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# arch cleanup
|
# arch cleanup
|
||||||
pacman -Scc --noconfirm && \
|
pacman -Scc --noconfirm && \
|
||||||
rm -rf /var/cache/pacman/pkg/* && \
|
rm -rf /var/cache/pacman/pkg/* && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
|
@ -10,7 +10,7 @@ async function main() {
|
||||||
.replace(/FROM (.*)/g, `FROM $1\n\nCOPY "./dist/legacy" "/usr/lib/setup-cpp/"`)
|
.replace(/FROM (.*)/g, `FROM $1\n\nCOPY "./dist/legacy" "/usr/lib/setup-cpp/"`)
|
||||||
.replace("setup-cpp ", "node /usr/lib/setup-cpp/setup-cpp.js ")
|
.replace("setup-cpp ", "node /usr/lib/setup-cpp/setup-cpp.js ")
|
||||||
// remove the npm install line
|
// remove the npm install line
|
||||||
.replace(/# install setup-cpp\n\s*npm install -g setup-cpp.*/, "")
|
.replace(/# install setup-cpp\n\s*npm install -g setup-cpp.*\n/, "")
|
||||||
|
|
||||||
// write the new file in dev/docker/ci
|
// write the new file in dev/docker/ci
|
||||||
await writeFile(`./dev/docker/ci/${name}.dockerfile`, modifiedDockerFile)
|
await writeFile(`./dev/docker/ci/${name}.dockerfile`, modifiedDockerFile)
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
## base image
|
## base image
|
||||||
FROM fedora:40 as setup-cpp-fedora
|
FROM fedora:40 AS setup-cpp-fedora
|
||||||
|
|
||||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||||
|
|
||||||
# install nodejs
|
# install nodejs
|
||||||
RUN dnf -y install nodejs npm && \
|
RUN dnf -y install nodejs npm && \
|
||||||
|
# install the compiler and tools
|
||||||
# install the compiler and tools
|
|
||||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||||
--compiler llvm \
|
--compiler llvm \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -19,7 +18,7 @@ RUN dnf -y install nodejs npm && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
dnf clean all && \
|
dnf clean all && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
## base image
|
## base image
|
||||||
FROM fedora:40 as setup-cpp-fedora-mingw
|
FROM fedora:40 AS setup-cpp-fedora-mingw
|
||||||
|
|
||||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||||
|
|
||||||
# install nodejs
|
# install nodejs
|
||||||
RUN dnf -y install nodejs npm && \
|
RUN dnf -y install nodejs npm && \
|
||||||
|
# install the compiler and tools
|
||||||
# install the compiler and tools
|
|
||||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -20,7 +19,7 @@ RUN dnf -y install nodejs npm && \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true \
|
--ccache true \
|
||||||
--powershell true && \
|
--powershell true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
dnf clean all && \
|
dnf clean all && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
#### Base Image
|
#### Base Image
|
||||||
FROM ubuntu:22.04 as setup-cpp-ubuntu
|
FROM ubuntu:22.04 AS setup-cpp-ubuntu
|
||||||
|
|
||||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||||
|
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
apt-get install -y --no-install-recommends nodejs npm && \
|
apt-get install -y --no-install-recommends nodejs npm && \
|
||||||
|
# install the compiler and tools
|
||||||
# install the compiler and tools
|
|
||||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||||
--nala true \
|
--nala true \
|
||||||
--compiler llvm \
|
--compiler llvm \
|
||||||
|
@ -21,7 +20,7 @@ RUN apt-get update -qq && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
nala autoremove -y && \
|
nala autoremove -y && \
|
||||||
nala autopurge -y && \
|
nala autopurge -y && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
#### Base Image
|
#### Base Image
|
||||||
FROM ubuntu:22.04 as setup-cpp-ubuntu-mingw
|
FROM ubuntu:22.04 AS setup-cpp-ubuntu-mingw
|
||||||
|
|
||||||
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
|
||||||
|
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
apt-get install -y --no-install-recommends nodejs npm && \
|
apt-get install -y --no-install-recommends nodejs npm && \
|
||||||
|
# install the compiler and tools
|
||||||
# install the compiler and tools
|
|
||||||
node /usr/lib/setup-cpp/setup-cpp.js \
|
node /usr/lib/setup-cpp/setup-cpp.js \
|
||||||
--nala true \
|
--nala true \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
|
@ -22,7 +21,7 @@ RUN apt-get update -qq && \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true \
|
--ccache true \
|
||||||
--powershell true && \
|
--powershell true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
nala autoremove -y && \
|
nala autoremove -y && \
|
||||||
nala autopurge -y && \
|
nala autopurge -y && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|
|
@ -8,7 +8,7 @@ RUN bash -c 'source ~/.cpprc \
|
||||||
|
|
||||||
#### Running environment
|
#### Running environment
|
||||||
# use a fresh image as the runner
|
# use a fresh image as the runner
|
||||||
FROM archlinux:base as runner
|
FROM archlinux:base AS runner
|
||||||
|
|
||||||
# copy the built binaries and their runtime dependencies
|
# copy the built binaries and their runtime dependencies
|
||||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||||
|
|
|
@ -8,7 +8,7 @@ RUN bash -c 'source ~/.cpprc \
|
||||||
|
|
||||||
#### Running environment
|
#### Running environment
|
||||||
# use a fresh image as the runner
|
# use a fresh image as the runner
|
||||||
FROM fedora:40 as runner
|
FROM fedora:40 AS runner
|
||||||
|
|
||||||
# copy the built binaries and their runtime dependencies
|
# copy the built binaries and their runtime dependencies
|
||||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||||
|
|
|
@ -8,7 +8,7 @@ RUN bash -c 'source ~/.cpprc \
|
||||||
|
|
||||||
#### Running environment
|
#### Running environment
|
||||||
# use a fresh image as the runner
|
# use a fresh image as the runner
|
||||||
FROM ubuntu:22.04 as runner
|
FROM ubuntu:22.04 AS runner
|
||||||
|
|
||||||
# copy the built binaries and their runtime dependencies
|
# copy the built binaries and their runtime dependencies
|
||||||
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
## base image
|
## base image
|
||||||
FROM archlinux:base as setup-cpp-arch
|
FROM archlinux:base AS setup-cpp-arch
|
||||||
|
|
||||||
RUN pacman -Syuu --noconfirm && \
|
RUN pacman -Syuu --noconfirm && \
|
||||||
pacman-db-upgrade && \
|
pacman-db-upgrade && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
pacman -S --noconfirm --needed nodejs npm && \
|
pacman -S --noconfirm --needed nodejs npm && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--compiler llvm \
|
--compiler llvm \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -20,7 +20,7 @@ RUN pacman -Syuu --noconfirm && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# arch cleanup
|
# arch cleanup
|
||||||
pacman -Scc --noconfirm && \
|
pacman -Scc --noconfirm && \
|
||||||
rm -rf /var/cache/pacman/pkg/* && \
|
rm -rf /var/cache/pacman/pkg/* && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
## base image
|
## base image
|
||||||
FROM archlinux:base as setup-cpp-arch-mingw
|
FROM archlinux:base AS setup-cpp-arch-mingw
|
||||||
|
|
||||||
RUN pacman -Syuu --noconfirm && \
|
RUN pacman -Syuu --noconfirm && \
|
||||||
pacman-db-upgrade && \
|
pacman-db-upgrade && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
pacman -S --noconfirm --needed nodejs npm && \
|
pacman -S --noconfirm --needed nodejs npm && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -20,7 +20,7 @@ RUN pacman -Syuu --noconfirm && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# arch cleanup
|
# arch cleanup
|
||||||
pacman -Scc --noconfirm && \
|
pacman -Scc --noconfirm && \
|
||||||
rm -rf /var/cache/pacman/pkg/* && \
|
rm -rf /var/cache/pacman/pkg/* && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
## base image
|
## base image
|
||||||
FROM fedora:40 as setup-cpp-fedora
|
FROM fedora:40 AS setup-cpp-fedora
|
||||||
|
|
||||||
# install nodejs
|
# install nodejs
|
||||||
RUN dnf -y install nodejs npm && \
|
RUN dnf -y install nodejs npm && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--compiler llvm \
|
--compiler llvm \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -18,7 +18,7 @@ RUN dnf -y install nodejs npm && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
dnf clean all && \
|
dnf clean all && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
## base image
|
## base image
|
||||||
FROM fedora:40 as setup-cpp-fedora-mingw
|
FROM fedora:40 AS setup-cpp-fedora-mingw
|
||||||
|
|
||||||
# install nodejs
|
# install nodejs
|
||||||
RUN dnf -y install nodejs npm && \
|
RUN dnf -y install nodejs npm && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
--cmake true \
|
--cmake true \
|
||||||
|
@ -19,7 +19,7 @@ RUN dnf -y install nodejs npm && \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true \
|
--ccache true \
|
||||||
--powershell true && \
|
--powershell true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
dnf clean all && \
|
dnf clean all && \
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#### Base Image
|
#### Base Image
|
||||||
FROM ubuntu:20.04 as setup-cpp-ubuntu-mingw
|
FROM ubuntu:20.04 AS setup-cpp-ubuntu-mingw
|
||||||
|
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
# install latest nodejs on ubuntu 20.04
|
# install latest nodejs on ubuntu 20.04
|
||||||
apt-get update -qq && \
|
apt-get update -qq && \
|
||||||
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
|
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
|
||||||
mkdir -p /etc/apt/keyrings && \
|
mkdir -p /etc/apt/keyrings && \
|
||||||
|
@ -10,9 +10,9 @@ RUN apt-get update -qq && \
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
||||||
apt-get update -qq && \
|
apt-get update -qq && \
|
||||||
apt-get install -y --no-install-recommends nodejs && \
|
apt-get install -y --no-install-recommends nodejs && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--nala true \
|
--nala true \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
|
@ -27,7 +27,7 @@ RUN apt-get update -qq && \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true \
|
--ccache true \
|
||||||
--powershell true && \
|
--powershell true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
nala autoremove -y && \
|
nala autoremove -y && \
|
||||||
nala autopurge -y && \
|
nala autopurge -y && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#### Base Image
|
#### Base Image
|
||||||
FROM ubuntu:22.04 as setup-cpp-ubuntu
|
FROM ubuntu:22.04 AS setup-cpp-ubuntu
|
||||||
|
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
apt-get install -y --no-install-recommends nodejs npm && \
|
apt-get install -y --no-install-recommends nodejs npm && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--nala true \
|
--nala true \
|
||||||
--compiler llvm \
|
--compiler llvm \
|
||||||
|
@ -20,7 +20,7 @@ RUN apt-get update -qq && \
|
||||||
--gcovr true \
|
--gcovr true \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true && \
|
--ccache true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
nala autoremove -y && \
|
nala autoremove -y && \
|
||||||
nala autopurge -y && \
|
nala autopurge -y && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#### Base Image
|
#### Base Image
|
||||||
FROM ubuntu:22.04 as setup-cpp-ubuntu-mingw
|
FROM ubuntu:22.04 AS setup-cpp-ubuntu-mingw
|
||||||
|
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
# install nodejs
|
# install nodejs
|
||||||
apt-get install -y --no-install-recommends nodejs npm && \
|
apt-get install -y --no-install-recommends nodejs npm && \
|
||||||
# install setup-cpp
|
# install setup-cpp
|
||||||
npm install -g setup-cpp@v0.37.0 && \
|
npm install -g setup-cpp@v0.37.0 && \
|
||||||
# install the compiler and tools
|
# install the compiler and tools
|
||||||
setup-cpp \
|
setup-cpp \
|
||||||
--nala true \
|
--nala true \
|
||||||
--compiler mingw \
|
--compiler mingw \
|
||||||
|
@ -21,7 +21,7 @@ RUN apt-get update -qq && \
|
||||||
--doxygen true \
|
--doxygen true \
|
||||||
--ccache true \
|
--ccache true \
|
||||||
--powershell true && \
|
--powershell true && \
|
||||||
# cleanup
|
# cleanup
|
||||||
nala autoremove -y && \
|
nala autoremove -y && \
|
||||||
nala autopurge -y && \
|
nala autopurge -y && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|
|
@ -12,6 +12,6 @@ async function main() {
|
||||||
writeFileSync(`${file}.map`, map)
|
writeFileSync(`${file}.map`, map)
|
||||||
}
|
}
|
||||||
|
|
||||||
main().catch(function (err) {
|
main().catch(function(err) {
|
||||||
throw err
|
throw err
|
||||||
})
|
})
|
||||||
|
|
|
@ -35,7 +35,7 @@ function main() {
|
||||||
"--",
|
"--",
|
||||||
`{{caxa}}/node_modules/.bin/node${exe}`,
|
`{{caxa}}/node_modules/.bin/node${exe}`,
|
||||||
`{{caxa}}/setup-cpp.js`,
|
`{{caxa}}/setup-cpp.js`,
|
||||||
]),
|
])
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
"lineWidth": 120,
|
||||||
|
"indentWidth": 2,
|
||||||
|
"newLineKind": "lf",
|
||||||
|
"useTabs": false,
|
||||||
|
"incremental": true,
|
||||||
|
"typescript": {
|
||||||
|
"semiColons": "asi",
|
||||||
|
"quoteProps": "asNeeded",
|
||||||
|
"useBraces": "always"
|
||||||
|
},
|
||||||
|
"json": {},
|
||||||
|
"markdown": {},
|
||||||
|
"dockerfile": {},
|
||||||
|
"exec": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"command": "node ./node_modules/prettier/bin/prettier.cjs --stdin-filepath {{file_path}} --tab-width {{indent_width}} --print-width {{line_width}}",
|
||||||
|
"exts": ["yaml", "yml"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"associations": [
|
||||||
|
"**/*{.yaml,.yml}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"includes": [
|
||||||
|
"**/*{.ts,.tsx,.mts,.cts,.js,.jsx,.cjs,.mjs,.json,.md,.yaml,.yml,.dockerfile}"
|
||||||
|
],
|
||||||
|
"excludes": [
|
||||||
|
"**/node_modules",
|
||||||
|
"*.lock*",
|
||||||
|
"*-lock*",
|
||||||
|
"./.cache/",
|
||||||
|
"**/build",
|
||||||
|
"**/dist",
|
||||||
|
"dev/cpp_vcpkg_project"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"https://plugins.dprint.dev/typescript-0.89.3.wasm",
|
||||||
|
"https://plugins.dprint.dev/json-0.19.2.wasm",
|
||||||
|
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
|
||||||
|
"https://plugins.dprint.dev/dockerfile-0.3.0.wasm",
|
||||||
|
"https://plugins.dprint.dev/exec-0.4.4.json@c207bf9b9a4ee1f0ecb75c594f774924baf62e8e53a2ce9d873816a408cecbf7"
|
||||||
|
],
|
||||||
|
"$schema": "https://dprint.dev/schemas/v0.json"
|
||||||
|
}
|
38
package.json
38
package.json
|
@ -39,11 +39,11 @@
|
||||||
"copy.matchers.modern": "shx cp ./src/gcc/gcc_matcher.json ./dist/modern/ && shx cp ./src/msvc/msvc_matcher.json ./dist/modern/ && shx cp ./src/python/python_matcher.json ./dist/modern/ && shx cp ./src/llvm/llvm_matcher.json ./dist/modern/",
|
"copy.matchers.modern": "shx cp ./src/gcc/gcc_matcher.json ./dist/modern/ && shx cp ./src/msvc/msvc_matcher.json ./dist/modern/ && shx cp ./src/python/python_matcher.json ./dist/modern/ && shx cp ./src/llvm/llvm_matcher.json ./dist/modern/",
|
||||||
"dev": "cross-env NODE_ENV=development parcel watch",
|
"dev": "cross-env NODE_ENV=development parcel watch",
|
||||||
"docs": "shx rm -rf packages/*/README.md && pnpm -r exec readme --path ../../dev/readme/template.md -y && pnpm -r exec ts-readme",
|
"docs": "shx rm -rf packages/*/README.md && pnpm -r exec readme --path ../../dev/readme/template.md -y && pnpm -r exec ts-readme",
|
||||||
"format": "run-s lint.prettier",
|
"format": "run-s lint.dprint",
|
||||||
"lint": "run-p --aggregate-output --continue-on-error lint.cspell lint.eslint lint.prettier lint.tsc",
|
"lint": "run-p --aggregate-output --continue-on-error lint.cspell lint.eslint lint.dprint lint.tsc",
|
||||||
"lint.cspell": "cspell lint --no-progress --show-suggestions --cache --cache-location ./.cache/cspell/.cspellcache",
|
"lint.cspell": "cspell lint --no-progress --show-suggestions --cache --cache-location ./.cache/cspell/.cspellcache",
|
||||||
"lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
|
"lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
|
||||||
"lint.prettier": "prettier --list-different --write .",
|
"lint.dprint": "dprint fmt",
|
||||||
"lint.tsc": "tsc --noEmit",
|
"lint.tsc": "tsc --noEmit",
|
||||||
"pack.exe": "shx rm -rf ./dist/tsconfig.tsbuildinfo && node ./dev/scripts/pack-exe.mjs",
|
"pack.exe": "shx rm -rf ./dist/tsconfig.tsbuildinfo && node ./dev/scripts/pack-exe.mjs",
|
||||||
"prepublishOnly": "rm ./dist/tsconfig.tsbuildinfo",
|
"prepublishOnly": "rm ./dist/tsconfig.tsbuildinfo",
|
||||||
|
@ -51,28 +51,25 @@
|
||||||
"start.docker.arch": "docker run -t setup-cpp:arch .",
|
"start.docker.arch": "docker run -t setup-cpp:arch .",
|
||||||
"start.docker.fedora": "docker run -t setup-cpp:fedora .",
|
"start.docker.fedora": "docker run -t setup-cpp:fedora .",
|
||||||
"start.docker.ubuntu": "docker run -t setup-cpp:ubuntu .",
|
"start.docker.ubuntu": "docker run -t setup-cpp:ubuntu .",
|
||||||
"test.lint": "run-p --aggregate-output --continue-on-error lint.cspell test.lint.eslint test.lint.prettier lint.tsc",
|
"test.lint": "run-p --aggregate-output --continue-on-error lint.cspell test.lint.eslint test.lint.dprint lint.tsc",
|
||||||
"test.lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
|
"test.lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
|
||||||
"test.lint.prettier": "prettier . --check",
|
"test.lint.dprint": "dprint check",
|
||||||
"test": "jest --runInBand --forceExit --coverage",
|
"test": "jest --runInBand --forceExit --coverage",
|
||||||
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs"
|
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs"
|
||||||
},
|
},
|
||||||
"prettier": "prettier-config-atomic",
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^1.1.3",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"@babel/cli": "^7.23.9",
|
"@babel/cli": "^7.24.1",
|
||||||
"@shockpkg/archive-files": "https://github.com/aminya/archive-files#54ec59fad46aca736ac6feb6c7bb526528141b9d",
|
"@shockpkg/archive-files": "github:aminya/archive-files#54ec59fad46aca736ac6feb6c7bb526528141b9d",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"@types/cross-spawn": "^6.0.6",
|
"@types/cross-spawn": "^6.0.6",
|
||||||
"@types/eslint": "^8.56.2",
|
"@types/eslint": "^8.56.6",
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/mri": "^1.1.5",
|
"@types/node": "^12.20.55",
|
||||||
"@types/node": "^12",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/prettier": "2.7.3",
|
|
||||||
"@types/semver": "^7.5.7",
|
|
||||||
"@types/which": "^3.0.3",
|
"@types/which": "^3.0.3",
|
||||||
"@upleveled/babel-plugin-remove-node-prefix": "github:aminya/babel-plugin-remove-node-prefix#95fcbd92405b99a6eece48c493548996f12e6519",
|
"@upleveled/babel-plugin-remove-node-prefix": "github:aminya/babel-plugin-remove-node-prefix#95fcbd92405b99a6eece48c493548996f12e6519",
|
||||||
"admina": "^1.0.1",
|
"admina": "^1.0.1",
|
||||||
|
@ -81,12 +78,13 @@
|
||||||
"ci-log": "workspace:*",
|
"ci-log": "workspace:*",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cross-spawn": "^7.0.3",
|
"cross-spawn": "^7.0.3",
|
||||||
"cspell": "^8.3.2",
|
"cspell": "^8.6.1",
|
||||||
|
"dprint": "^0.45.0",
|
||||||
"escape-path-with-spaces": "^1.0.2",
|
"escape-path-with-spaces": "^1.0.2",
|
||||||
"escape-quotes": "^1.0.2",
|
"escape-quotes": "^1.0.2",
|
||||||
"escape-string-regexp": "^5.0.0",
|
"escape-string-regexp": "^5.0.0",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-atomic": "^1.20.6",
|
"eslint-config-atomic": "^1.21.2",
|
||||||
"exec-powershell": "workspace:*",
|
"exec-powershell": "workspace:*",
|
||||||
"execa": "^7.2.0",
|
"execa": "^7.2.0",
|
||||||
"is-url-online": "^1.5.0",
|
"is-url-online": "^1.5.0",
|
||||||
|
@ -95,12 +93,12 @@
|
||||||
"micro-memoize": "^4.1.2",
|
"micro-memoize": "^4.1.2",
|
||||||
"mkdirp": "^3.0.1",
|
"mkdirp": "^3.0.1",
|
||||||
"mri": "^1.2.0",
|
"mri": "^1.2.0",
|
||||||
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd#97843d525947e3f3776ee359b597316909754c4d",
|
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd#c01f519bd995460228ed3dec4df51df92dc290fd",
|
||||||
"npm-check-updates": "^16.14.15",
|
"npm-check-updates": "^16.14.18",
|
||||||
"npm-run-all2": "^6.1.2",
|
"npm-run-all2": "^6.1.2",
|
||||||
"numerous": "1.0.3",
|
"numerous": "1.0.3",
|
||||||
"p-timeout": "^6.1.2",
|
"p-timeout": "^6.1.2",
|
||||||
"parcel": "2.11.0",
|
"parcel": "2.12.0",
|
||||||
"path-exists": "^5.0.0",
|
"path-exists": "^5.0.0",
|
||||||
"patha": "^0.4.1",
|
"patha": "^0.4.1",
|
||||||
"prettier": "3.2.2",
|
"prettier": "3.2.2",
|
||||||
|
@ -115,7 +113,7 @@
|
||||||
"time-delta": "github:aminya/time-delta#69d91a41cef28e569be9a2991129f5f7d1f0d00e",
|
"time-delta": "github:aminya/time-delta#69d91a41cef28e569be9a2991129f5f7d1f0d00e",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"ts-readme": "^1.1.3",
|
"ts-readme": "^1.1.3",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.4.3",
|
||||||
"ubuntu-version": "^2.0.0",
|
"ubuntu-version": "^2.0.0",
|
||||||
"untildify-user": "workspace:*",
|
"untildify-user": "workspace:*",
|
||||||
"which": "^4.0.0"
|
"which": "^4.0.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { join } from "path"
|
|
||||||
import { isSudo } from "admina"
|
import { isSudo } from "admina"
|
||||||
import { homedir } from "os"
|
import { homedir } from "os"
|
||||||
|
import { join } from "path"
|
||||||
|
|
||||||
export function userHomeDir() {
|
export function userHomeDir() {
|
||||||
if (isSudo() && typeof process.env.SUDO_USER === "string" && process.env.SUDO_USER !== "") {
|
if (isSudo() && typeof process.env.SUDO_USER === "string" && process.env.SUDO_USER !== "") {
|
||||||
|
|
1983
pnpm-lock.yaml
1983
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
||||||
|
import config from "prettier-config-atomic"
|
||||||
|
export default config
|
|
@ -1,8 +1,8 @@
|
||||||
import { syncVersions, getVersion } from "../versions/versions"
|
|
||||||
import { parseArgs } from "../cli-options"
|
import { parseArgs } from "../cli-options"
|
||||||
import { getCompilerInfo } from "../compilers"
|
import { getCompilerInfo } from "../compilers"
|
||||||
import { Inputs } from "../tool"
|
import { Inputs } from "../tool"
|
||||||
import { DefaultLinuxVersion } from "../versions/default_versions"
|
import { DefaultLinuxVersion } from "../versions/default_versions"
|
||||||
|
import { getVersion, syncVersions } from "../versions/versions"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("getCompilerInfo", () => {
|
describe("getCompilerInfo", () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupBazel } from "../bazel"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupBazel } from "../bazel"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-bazel", () => {
|
describe("setup-bazel", () => {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
import { execRootSync } from "admina"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { addAptKeyViaDownload, setupAptPack } from "../utils/setup/setupAptPack"
|
import { addAptKeyViaDownload, setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
|
||||||
import { execRootSync } from "admina"
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupBazel(version: string, _setupDir: string, _arch: string) {
|
export async function setupBazel(version: string, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { setupBrew } from "../brew"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupBrew } from "../brew"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-brew", () => {
|
describe("setup-brew", () => {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { mkdirP } from "@actions/io"
|
||||||
import { execaSync } from "execa"
|
import { execaSync } from "execa"
|
||||||
import { dirname } from "patha"
|
import { readFileSync } from "fs"
|
||||||
import which from "which"
|
|
||||||
import { tmpdir } from "os"
|
import { tmpdir } from "os"
|
||||||
import path, { join } from "path"
|
import path, { join } from "path"
|
||||||
import { mkdirP } from "@actions/io"
|
import { dirname } from "patha"
|
||||||
import { readFileSync } from "fs"
|
import which from "which"
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
|
||||||
/* eslint-disable require-atomic-updates */
|
/* eslint-disable require-atomic-updates */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupCcache } from "../ccache"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupCcache } from "../ccache"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-ccache", () => {
|
describe("setup-ccache", () => {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function setupCcache(version: string, _setupDir: string, _arch: string) {
|
export function setupCcache(version: string, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { getInput } from "@actions/core"
|
import { getInput } from "@actions/core"
|
||||||
import { info } from "ci-log"
|
import { info } from "ci-log"
|
||||||
import mri from "mri"
|
import mri from "mri"
|
||||||
import { InstallationInfo } from "./utils/setup/setupBin"
|
|
||||||
import { Inputs, inputs } from "./tool"
|
import { Inputs, inputs } from "./tool"
|
||||||
|
import { InstallationInfo } from "./utils/setup/setupBin"
|
||||||
|
|
||||||
export function parseArgs(args: string[]): Opts {
|
export function parseArgs(args: string[]): Opts {
|
||||||
return mri<Record<Inputs, string | undefined> & { help: boolean }>(args, {
|
return mri<Record<Inputs, string | undefined> & { help: boolean }>(args, {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupCmake } from "../cmake"
|
|
||||||
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupCmake } from "../cmake"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { extractTar } from "@actions/tool-cache"
|
import { extractTar } from "@actions/tool-cache"
|
||||||
import semverLte from "semver/functions/lte"
|
|
||||||
import semverCoerce from "semver/functions/coerce"
|
|
||||||
import { setupBin, PackageInfo, InstallationInfo } from "../utils/setup/setupBin"
|
|
||||||
import { addExeExt } from "patha"
|
import { addExeExt } from "patha"
|
||||||
|
import semverCoerce from "semver/functions/coerce"
|
||||||
|
import semverLte from "semver/functions/lte"
|
||||||
import { extractZip } from "../utils/setup/extract"
|
import { extractZip } from "../utils/setup/extract"
|
||||||
|
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
||||||
|
|
||||||
/** Get the platform data for cmake */
|
/** Get the platform data for cmake */
|
||||||
function getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {
|
function getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {
|
||||||
|
|
|
@ -60,12 +60,12 @@ export async function installCompiler(
|
||||||
case "mingw":
|
case "mingw":
|
||||||
case "cygwin":
|
case "cygwin":
|
||||||
case "msys": {
|
case "msys": {
|
||||||
const gccVersion =
|
const gccVersion = compiler === "mingw"
|
||||||
compiler === "mingw" ? getVersion("mingw", version, osVersion) : getVersion("gcc", version, osVersion)
|
? getVersion("mingw", version, osVersion)
|
||||||
const installationInfo =
|
: getVersion("gcc", version, osVersion)
|
||||||
compiler === "mingw"
|
const installationInfo = compiler === "mingw"
|
||||||
? await setupMingw(gccVersion, join(setupCppDir, "gcc"), arch)
|
? await setupMingw(gccVersion, join(setupCppDir, "gcc"), arch)
|
||||||
: await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch)
|
: await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch)
|
||||||
|
|
||||||
if (hasLLVM) {
|
if (hasLLVM) {
|
||||||
// remove back the added CPPFLAGS of LLVM that include the LLVM headers
|
// remove back the added CPPFLAGS of LLVM that include the LLVM headers
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupConan } from "../conan"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupConan } from "../conan"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-conan", () => {
|
describe("setup-conan", () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupCppcheck } from "../cppcheck"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupCppcheck } from "../cppcheck"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-cppcheck", () => {
|
describe("setup-cppcheck", () => {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {
|
export async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { setupDoxygen } from "../doxygen"
|
|
||||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
|
||||||
import { getVersion } from "../../versions/versions"
|
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
|
||||||
import { macosVersion } from "../../utils/env/macos_version"
|
import { macosVersion } from "../../utils/env/macos_version"
|
||||||
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupDoxygen } from "../doxygen"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-doxygen", () => {
|
describe("setup-doxygen", () => {
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
|
import { info, notice } from "ci-log"
|
||||||
|
import { addExeExt, join } from "patha"
|
||||||
|
import { setupGraphviz } from "../graphviz/graphviz"
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
import { extractTar, extractZip } from "../utils/setup/extract"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { addExeExt, join } from "patha"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
import { extractTar, extractZip } from "../utils/setup/extract"
|
|
||||||
import { info, notice } from "ci-log"
|
|
||||||
import { setupGraphviz } from "../graphviz/graphviz"
|
|
||||||
import { getVersion } from "../versions/versions"
|
import { getVersion } from "../versions/versions"
|
||||||
|
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import retry from "retry-as-promised"
|
import retry from "retry-as-promised"
|
||||||
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { macosVersion } from "../utils/env/macos_version"
|
import { macosVersion } from "../utils/env/macos_version"
|
||||||
|
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
||||||
import { setupDmg } from "../utils/setup/setupDmg"
|
import { setupDmg } from "../utils/setup/setupDmg"
|
||||||
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
|
|
||||||
/** Get the platform data for cmake */
|
/** Get the platform data for cmake */
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
@ -128,11 +128,13 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
|
||||||
async function activateWinDoxygen() {
|
async function activateWinDoxygen() {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
for (const binDir of [
|
for (
|
||||||
"C:/ProgramData/chocolatey/bin",
|
const binDir of [
|
||||||
"C:/Program Files/doxygen/bin",
|
"C:/ProgramData/chocolatey/bin",
|
||||||
"C:/Program Files (x86)/doxygen",
|
"C:/Program Files/doxygen/bin",
|
||||||
]) {
|
"C:/Program Files (x86)/doxygen",
|
||||||
|
]
|
||||||
|
) {
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
if (await pathExists(join(binDir, "doxygen.exe"))) {
|
if (await pathExists(join(binDir, "doxygen.exe"))) {
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { setupGcc } from "../gcc"
|
|
||||||
import { getVersion } from "../../versions/versions"
|
|
||||||
import { join, addExeExt } from "patha"
|
|
||||||
import { execaSync } from "execa"
|
import { execaSync } from "execa"
|
||||||
import { chmodSync } from "fs"
|
import { chmodSync } from "fs"
|
||||||
|
import { addExeExt, join } from "patha"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupGcc } from "../gcc"
|
||||||
|
|
||||||
jest.setTimeout(3000000)
|
jest.setTimeout(3000000)
|
||||||
describe("setup-gcc", () => {
|
describe("setup-gcc", () => {
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
import { addPath, addEnv } from "../utils/env/addEnv"
|
import { addEnv, addPath } from "../utils/env/addEnv"
|
||||||
|
|
||||||
import { setupAptPack, updateAptAlternatives } from "../utils/setup/setupAptPack"
|
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
|
||||||
import semverMajor from "semver/functions/major"
|
|
||||||
import semverCoerce from "semver/functions/coerce"
|
|
||||||
import { setupMacOSSDK } from "../macos-sdk/macos-sdk"
|
|
||||||
import { join, addExeExt } from "patha"
|
|
||||||
import { warning, info } from "ci-log"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
import { info, warning } from "ci-log"
|
||||||
import { extract7Zip } from "../utils/setup/extract"
|
import { ExecaReturnValue } from "execa"
|
||||||
|
import { pathExists } from "path-exists"
|
||||||
|
import { addExeExt, join } from "patha"
|
||||||
|
import semverCoerce from "semver/functions/coerce"
|
||||||
|
import semverMajor from "semver/functions/major"
|
||||||
|
import { setupMacOSSDK } from "../macos-sdk/macos-sdk"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
import { isArch } from "../utils/env/isArch"
|
import { isArch } from "../utils/env/isArch"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
import { extract7Zip } from "../utils/setup/extract"
|
||||||
|
import { setupAptPack, updateAptAlternatives } from "../utils/setup/setupAptPack"
|
||||||
|
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
||||||
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { pathExists } from "path-exists"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
import { ExecaReturnValue } from "execa"
|
|
||||||
|
|
||||||
interface MingwInfo {
|
interface MingwInfo {
|
||||||
releaseName: string
|
releaseName: string
|
||||||
|
@ -69,7 +69,8 @@ function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: str
|
||||||
binFileName: addExeExt("g++"),
|
binFileName: addExeExt("g++"),
|
||||||
extractedFolderName: "mingw64",
|
extractedFolderName: "mingw64",
|
||||||
extractFunction: extract7Zip,
|
extractFunction: extract7Zip,
|
||||||
url: `https://github.com/brechtsanders/winlibs_mingw/releases/download/${mingwInfo.releaseName}/winlibs-${mingwArch}-posix-${exceptionModel}-gcc-${mingwInfo.fileSuffix}.7z`,
|
url:
|
||||||
|
`https://github.com/brechtsanders/winlibs_mingw/releases/download/${mingwInfo.releaseName}/winlibs-${mingwArch}-posix-${exceptionModel}-gcc-${mingwInfo.fileSuffix}.7z`,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -171,11 +172,11 @@ export async function setupMingw(version: string, setupDir: string, arch: string
|
||||||
}
|
}
|
||||||
if (installationInfo !== undefined) {
|
if (installationInfo !== undefined) {
|
||||||
// TODO: setup alternatives and update CC/CXX env. ?
|
// TODO: setup alternatives and update CC/CXX env. ?
|
||||||
//Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...
|
// Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...
|
||||||
// update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode
|
// update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode
|
||||||
//Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...
|
// Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...
|
||||||
// update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode
|
// update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode
|
||||||
//await activateGcc(version, installationInfo.binDir)
|
// await activateGcc(version, installationInfo.binDir)
|
||||||
return installationInfo
|
return installationInfo
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupGcovr } from "../gcovr"
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
import { setupGcovr } from "../gcovr"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-gcovr", () => {
|
describe("setup-gcovr", () => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import semverMajor from "semver/functions/major"
|
||||||
|
import semverValid from "semver/functions/valid"
|
||||||
import { addEnv } from "../utils/env/addEnv"
|
import { addEnv } from "../utils/env/addEnv"
|
||||||
import { setupPipPack } from "../utils/setup/setupPipPack"
|
import { setupPipPack } from "../utils/setup/setupPipPack"
|
||||||
import semverValid from "semver/functions/valid"
|
|
||||||
import semverMajor from "semver/functions/major"
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {
|
export function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { setupGraphviz } from "../graphviz"
|
|
||||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
|
||||||
import { getVersion } from "../../versions/versions"
|
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
|
||||||
import { macosVersion } from "../../utils/env/macos_version"
|
import { macosVersion } from "../../utils/env/macos_version"
|
||||||
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupGraphviz } from "../graphviz"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-graphviz", () => {
|
describe("setup-graphviz", () => {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { InstallationInfo } from "../utils/setup/setupBin"
|
import { InstallationInfo } from "../utils/setup/setupBin"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupGraphviz(version: string, _setupDir: string, _arch: string) {
|
export async function setupGraphviz(version: string, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { endGroup, startGroup } from "@actions/core"
|
import { endGroup, startGroup } from "@actions/core"
|
||||||
import { error } from "ci-log"
|
import { error } from "ci-log"
|
||||||
|
import pTimeout from "p-timeout"
|
||||||
import { join } from "patha"
|
import { join } from "patha"
|
||||||
import { getSuccessMessage } from "./cli-options"
|
import { getSuccessMessage } from "./cli-options"
|
||||||
|
import { setups, ToolName } from "./tool"
|
||||||
import { InstallationInfo } from "./utils/setup/setupBin"
|
import { InstallationInfo } from "./utils/setup/setupBin"
|
||||||
import { setupVCVarsall } from "./vcvarsall/vcvarsall"
|
import { setupVCVarsall } from "./vcvarsall/vcvarsall"
|
||||||
import { getVersion } from "./versions/versions"
|
import { getVersion } from "./versions/versions"
|
||||||
import pTimeout from "p-timeout"
|
|
||||||
import { ToolName, setups } from "./tool"
|
|
||||||
|
|
||||||
export const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes
|
export const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { setupKcov } from "../kcov"
|
|
||||||
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
|
||||||
import which from "which"
|
|
||||||
import { info } from "@actions/core"
|
import { info } from "@actions/core"
|
||||||
|
import which from "which"
|
||||||
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupKcov } from "../kcov"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-Kcov", () => {
|
describe("setup-Kcov", () => {
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
|
import { info } from "ci-log"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
import { join, addExeExt } from "patha"
|
import { addExeExt, join } from "patha"
|
||||||
|
import { untildifyUser } from "untildify-user"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { setupCmake } from "../cmake/cmake"
|
import { setupCmake } from "../cmake/cmake"
|
||||||
import { getVersion } from "../versions/versions"
|
import { setupNinja } from "../ninja/ninja"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
|
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
||||||
import { extractTarByExe } from "../utils/setup/extract"
|
import { extractTarByExe } from "../utils/setup/extract"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
import { addVPrefix, removeVPrefix } from "../utils/setup/version"
|
import { addVPrefix, removeVPrefix } from "../utils/setup/version"
|
||||||
import { info } from "ci-log"
|
import { getVersion } from "../versions/versions"
|
||||||
import { untildifyUser } from "untildify-user"
|
|
||||||
import { setupNinja } from "../ninja/ninja"
|
|
||||||
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
|
||||||
|
|
||||||
function getDownloadKcovPackageInfo(version: string): PackageInfo {
|
function getDownloadKcovPackageInfo(version: string): PackageInfo {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { setupLLVM, setupClangTools, setupClangFormat } from "../llvm"
|
|
||||||
import { getSpecificVersionAndUrl } from "../../utils/setup/version"
|
|
||||||
import { isUrlOnline } from "is-url-online"
|
|
||||||
import { setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { execaSync } from "execa"
|
|
||||||
import path, { addExeExt } from "patha"
|
|
||||||
import { chmodSync } from "fs"
|
|
||||||
import { getVersion } from "../../versions/versions"
|
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
|
||||||
import * as io from "@actions/io"
|
import * as io from "@actions/io"
|
||||||
|
import { execaSync } from "execa"
|
||||||
|
import { chmodSync } from "fs"
|
||||||
|
import { isUrlOnline } from "is-url-online"
|
||||||
|
import path, { addExeExt } from "patha"
|
||||||
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
|
import { getSpecificVersionAndUrl } from "../../utils/setup/version"
|
||||||
|
import { setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupClangFormat, setupClangTools, setupLLVM } from "../llvm"
|
||||||
import { getLinuxUrl, getUrl, VERSIONS } from "../llvm_url"
|
import { getLinuxUrl, getUrl, VERSIONS } from "../llvm_url"
|
||||||
|
|
||||||
jest.setTimeout(400000)
|
jest.setTimeout(400000)
|
||||||
|
@ -27,24 +27,33 @@ describe("setup-llvm", () => {
|
||||||
|
|
||||||
it("Finds URL for ubuntu version", async () => {
|
it("Finds URL for ubuntu version", async () => {
|
||||||
expect(
|
expect(
|
||||||
await getSpecificVersionAndUrl(VERSIONS, "linux", "13.0.0-ubuntu-16.04", (_plantform, version) =>
|
await getSpecificVersionAndUrl(
|
||||||
getLinuxUrl(version),
|
VERSIONS,
|
||||||
|
"linux",
|
||||||
|
"13.0.0-ubuntu-16.04",
|
||||||
|
(_plantform, version) => getLinuxUrl(version),
|
||||||
),
|
),
|
||||||
).toStrictEqual([
|
).toStrictEqual([
|
||||||
"13.0.0-ubuntu-16.04",
|
"13.0.0-ubuntu-16.04",
|
||||||
"https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz",
|
"https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz",
|
||||||
])
|
])
|
||||||
expect(
|
expect(
|
||||||
await getSpecificVersionAndUrl(VERSIONS, "linux", "13.0.1-ubuntu-18.04", (_plantform, version) =>
|
await getSpecificVersionAndUrl(
|
||||||
getLinuxUrl(version),
|
VERSIONS,
|
||||||
|
"linux",
|
||||||
|
"13.0.1-ubuntu-18.04",
|
||||||
|
(_plantform, version) => getLinuxUrl(version),
|
||||||
),
|
),
|
||||||
).toStrictEqual([
|
).toStrictEqual([
|
||||||
"13.0.1-ubuntu-18.04",
|
"13.0.1-ubuntu-18.04",
|
||||||
"https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04.tar.xz",
|
"https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04.tar.xz",
|
||||||
])
|
])
|
||||||
expect(
|
expect(
|
||||||
await getSpecificVersionAndUrl(VERSIONS, "linux", "13.0.0-ubuntu-20.04", (_plantform, version) =>
|
await getSpecificVersionAndUrl(
|
||||||
getLinuxUrl(version),
|
VERSIONS,
|
||||||
|
"linux",
|
||||||
|
"13.0.0-ubuntu-20.04",
|
||||||
|
(_plantform, version) => getLinuxUrl(version),
|
||||||
),
|
),
|
||||||
).toStrictEqual([
|
).toStrictEqual([
|
||||||
"13.0.0-ubuntu-20.04",
|
"13.0.0-ubuntu-20.04",
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { execRoot } from "admina"
|
import { execRoot } from "admina"
|
||||||
|
import { info } from "console"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
|
import { promises } from "fs"
|
||||||
|
import { DEFAULT_TIMEOUT } from "../installTool"
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
import { hasNala, isPackageInstalled, setupAptPack } from "../utils/setup/setupAptPack"
|
import { hasNala, isPackageInstalled, setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { InstallationInfo } from "../utils/setup/setupBin"
|
import { InstallationInfo } from "../utils/setup/setupBin"
|
||||||
import { promises } from "fs"
|
|
||||||
import { info } from "console"
|
|
||||||
import { DEFAULT_TIMEOUT } from "../installTool"
|
|
||||||
const { readFile, writeFile, chmod } = promises
|
const { readFile, writeFile, chmod } = promises
|
||||||
|
|
||||||
export enum LLVMPackages {
|
export enum LLVMPackages {
|
||||||
|
@ -72,7 +72,7 @@ function nonInteractiveScript(script: string) {
|
||||||
return script.replace(
|
return script.replace(
|
||||||
/add-apt-repository "\${REPO_NAME}"/g,
|
/add-apt-repository "\${REPO_NAME}"/g,
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
'add-apt-repository -y "${REPO_NAME}"',
|
"add-apt-repository -y \"${REPO_NAME}\"",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ async function removeConflictingPackages(givenScript: string) {
|
||||||
// fix conflicts between libclang-rt and libclang
|
// fix conflicts between libclang-rt and libclang
|
||||||
let script = givenScript.replace(
|
let script = givenScript.replace(
|
||||||
/apt-get install -y/g,
|
/apt-get install -y/g,
|
||||||
'apt-get install -o Dpkg::Options::="--force-overwrite" -y --fix-broken',
|
"apt-get install -o Dpkg::Options::=\"--force-overwrite\" -y --fix-broken",
|
||||||
)
|
)
|
||||||
|
|
||||||
// check if these are installed and if so, remove them from the script as they conflict
|
// check if these are installed and if so, remove them from the script as they conflict
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import semverLte from "semver/functions/lte"
|
|
||||||
import { isUrlOnline } from "is-url-online"
|
|
||||||
import { getSpecificVersionAndUrl, getSpecificVersions, getVersions } from "../utils/setup/version"
|
|
||||||
import { info, warning } from "ci-log"
|
import { info, warning } from "ci-log"
|
||||||
import { PackageInfo } from "../utils/setup/setupBin"
|
import { isUrlOnline } from "is-url-online"
|
||||||
import { addExeExt } from "patha"
|
import { addExeExt } from "patha"
|
||||||
|
import semverLte from "semver/functions/lte"
|
||||||
import { extractExe, extractTarByExe } from "../utils/setup/extract"
|
import { extractExe, extractTarByExe } from "../utils/setup/extract"
|
||||||
|
import { PackageInfo } from "../utils/setup/setupBin"
|
||||||
|
import { getSpecificVersionAndUrl, getSpecificVersions, getVersions } from "../utils/setup/version"
|
||||||
|
|
||||||
//================================================
|
// ================================================
|
||||||
// Version
|
// Version
|
||||||
//================================================
|
// ================================================
|
||||||
|
|
||||||
/** The specific and minimum LLVM versions supported by this action. */
|
/** The specific and minimum LLVM versions supported by this action. */
|
||||||
export const VERSIONS: Set<string> = getVersions([
|
export const VERSIONS: Set<string> = getVersions([
|
||||||
|
@ -189,9 +189,9 @@ const UBUNTU_SUFFIX_MAP: { [key: string]: string } = {
|
||||||
/** The latest supported LLVM version for the Linux (Ubuntu) platform. */
|
/** The latest supported LLVM version for the Linux (Ubuntu) platform. */
|
||||||
const MAX_UBUNTU: string = "17.0.6"
|
const MAX_UBUNTU: string = "17.0.6"
|
||||||
|
|
||||||
//================================================
|
// ================================================
|
||||||
// URL
|
// URL
|
||||||
//================================================
|
// ================================================
|
||||||
|
|
||||||
/** Gets a LLVM download URL for GitHub. */
|
/** Gets a LLVM download URL for GitHub. */
|
||||||
function getGitHubUrl(version: string, prefix: string, suffix: string): string {
|
function getGitHubUrl(version: string, prefix: string, suffix: string): string {
|
||||||
|
@ -317,11 +317,10 @@ export async function getLLVMPackageInfo(
|
||||||
extractedFolderName: "",
|
extractedFolderName: "",
|
||||||
binRelativeDir: "bin",
|
binRelativeDir: "bin",
|
||||||
binFileName: addExeExt("clang"),
|
binFileName: addExeExt("clang"),
|
||||||
extractFunction:
|
extractFunction: platform === "win32"
|
||||||
platform === "win32"
|
? extractExe
|
||||||
? extractExe
|
: (file: string, dest: string) => {
|
||||||
: (file: string, dest: string) => {
|
return extractTarByExe(file, dest, ["--strip-components=1"])
|
||||||
return extractTarByExe(file, dest, ["--strip-components=1"])
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { getExecOutput } from "@actions/exec"
|
import { getExecOutput } from "@actions/exec"
|
||||||
import { addEnv } from "../utils/env/addEnv"
|
|
||||||
import { error } from "ci-log"
|
import { error } from "ci-log"
|
||||||
|
import { addEnv } from "../utils/env/addEnv"
|
||||||
|
|
||||||
export async function setupMacOSSDK() {
|
export async function setupMacOSSDK() {
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
|
|
|
@ -11,13 +11,13 @@ import { untildifyUser } from "untildify-user"
|
||||||
import { checkUpdates } from "./check-updates"
|
import { checkUpdates } from "./check-updates"
|
||||||
import { parseArgs, printHelp } from "./cli-options"
|
import { parseArgs, printHelp } from "./cli-options"
|
||||||
import { installCompiler } from "./compilers"
|
import { installCompiler } from "./compilers"
|
||||||
|
import { installTool } from "./installTool"
|
||||||
|
import { tools } from "./tool"
|
||||||
import { finalizeCpprc } from "./utils/env/addEnv"
|
import { finalizeCpprc } from "./utils/env/addEnv"
|
||||||
import { isArch } from "./utils/env/isArch"
|
import { isArch } from "./utils/env/isArch"
|
||||||
import { ubuntuVersion } from "./utils/env/ubuntu_version"
|
import { ubuntuVersion } from "./utils/env/ubuntu_version"
|
||||||
import { setupPacmanPack } from "./utils/setup/setupPacmanPack"
|
import { setupPacmanPack } from "./utils/setup/setupPacmanPack"
|
||||||
import { syncVersions } from "./versions/versions"
|
import { syncVersions } from "./versions/versions"
|
||||||
import { installTool } from "./installTool"
|
|
||||||
import { tools } from "./tool"
|
|
||||||
|
|
||||||
/** The main entry function */
|
/** The main entry function */
|
||||||
async function main(args: string[]): Promise<number> {
|
async function main(args: string[]): Promise<number> {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupMake } from "../make"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupMake } from "../make"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-make", () => {
|
describe("setup-make", () => {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupMake(version: string, _setupDir: string, _arch: string) {
|
export async function setupMake(version: string, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupMeson } from "../meson"
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
import { setupMeson } from "../meson"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-meson", () => {
|
describe("setup-meson", () => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import which from "which"
|
|
||||||
import { setupMSVC } from "../msvc"
|
|
||||||
import { runnerWindowsVersion } from "../../utils/tests/test-helpers"
|
|
||||||
import { warning } from "ci-log"
|
import { warning } from "ci-log"
|
||||||
|
import which from "which"
|
||||||
|
import { runnerWindowsVersion } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupMSVC } from "../msvc"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-msvc", () => {
|
describe("setup-msvc", () => {
|
||||||
|
|
|
@ -2,8 +2,8 @@ import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { setupVCVarsall } from "../vcvarsall/vcvarsall"
|
import { setupVCVarsall } from "../vcvarsall/vcvarsall"
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { vsversion_to_versionnumber, findVcvarsall } from "msvc-dev-cmd/lib.js"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
|
import { findVcvarsall, vsversion_to_versionnumber } from "msvc-dev-cmd/lib.js"
|
||||||
import { join } from "patha"
|
import { join } from "patha"
|
||||||
|
|
||||||
import { error, info, warning } from "ci-log"
|
import { error, info, warning } from "ci-log"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupNala } from "../nala"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { isUbuntu } from "../../utils/env/isUbuntu"
|
|
||||||
import { execRootSync } from "admina"
|
import { execRootSync } from "admina"
|
||||||
|
import { isUbuntu } from "../../utils/env/isUbuntu"
|
||||||
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupNala } from "../nala"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-nala", () => {
|
describe("setup-nala", () => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import { execRootSync } from "admina"
|
||||||
import { dirname } from "patha"
|
import { dirname } from "patha"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { execRootSync } from "admina"
|
|
||||||
import { addAptKeyViaDownload, hasNala, setupAptPack } from "../utils/setup/setupAptPack"
|
import { addAptKeyViaDownload, hasNala, setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
|
|
||||||
let binDir: string | undefined
|
let binDir: string | undefined
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupNinja } from "../ninja"
|
|
||||||
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupNinja } from "../ninja"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
async function testNinja(directory: string) {
|
async function testNinja(directory: string) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { addExeExt } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { extractZip } from "../utils/setup/extract"
|
import { extractZip } from "../utils/setup/extract"
|
||||||
import { setupBin, PackageInfo, InstallationInfo } from "../utils/setup/setupBin"
|
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
||||||
|
|
||||||
/** Get the platform name Ninja uses in their download links */
|
/** Get the platform name Ninja uses in their download links */
|
||||||
function getNinjaPlatform(platform: NodeJS.Platform) {
|
function getNinjaPlatform(platform: NodeJS.Platform) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { setupOpencppcoverage } from "../opencppcoverage"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupOpencppcoverage } from "../opencppcoverage"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-OpenCppCoverage", () => {
|
describe("setup-OpenCppCoverage", () => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupPowershell } from "../powershell"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { setupPowershell } from "../powershell"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-powershell", () => {
|
describe("setup-powershell", () => {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
|
import { execRootSync } from "admina"
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
|
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
import { execRootSync } from "admina"
|
|
||||||
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupPowershell(version: string | undefined, _setupDir: string, _arch: string) {
|
export async function setupPowershell(version: string | undefined, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { setupPython } from "../python"
|
|
||||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { getVersion } from "../../versions/versions"
|
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { info } from "ci-log"
|
import { info } from "ci-log"
|
||||||
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupPython } from "../python"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-python", () => {
|
describe("setup-python", () => {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { useCpythonVersion } from "setup-python/src/find-python"
|
|
||||||
import { findPyPyVersion } from "setup-python/src/find-pypy"
|
import { findPyPyVersion } from "setup-python/src/find-pypy"
|
||||||
|
import { useCpythonVersion } from "setup-python/src/find-python"
|
||||||
|
|
||||||
import { info, warning } from "ci-log"
|
|
||||||
import { debug } from "@actions/core"
|
import { debug } from "@actions/core"
|
||||||
import { join } from "patha"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { IS_MAC } from "setup-python/src/utils"
|
import { info, warning } from "ci-log"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
|
import { join } from "patha"
|
||||||
|
import { IS_MAC } from "setup-python/src/utils"
|
||||||
|
|
||||||
function isPyPyVersion(versionSpec: string) {
|
function isPyPyVersion(versionSpec: string) {
|
||||||
return versionSpec.startsWith("pypy")
|
return versionSpec.startsWith("pypy")
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { info, warning } from "ci-log"
|
import { info, warning } from "ci-log"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
import memoize from "micro-memoize"
|
import memoize from "micro-memoize"
|
||||||
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, dirname, join } from "patha"
|
import { addExeExt, dirname, join } from "patha"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { addPath } from "../utils/env/addEnv"
|
import { addPath } from "../utils/env/addEnv"
|
||||||
|
@ -17,11 +18,10 @@ import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
|
import { hasPipx, setupPipPackSystem, setupPipPackWithPython } from "../utils/setup/setupPipPack"
|
||||||
import { isBinUptoDate } from "../utils/setup/version"
|
import { isBinUptoDate } from "../utils/setup/version"
|
||||||
import { unique } from "../utils/std"
|
import { unique } from "../utils/std"
|
||||||
import { MinVersions } from "../versions/default_versions"
|
import { MinVersions } from "../versions/default_versions"
|
||||||
import { pathExists } from "path-exists"
|
|
||||||
import { hasPipx, setupPipPackSystem, setupPipPackWithPython } from "../utils/setup/setupPipPack"
|
|
||||||
|
|
||||||
export async function setupPython(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
export async function setupPython(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
||||||
const installInfo = await findOrSetupPython(version, setupDir, arch)
|
const installInfo = await findOrSetupPython(version, setupDir, arch)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupSccache } from "../sccache"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupSccache } from "../sccache"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-sccache", () => {
|
describe("setup-sccache", () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { setupSevenZip } from "../sevenzip"
|
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||||
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { setupSevenZip } from "../sevenzip"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-7z", () => {
|
describe("setup-7z", () => {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
import { hasDnf } from "../utils/env/hasDnf"
|
||||||
|
import { isArch } from "../utils/env/isArch"
|
||||||
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import { isArch } from "../utils/env/isArch"
|
|
||||||
import { hasDnf } from "../utils/env/hasDnf"
|
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function setupSevenZip(version: string, _setupDir: string, _arch: string) {
|
export function setupSevenZip(version: string, _setupDir: string, _arch: string) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { setupTask } from "../task"
|
|
||||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
|
||||||
import { getVersion } from "../../versions/versions"
|
import { getVersion } from "../../versions/versions"
|
||||||
|
import { setupTask } from "../task"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-task", () => {
|
describe("setup-task", () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { addExeExt } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { extractTarByExe, extractZip } from "../utils/setup/extract"
|
import { extractTarByExe, extractZip } from "../utils/setup/extract"
|
||||||
import { setupBin, PackageInfo, InstallationInfo } from "../utils/setup/setupBin"
|
import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin"
|
||||||
|
|
||||||
/** Get the platform name task uses in their download links */
|
/** Get the platform name task uses in their download links */
|
||||||
function getTaskPlatform(platform: NodeJS.Platform) {
|
function getTaskPlatform(platform: NodeJS.Platform) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { setupGcc } from "./gcc/gcc"
|
||||||
import { setupGcovr } from "./gcovr/gcovr"
|
import { setupGcovr } from "./gcovr/gcovr"
|
||||||
import { setupGraphviz } from "./graphviz/graphviz"
|
import { setupGraphviz } from "./graphviz/graphviz"
|
||||||
import { setupKcov } from "./kcov/kcov"
|
import { setupKcov } from "./kcov/kcov"
|
||||||
import { setupClangTools, setupLLVM, setupClangFormat } from "./llvm/llvm"
|
import { setupClangFormat, setupClangTools, setupLLVM } from "./llvm/llvm"
|
||||||
import { setupMake } from "./make/make"
|
import { setupMake } from "./make/make"
|
||||||
import { setupMeson } from "./meson/meson"
|
import { setupMeson } from "./meson/meson"
|
||||||
import { setupMSVC } from "./msvc/msvc"
|
import { setupMSVC } from "./msvc/msvc"
|
||||||
|
|
|
@ -29,11 +29,10 @@ export const {
|
||||||
} = fs.promises
|
} = fs.promises
|
||||||
|
|
||||||
import { promisify } from "util"
|
import { promisify } from "util"
|
||||||
export const rm =
|
export const rm = "rm" in fs.promises
|
||||||
"rm" in fs.promises
|
? (
|
||||||
? (
|
fs.promises as typeof fs.promises & {
|
||||||
fs.promises as typeof fs.promises & {
|
rm: (path: string, options?: fs.RmDirOptions) => Promise<void>
|
||||||
rm: (path: string, options?: fs.RmDirOptions) => Promise<void>
|
}
|
||||||
}
|
).rm
|
||||||
).rm
|
: promisify(fs.unlink)
|
||||||
: promisify(fs.unlink)
|
|
||||||
|
|
|
@ -4,12 +4,10 @@
|
||||||
import * as stream from "stream"
|
import * as stream from "stream"
|
||||||
import { promisify } from "util"
|
import { promisify } from "util"
|
||||||
|
|
||||||
export const pipeline =
|
export const pipeline = "promises" in stream && "pipeline" in (stream as any).promises
|
||||||
"promises" in stream && "pipeline" in (stream as any).promises
|
? ((stream.promises as any).pipeline as Function)
|
||||||
? ((stream.promises as any).pipeline as Function)
|
: promisify(stream.pipeline)
|
||||||
: promisify(stream.pipeline)
|
|
||||||
|
|
||||||
export const finished =
|
export const finished = "promises" in stream && "finished" in (stream as any).promises
|
||||||
"promises" in stream && "finished" in (stream as any).promises
|
? ((stream.promises as any).finished as Function)
|
||||||
? ((stream.promises as any).finished as Function)
|
: promisify(stream.finished)
|
||||||
: promisify(stream.finished)
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue