Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.86 KiB
Newer Older
Ayush Singh's avatar
Ayush Singh committed
stages:
  - build
  - deploy
Ayush Singh's avatar
Ayush Singh committed
  - release
Ayush Singh's avatar
Ayush Singh committed

Ayush Singh's avatar
Ayush Singh committed
.build:
Ayush Singh's avatar
Ayush Singh committed
  image: zephyrprojectrtos/zephyr-build:v0.26.13
Ayush Singh's avatar
Ayush Singh committed
  before_script:
    - rm -rf ../.west
    - west init -l --mf west_${CI_JOB_NAME}.yml .
    - west update
    - ln -srf ../modules/lib/ArduinoCore-API/api ../modules/lib/Arduino-Zephyr-API/cores/arduino/.
    - west zephyr-export
    - pip3 install -r ../zephyr/scripts/requirements-base.txt
Ayush Singh's avatar
Ayush Singh committed
  script:
    - source ../zephyr/zephyr-env.sh
    - west build -b beagleconnect_freedom . -p
  after_script:
Ayush Singh's avatar
Ayush Singh committed
    - VM=$(cat ../modules/microblocks/gp/runtime/versions | grep VM | awk '{print $2}')
    - mkdir -p release/microblocks/${VM}-${CI_JOB_NAME}/
    - xz -vc build/zephyr/zephyr.bin > release/microblocks/${VM}-${CI_JOB_NAME}/microblocks-${VM}-${CI_JOB_NAME}.bin.xz
Ayush Singh's avatar
Ayush Singh committed
  artifacts:
    paths:
Ayush Singh's avatar
Ayush Singh committed
      - release/
Ayush Singh's avatar
Ayush Singh committed

Ayush Singh's avatar
Ayush Singh committed
  stage: build
Ayush Singh's avatar
Ayush Singh committed
  extends: .build
Ayush Singh's avatar
Ayush Singh committed

pilot:
Ayush Singh's avatar
Ayush Singh committed
  stage: build
Ayush Singh's avatar
Ayush Singh committed
  extends: .build
stable:
Ayush Singh's avatar
Ayush Singh committed
  stage: build
  rules:
    - if: $CI_COMMIT_TAG
Ayush Singh's avatar
Ayush Singh committed
  extends: .build
Ayush Singh's avatar
Ayush Singh committed
include:
  - component: openbeagle.org/ayush1325/ci-components/package-registry-upload@59ea19d89c79a2516c96d3fd0a2ce5abf7a4cc2a
    rules:
      - if: $CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH
    inputs:
      job-name: deploy-testing-job
      job-needs: ["dev", "pilot"]
      job-stage: deploy
      release_dir: ${CI_PROJECT_DIR}/release
  - component: openbeagle.org/ayush1325/ci-components/package-registry-upload@59ea19d89c79a2516c96d3fd0a2ce5abf7a4cc2a
    rules:
      - if: $CI_COMMIT_TAG
    inputs:
      job-name: deploy-stable-job
      job-needs: ["stable"]
      job-stage: deploy
      release_dir: ${CI_PROJECT_DIR}/release
  - component: openbeagle.org/ayush1325/ci-components/release-from-file@59ea19d89c79a2516c96d3fd0a2ce5abf7a4cc2a
    rules:
      - if: $CI_COMMIT_TAG
    inputs:
      job-name: release-stable-job
      job-needs: ["deploy-stable-job"]
      job-stage: release
      release_file: release/release.yml