.gitlab-ci.yml 2.31 KB
Newer Older
q3k's avatar
q3k committed
1
# maintained by q3k, built using docker/build-env
q3k's avatar
q3k committed
2
image: "derq3k/card10-build-env:20190806-195837Z-f95b541-dirty"
3 4 5 6

build:
    stage: build
    script:
7
        - ./bootstrap.sh --werror
schneider's avatar
schneider committed
8
        - ninja -C build/
9
        - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf
q3k's avatar
q3k committed
10 11 12
    only:
        - merge_requests
        - master
Rahix's avatar
Rahix committed
13

14 15 16
release:
    stage: build
    script:
17
        - ./bootstrap.sh --werror
18 19 20 21 22 23 24 25 26 27 28
        - ninja -C build/
        - arm-none-eabi-size build/bootloader/bootloader.elf build/epicardium/epicardium.elf build/pycardium/pycardium.elf
    only:
        - tag
    artifacts:
        paths:
            - build/bootloader/bootloader.elf
            - build/epicardium/epicardium.elf
            - build/pycardium/pycardium.elf
            - build/pycardium/pycardium_epicardium.bin

q3k's avatar
q3k committed
29 30
lint:
    stage: test
q3k's avatar
q3k committed
31
    image: "derq3k/card10-lint-env:20190806-201106Z-f95b541-dirty"
q3k's avatar
q3k committed
32 33 34 35 36 37 38 39
    script:
        # Annoyatron is maintained by q3k. Its job is to serve MR comments that are friendlier than just a failing pipeline.
        #  source code: https://git.card10.badge.events.ccc.de/q3k/annoyatron/
        #  prod deployment: https://gerrit.hackerspace.pl/plugins/gitiles/hscloud/+/refs/heads/master/personal/q3k/annoyatron/
        # If this starts failing for any reason, just remove this curl ping.
        - curl --fail https://annoyatron-prod.q3k.org/ping/mr?mr=${CI_MERGE_REQUEST_IID}
        - git remote rm card10 || true # old gitlab runners might have this remote.
        - git fetch https://git.card10.badge.events.ccc.de/card10/firmware.git master:card10/master
Rahix's avatar
Rahix committed
40 41
        - git merge-base card10/master HEAD || ( echo "Your change needs to be rebased against current master."; exit 1; )
        - git diff --name-only --diff-filter=d card10/master...HEAD | xargs tools/code-style.sh
q3k's avatar
q3k committed
42 43 44 45
        - git diff --exit-code
    only:
        - merge_requests

Rahix's avatar
Rahix committed
46 47
pages:
    stage: deploy
q3k's avatar
q3k committed
48
    # maintaned by q3k, build using docker/deploy-env
q3k's avatar
q3k committed
49
    image: "derq3k/card10-deploy-env:20190806-200743Z-f95b541-dirty"
Rahix's avatar
Rahix committed
50 51 52 53 54 55 56 57 58 59
    script:
        - export LD_LIBRARY_PATH=$(llvm-config --libdir)
        - echo $LD_LIBRARY_PATH
        - sphinx-build -b html Documentation/ Documentation/output/
        - mv Documentation/output/ public/
    artifacts:
        paths:
            - public/
    only:
        - master