Debian Codegraph @

.gitlab-ci.yml

raw symbols SCIP
1 # https://stackoverflow.com/a/77477765
2 workflow:
3 rules:
4 - if: $CI_PROJECT_NAMESPACE =~ /^ubports\//
5 variables:
6 # Use our own GitLab runner
7 RUNNER_TAG: "ubports"
8 - if: $CI_PROJECT_NAMESPACE !~ /^ubports\//
9 variables:
10 # Use shared runner if run outside our namespace
11 RUNNER_TAG: "saas-linux-small-amd64"
12
13 default:
14 tags:
15 - $RUNNER_TAG
16
17 stages:
18 - build
19 - test
20 - publish
21
22 variables:
23 GIT_SUBMODULE_STRATEGY: 'recursive'
24 DOCKER_DRIVER: overlay2
25
26 .armhf: &armhf
27 variables:
28 ARCH: "armhf"
29 ARCH_TRIPLET: "arm-linux-gnueabihf"
30
31 .arm64: &arm64
32 variables:
33 ARCH: "arm64"
34 ARCH_TRIPLET: "aarch64-linux-gnu"
35
36 .amd64: &amd64
37 variables:
38 ARCH: "amd64"
39 ARCH_TRIPLET: "x86_64-linux-gnu"
40
41 .build:
42 image: "clickable/ci-20.04-$ARCH"
43 stage: build
44 script: 'clickable build --clean --arch $ARCH --accept-review-errors'
45 artifacts:
46 paths:
47 - "build/$ARCH_TRIPLET/app"
48 expire_in: 1 week
49
50 build-armhf:
51 <<: *armhf
52 extends: .build
53
54 build-arm64:
55 <<: *arm64
56 extends: .build
57
58 build-amd64:
59 <<: *amd64
60 extends: .build
61
62 test:
63 image: "clickable/ci-20.04-amd64"
64 stage: test
65 script:
66 - 'clickable build --container-mode --non-interactive'
67 - 'env BUILD_DIR=build/x86_64-linux-gnu/app clickable test --container-mode --non-interactive'
68 dependencies:
69 - build-amd64
70
71 publish:
72 stage: publish
73 image: "clickable/ci-20.04-armhf"
74 rules:
75 - if: $CI_COMMIT_TAG
76 script:
77 - 'clickable publish "$CI_COMMIT_MESSAGE"'
78 - 'clickable publish --arch arm64'
79 - 'clickable publish --arch amd64'
80 dependencies:
81 - build-armhf
82 - build-arm64
83 - build-amd64
84 - test
85 artifacts:
86 paths:
87 - build/arm-linux-gnueabihf/app/*.click
88 - build/aarch64-linux-gnu/app/*.click
89 - build/x86_64-linux-gnu/app/*.click
90 expire_in: 30 days