summaryrefslogtreecommitdiffstats
path: root/ci/build.yaml
blob: 99e377df3f371fd60a7b2ae0b8d7a7cc06e135c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
resources:
- name: repo
  type: git
  source:
    uri: ssh://git@git.jnsn.dev:52502/~/git-host-c.git
    branch: main
    private_key: ((vbump.repo-key))

jobs:
- name: update-pipeline
  plan:
    - get: repo
      trigger: true
    - set_pipeline: self
      file: repo/ci/build.yaml

# This project builds one thing: the access control executable.  The gate is
# therefore the program itself - compile it under the strictest warnings the
# compiler has, run the unit suite and the behavioural suite, and run both again
# under the sanitizers.  Alpine, because that is the libc the host image (the
# git-host project) builds this against - a suite that passes against glibc and
# segfaults on musl has told us nothing.
#
# The container image and the container suite (../git-host-integration) live in
# the git-host project now: this repo ships the program and its install, not the
# server that runs it.
- name: test
  plan:
  - get: repo
    trigger: true
  - task: build-and-test
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: alpine
          tag: "3.22"
      inputs:
        - name: repo
      run:
        path: sh
        args:
          - -ec
          - |
            apk add --no-cache build-base git >/dev/null
            cd repo
            make clean
            make strict 2>&1 | tail -3
            make test | tail -1
            make clean
            make sanitizer | tail -1
            printf 'install: '
            make install DESTDIR=/tmp/stage >/dev/null && \
              readlink /tmp/stage/usr/local/share/git-host/hooks/pre-receive