|
| 1 | +# setup-cpp |
| 2 | + |
| 3 | +Install all the tools required for building and testing C++/C projects. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +Setting up a **cross-platform** environment for building and testing C++/C projects is a bit tricky. Each platform has its own compilers, and each of them requires a different installation procedure. This package aims to fix this issue. |
| 8 | + |
| 9 | +`setup-cpp` can be used locally from terminal, from CI services like GitHub Actions and GitLab Pipelines, and inside containers like Docker. |
| 10 | + |
| 11 | +`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019) x64/ARM/x86, Linux (Ubuntu 24.0, 22.04, 20.04, 18.04, Fedora, ArchLinux) x64/ARM64, and macOS (15, 14, 13, 12, 11, 10.15) x64/ARM. `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects. |
| 12 | + |
| 13 | +See https://github.com/aminya/setup-cpp for more information about using `setup-cpp` in different environments. |
| 14 | + |
| 15 | +### Prebuilt Docker Images |
| 16 | + |
| 17 | +To provide fast development environments, `setup-cpp` provides several prebuilt docker images that have the tools you need. You can use these images as a base image for your project. |
| 18 | + |
| 19 | +The names are in the format `aminya/setup-cpp-<platform>:<platform_version>-<setup_cpp_version>` and `aminya/setup-cpp-<platform>-<compiler>:<platform_version>-<setup_cpp_version>`. |
| 20 | + |
| 21 | +#### Ubuntu Images |
| 22 | + |
| 23 | +Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` |
| 24 | + |
| 25 | +```dockerfile |
| 26 | +FROM aminya/setup-cpp-ubuntu:22.04-1.0.0 AS builder |
| 27 | +``` |
| 28 | + |
| 29 | +Image with `llvm` and the base tools: |
| 30 | + |
| 31 | +```dockerfile |
| 32 | +FROM aminya/setup-cpp-ubuntu-llvm:22.04-1.0.0 AS builder |
| 33 | +``` |
| 34 | + |
| 35 | +Image with `gcc` and the base tools: |
| 36 | + |
| 37 | +```dockerfile |
| 38 | +FROM aminya/setup-cpp-ubuntu-gcc:22.04-1.0.0 AS builder |
| 39 | +``` |
| 40 | + |
| 41 | +Image with `mingw` and the base tools: |
| 42 | + |
| 43 | +```dockerfile |
| 44 | +FROM aminya/setup-cpp-ubuntu-mingw:22.04-1.0.0 AS builder |
| 45 | +``` |
| 46 | + |
| 47 | +#### Fedora Images |
| 48 | + |
| 49 | +Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` |
| 50 | + |
| 51 | +```dockerfile |
| 52 | +FROM aminya/setup-cpp-fedora:40-1.0.0 AS builder |
| 53 | +``` |
| 54 | + |
| 55 | +Image with `llvm` and the base tools: |
| 56 | + |
| 57 | +```dockerfile |
| 58 | +FROM aminya/setup-cpp-fedora-llvm:40-1.0.0 AS builder |
| 59 | +``` |
| 60 | + |
| 61 | +Image with `gcc` and the base tools: |
| 62 | + |
| 63 | +```dockerfile |
| 64 | +FROM aminya/setup-cpp-fedora-gcc:40-1.0.0 AS builder |
| 65 | +``` |
| 66 | + |
| 67 | +Image with `mingw` and the base tools: |
| 68 | + |
| 69 | +```dockerfile |
| 70 | +FROM aminya/setup-cpp-fedora-mingw:40-1.0.0 AS builder |
| 71 | +``` |
| 72 | + |
| 73 | +#### ArchLinux Images |
| 74 | + |
| 75 | +Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` |
| 76 | + |
| 77 | +```dockerfile |
| 78 | +FROM aminya/setup-cpp-arch:base-1.0.0 AS builder |
| 79 | +``` |
| 80 | + |
| 81 | +Image with `llvm` and the base tools: |
| 82 | + |
| 83 | +```dockerfile |
| 84 | +FROM aminya/setup-cpp-arch-llvm:base-1.0.0 AS builder |
| 85 | +``` |
| 86 | + |
| 87 | +Image with `gcc` and the base tools: |
| 88 | + |
| 89 | +```dockerfile |
| 90 | +FROM aminya/setup-cpp-arch-gcc:base-1.0.0 AS builder |
| 91 | +``` |
| 92 | + |
| 93 | +Image with `mingw` and the base tools: |
| 94 | + |
| 95 | +```dockerfile |
| 96 | +FROM aminya/setup-cpp-arch-mingw:base-1.0.0 AS builder |
| 97 | +``` |
0 commit comments