@@ -40,47 +40,50 @@ Tip: You can automate downloading using `wget`, `curl` or other similar tools.
40
40
41
41
### Executable
42
42
43
- Download the executable for your platform from [ here] ( https://github.com/aminya/setup-cpp/releases/tag/v0.1.1 ) , and run it with the available options.
43
+ Download the executable for your platform from [ here] ( https://github.com/aminya/setup-cpp/releases/tag/v0.2 ) , and run it with the available options.
44
44
45
- An example that installs llvm, cmake, ninja, ccache, and conan.
45
+ An example that installs llvm, cmake, ninja, ccache, and conan:
46
46
47
47
``` ps1
48
48
# windows example (open shell as admin)
49
- curl -O "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp_windows.exe"
50
- ./setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
49
+ curl -O "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp_windows.exe"
50
+ ./setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --conan true
51
51
```
52
52
53
53
``` ps1
54
54
# linux example
55
- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp_linux"
55
+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp_linux"
56
56
chmod +x setup_cpp_linux
57
- sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
57
+ sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --conan true
58
58
```
59
59
60
60
``` ps1
61
61
# mac example
62
- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_mac_linux"
62
+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_mac_linux"
63
63
chmod +x setup_cpp_mac
64
- sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
64
+ sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --conan true
65
65
```
66
66
67
+ NOTE: In the ` compiler ` entry, you can specify the version after ` - ` like ` llvm-11 ` .
68
+ For the tools, instead of ` true ` , which chooses the default version, you can pass a specific version.
69
+
67
70
### With Nodejs
68
71
69
- Download the ` setup_cpp.js ` file form [ here] ( https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp.js ) , and run it with the available options.
72
+ Download the ` setup_cpp.js ` file form [ here] ( https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp.js ) , and run it with the available options.
70
73
71
74
On Windows
72
75
73
76
``` ps1
74
77
# open shell as admin
75
- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp_windows.exe"
76
- node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
78
+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp_windows.exe"
79
+ node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
77
80
```
78
81
79
82
On Linux or Mac:
80
83
81
84
``` ps1
82
- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp.js"
83
- sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
85
+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp.js"
86
+ sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
84
87
```
85
88
86
89
# Inside GitHub Actions
@@ -111,6 +114,7 @@ jobs:
111
114
compiler :
112
115
- llvm
113
116
- gcc
117
+ # you can specify the version after `-` like `llvm-11`.
114
118
steps :
115
119
- name : Setup Cpp
116
120
uses : aminya/setup-cpp@v1
@@ -120,40 +124,39 @@ jobs:
120
124
ninja : true
121
125
conan : true
122
126
cppcheck : true
123
- ccache : true
127
+ ccache : true # instead of `true`, which chooses the default version, you can pass a specific version.
124
128
# add any tool that you need here...
125
129
```
126
130
127
- In the ` compiler ` entry, you can specify the version after a ` - ` . For example, ` llvm-11 ` .
128
-
129
- For the tools, instead of ` true ` , which chooses the default version, you can pass a specific version.
130
-
131
131
# Inside Docker
132
132
133
133
Here is an example for using setup_cpp to make a builder image that has the cpp tools you need.
134
134
135
135
``` dockerfile
136
- # debian with node installed
137
- FROM node:16
136
+ # debian
137
+ FROM debian:bullseye
138
138
139
- # add setup_cpp.js
139
+ # add setup_cpp
140
140
WORKDIR "/"
141
- RUN wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1/setup_cpp.js"
141
+ RUN wget "https://github.com/aminya/setup-cpp/releases/download/v0.2/setup_cpp_linux"
142
+ RUN chmod +x ./setup_cpp_linux
142
143
143
144
# install llvm, cmake, ninja, ccache, and conan
144
- RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
145
+ RUN ./setup_cpp --compiler llvm --cmake true --ninja true --ccache true --conan true
145
146
146
147
ENTRYPOINT [ "/bin/bash" ]
147
148
```
148
149
149
150
See [ this folder] ( https://github.com/aminya/setup-cpp/tree/master/building/docker ) , for some dockerfile examples.
150
151
151
- If you want to build the ones included, then run (after ` -f ` use the docker file name) :
152
+ If you want to build the ones included, then run:
152
153
153
154
``` ps1
154
- docker build -f ./building/docker/linux .dockerfile -t setup_cpp .
155
+ docker build -f ./building/docker/debian .dockerfile -t setup_cpp .
155
156
```
156
157
158
+ After ` -f ` use the docker file name.
159
+
157
160
### Incomplete
158
161
159
162
- [ ] msvc. It is implemented, but has bugs. See [ this issue] ( https://github.com/aminya/cpp/issues/1 )
0 commit comments