Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need help setting up a .gitlab-ci.yml file for C++

The GitLab documentation is lacking and not very clear. How do I setup this file to automatically build my C++ project (it will tell you if it passes or fails) and how do I configure to have separate builds for Windows/Mac/Linux. If you need me to share my repo with you just ask.

like image 473
PlanetVaster Avatar asked Apr 23 '16 17:04

PlanetVaster


1 Answers

Before you automate anything run it manually. Write a shell script then put that in CI. Below is a simple template using the shell executor.

before_script:
   - export BUILD_VAR=if_needed

build_linux:
   stage: build
   script:
      - my_build_script.sh

If your steps are simple you can put them directly in the CI config:

build_linux:
   stage: build
   script:
      - ./configure
      - make

Get that working for your simplest case and then grow it from there.

like image 79
MikeSpaceG Avatar answered Sep 29 '22 10:09

MikeSpaceG