.gitlab-ci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. stages:
  2. - build
  3. variables:
  4. BATCH_BUILD: "1"
  5. V: "0"
  6. MAKEFLAGS: "-j8 --no-keep-going"
  7. IDF_PATH: "$CI_PROJECT_DIR/esp-idf"
  8. LOG_PATH: "$CI_PROJECT_DIR"
  9. .set_git_config: &set_git_config
  10. # Set git config
  11. - git config user.email "test@espressif.com"
  12. - git config user.name "Espressif"
  13. .add_ssh_key: &add_ssh_key
  14. # Add gitlab ssh key
  15. - mkdir -p ~/.ssh
  16. - chmod 700 ~/.ssh
  17. - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
  18. - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
  19. - chmod 600 ~/.ssh/id_rsa
  20. - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
  21. before_script:
  22. # Add gitlab ssh key
  23. - *add_ssh_key
  24. # Set git config
  25. - *set_git_config
  26. .build_esp32s3: &build_esp32s3
  27. - idf.py set-target esp32s3 build
  28. .build_esp32: &build_esp32
  29. - idf.py set-target esp32 build
  30. build_demo:
  31. stage: build
  32. image: $CI_DOCKER_REGISTRY/esp32-ci-env:esp-nn
  33. tags:
  34. - build
  35. script:
  36. # Clone IDF
  37. - git clone --recursive --single-branch -b release/v4.4 --reference-if-able /local_references/gitlab/ https://gitlab-ci-token:${BOT_TOKEN}@gitlab.espressif.cn:6688/espressif/esp-idf.git
  38. - cd esp-idf
  39. - ./install.sh
  40. - . ./export.sh
  41. - cd ..
  42. # Build examples now
  43. - cd test_app
  44. # Build esp32s3
  45. - *build_esp32s3
  46. # Build esp32
  47. - *build_esp32
  48. - cd -