Skip to content
Snippets Groups Projects
Forked from flow3r / flow3r firmware
1242 commits behind the upstream repository.
.gitlab-ci.yml 1.55 KiB
stages:
  - check
  - build

variables:
  GIT_SUBMODULE_STRATEGY: recursive

default:
  # built via:
  #     docker load < $(nix-build nix/docker-image.nix)
  image: registry.k0.hswaw.net/q3k/flow3r-build:kvy1jakg8i4jxx4skhpy6si3vvslsgrb

clang-tidy:
  stage: check
  variables:
    IDF_TOOLCHAIN: "clang"
  script:
    - "idf.py build"
    - "idf.py clang-check"
    - "python3 tools/codequal-report.py clang-tidy warnings.txt > cqual.json"
  artifacts:
    when: always
    reports:
      codequality: cqual.json

mypy:
  stage: check
  variables:
    MYPYPATH: python_payload/mypystubs
  script:
    - "set +e +o pipefail"
    - "mypy python_payload/main_st4m.py --strict --no-color-output > warnings.txt; result=$?"
    - "python3 tools/codequal-report.py mypy warnings.txt > cqual.json"
    - "set -e -o pipefail"
    - "[ $result == 0 ]"
  artifacts:
    when: always
    reports:
      codequality: cqual.json

format:
  stage: check
  script:
    - "bash tools/format.sh"
    - "[ -z \"$(git status --porcelain -u no)\" ] || (echo 'Differences found, please run tools/format.sh.' && git diff HEAD && exit 1)"

build-p3:
  stage: build
  script:
    - idf.py -g p3 build
  artifacts:
    expose_as: 'Proto 3 ELF'
    paths: ['build/flow3r.elf']
    expire_in: 5 hours

build-p4:
  stage: build
  script:
    - idf.py -g p4 build
  artifacts:
    expose_as: 'Proto 4 ELF'
    paths: ['build/flow3r.elf']
    expire_in: 5 hours

build-p6:
  stage: build
  script:
    - idf.py -g p6 build
  artifacts:
    expose_as: 'Proto 6 ELF'