简体   繁体   中英

Gitlab CI runner

I have used this tutorial for setting up a gitlab ci runner. The runner seems to be working. Now I want to build a C++ project with it.

How can I do this?

Assuming you have a shell runner, you can create a job and list the command line commands you want to have executed. Create a file .gitlab-ci.yml in the root directory of your git repository:

my_project:
  script:
    - cd apps/my_project
    - mkdir build
    - cd build
    - cmake ..
    - make

When you push, and ci runners are enabled on gitlab, it will automatically execute all these shell commands for each push.

More information about the things you can put into .gitlab-ci.yml can be found here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM