Skip to content

Commit

Permalink
fix: rename the built executables to include architecture and use -
Browse files Browse the repository at this point in the history
BREAKING CHANGE the built executables are now renamed to include the architecture. See the readme for more information
  • Loading branch information
aminya committed Jan 18, 2023
1 parent 477360f commit c41d430
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ jobs:
gzip: folders
draft: true
files: >
./exe/setup_cpp_windows.exe
./exe/setup_cpp_linux
./exe/setup_cpp_mac
./exe/setup-cpp-x64-windows.exe
./exe/setup-cpp-x64-linux
./exe/setup-cpp-x64-macos
./dist/node12/setup-cpp.js
./dist/node12/setup-cpp.js.map
./dist/node12/
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```ps1
# windows example (open shell as admin)
curl.exe -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_windows.exe"
.\setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
# windows example (open PowerShell as admin)
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-windows.exe"
./setup-cpp-x64-windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
RefreshEnv.cmd # activate cpp environment variables
```

```ps1
# linux example
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_linux"
chmod +x setup_cpp_linux
sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-linux"
chmod +x ./setup-cpp-x64-linux
sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
source ~/.cpprc # activate cpp environment variables
```

```ps1
# mac example
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_mac"
chmod +x setup_cpp_mac
sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
# macos example
wget "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-macos"
chmod +x ./setup-cpp-x64-macos
sudo ./setup-cpp-x64-macos --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
source ~/.cpprc # activate cpp environment variables
```
Expand Down Expand Up @@ -170,11 +170,11 @@ FROM ubuntu:22.04 AS base
WORKDIR "/"
RUN apt-get update -qq
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 chmod +x ./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-x64-linux

# 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
ENTRYPOINT [ "/bin/bash" ]
Expand Down Expand Up @@ -262,9 +262,9 @@ stages:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F

.setup-cpp: &setup-cpp |
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup_cpp_linux"
chmod +x setup_cpp_linux
./setup_cpp_linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.25.1/setup-cpp-x64-linux"
chmod +x setup-cpp-x64-linux
./setup-cpp-x64-linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
source ~/.cpprc

.test: &test |
Expand Down
6 changes: 3 additions & 3 deletions dev/docker/ubuntu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ FROM ubuntu:22.04 AS base
WORKDIR "/"
RUN apt-get update -qq
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 chmod +x ./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-x64-linux

# 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
ENTRYPOINT [ "/bin/bash" ]
Expand Down
4 changes: 2 additions & 2 deletions dev/scripts/pack-exe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getPlatformName() {
return "windows"
}
case "darwin": {
return "mac"
return "macos"
}
default: {
return process.platform
Expand All @@ -31,7 +31,7 @@ function main() {
"--input",
"./dist/node16",
"--output",
`./exe/setup_cpp_${getPlatformName()}${exe}`,
`./exe/setup-cpp-${process.arch}-${getPlatformName()}${exe}`,
"--",
`{{caxa}}/node_modules/.bin/node${exe}`,
`{{caxa}}/setup-cpp.js`,
Expand Down

0 comments on commit c41d430

Please sign in to comment.