I am new to CircleCI, and I have a script that installs CMake, build my C++ project, runs an executable, and then runs a bash script. Everything works as intended, but I would like to know if this can be optimized more, or if there are any better practices I should be following?
Thanks,
version: 2.1
jobs:
test:
docker:
- image: cimg/base:edge-22.04
steps:
- checkout
# Install CMake
- run:
name: Install CMake
command: |
sudo apt-get update
sudo apt-get install -y cmake
# Create build directory and build the project
- run:
name: Build the project
command: |
mkdir -p build
cd build
cmake ..
cmake --build . --config Release
# Run unit tests
- run:
name: Running unit tests
command: |
build/night-tests
# Run integration tests
- run:
name: Running integration tests
command: |
cd tests
bash test_night.sh ../build/night
workflows:
version: 2
tests:
jobs:
- test