mirror of https://github.com/aminya/setup-cpp
fix: rename the built executables to include architecture and use -
BREAKING CHANGE the built executables are now renamed to include the architecture. See the readme for more information
This commit is contained in:
parent
477360fbee
commit
c41d430d6b
|
@ -103,9 +103,9 @@ jobs:
|
||||||
gzip: folders
|
gzip: folders
|
||||||
draft: true
|
draft: true
|
||||||
files: >
|
files: >
|
||||||
./exe/setup_cpp_windows.exe
|
./exe/setup-cpp-x64-windows.exe
|
||||||
./exe/setup_cpp_linux
|
./exe/setup-cpp-x64-linux
|
||||||
./exe/setup_cpp_mac
|
./exe/setup-cpp-x64-macos
|
||||||
./dist/node12/setup-cpp.js
|
./dist/node12/setup-cpp.js
|
||||||
./dist/node12/setup-cpp.js.map
|
./dist/node12/setup-cpp.js.map
|
||||||
./dist/node12/
|
./dist/node12/
|
||||||
|
|
32
README.md
32
README.md
|
@ -41,27 +41,27 @@ Download the executable for your platform from [here](https://github.com/aminya/
|
||||||
An example that installs llvm, cmake, ninja, ccache, and vcpkg:
|
An example that installs llvm, cmake, ninja, ccache, and vcpkg:
|
||||||
|
|
||||||
```ps1
|
```ps1
|
||||||
# windows example (open shell as admin)
|
# windows example (open PowerShell as admin)
|
||||||
curl.exe -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_windows.exe"
|
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-windows.exe"
|
||||||
.\setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
./setup-cpp-x64-windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||||
|
|
||||||
RefreshEnv.cmd # activate cpp environment variables
|
RefreshEnv.cmd # activate cpp environment variables
|
||||||
```
|
```
|
||||||
|
|
||||||
```ps1
|
```ps1
|
||||||
# linux example
|
# linux example
|
||||||
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_linux"
|
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-linux"
|
||||||
chmod +x setup_cpp_linux
|
chmod +x ./setup-cpp-x64-linux
|
||||||
sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||||
|
|
||||||
source ~/.cpprc # activate cpp environment variables
|
source ~/.cpprc # activate cpp environment variables
|
||||||
```
|
```
|
||||||
|
|
||||||
```ps1
|
```ps1
|
||||||
# mac example
|
# macos example
|
||||||
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_mac"
|
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-macos"
|
||||||
chmod +x setup_cpp_mac
|
chmod +x ./setup-cpp-x64-macos
|
||||||
sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
sudo ./setup-cpp-x64-macos --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
|
||||||
|
|
||||||
source ~/.cpprc # activate cpp environment variables
|
source ~/.cpprc # activate cpp environment variables
|
||||||
```
|
```
|
||||||
|
@ -170,11 +170,11 @@ FROM ubuntu:22.04 AS base
|
||||||
WORKDIR "/"
|
WORKDIR "/"
|
||||||
RUN apt-get update -qq
|
RUN apt-get update -qq
|
||||||
RUN apt-get install -y --no-install-recommends wget
|
RUN apt-get install -y --no-install-recommends wget
|
||||||
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_linux"
|
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-linux"
|
||||||
RUN chmod +x ./setup_cpp_linux
|
RUN chmod +x ./setup-cpp-x64-linux
|
||||||
|
|
||||||
# install llvm, cmake, ninja, and ccache
|
# install llvm, cmake, ninja, and ccache
|
||||||
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
|
RUN ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --make true
|
||||||
|
|
||||||
CMD source ~/.cpprc
|
CMD source ~/.cpprc
|
||||||
ENTRYPOINT [ "/bin/bash" ]
|
ENTRYPOINT [ "/bin/bash" ]
|
||||||
|
@ -262,9 +262,9 @@ stages:
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
|
||||||
|
|
||||||
.setup-cpp: &setup-cpp |
|
.setup-cpp: &setup-cpp |
|
||||||
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_linux"
|
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-linux"
|
||||||
chmod +x setup_cpp_linux
|
chmod +x setup-cpp-x64-linux
|
||||||
./setup_cpp_linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
|
./setup-cpp-x64-linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
|
||||||
source ~/.cpprc
|
source ~/.cpprc
|
||||||
|
|
||||||
.test: &test |
|
.test: &test |
|
||||||
|
|
|
@ -5,11 +5,11 @@ FROM ubuntu:22.04 AS base
|
||||||
WORKDIR "/"
|
WORKDIR "/"
|
||||||
RUN apt-get update -qq
|
RUN apt-get update -qq
|
||||||
RUN apt-get install -y --no-install-recommends wget
|
RUN apt-get install -y --no-install-recommends wget
|
||||||
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_linux"
|
RUN wget --no-verbose "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-linux"
|
||||||
RUN chmod +x ./setup_cpp_linux
|
RUN chmod +x ./setup-cpp-x64-linux
|
||||||
|
|
||||||
# install llvm, cmake, ninja, and ccache
|
# install llvm, cmake, ninja, and ccache
|
||||||
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
|
RUN ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --task true
|
||||||
|
|
||||||
CMD source ~/.cpprc
|
CMD source ~/.cpprc
|
||||||
ENTRYPOINT [ "/bin/bash" ]
|
ENTRYPOINT [ "/bin/bash" ]
|
||||||
|
|
|
@ -7,7 +7,7 @@ function getPlatformName() {
|
||||||
return "windows"
|
return "windows"
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
return "mac"
|
return "macos"
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
return process.platform
|
return process.platform
|
||||||
|
@ -31,7 +31,7 @@ function main() {
|
||||||
"--input",
|
"--input",
|
||||||
"./dist/node16",
|
"./dist/node16",
|
||||||
"--output",
|
"--output",
|
||||||
`./exe/setup_cpp_${getPlatformName()}${exe}`,
|
`./exe/setup-cpp-${process.arch}-${getPlatformName()}${exe}`,
|
||||||
"--",
|
"--",
|
||||||
`{{caxa}}/node_modules/.bin/node${exe}`,
|
`{{caxa}}/node_modules/.bin/node${exe}`,
|
||||||
`{{caxa}}/setup-cpp.js`,
|
`{{caxa}}/setup-cpp.js`,
|
||||||
|
|
Loading…
Reference in New Issue