resources: - name: repo type: git source: uri: ssh://git@git.jnsn.dev:52502/~/git-host-c.git branch: main private_key: ((vbump.repo-key)) - name: final-image type: registry-image icon: docker source: repository: registry.jnsn.dev/git-host-c username: ((vbump.username)) password: ((vbump.password)) tag: latest jobs: - name: update-pipeline plan: - get: repo trigger: true - set_pipeline: self file: repo/ci/build.yaml # The whole point of a C rewrite was to have one binary with no moving parts, so # the gate is: 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 image is built against - a suite that # passes against glibc and segfaults on musl has told us nothing. # # The container suite (../git-host-integration) is deliberately not here: it # needs a container runtime inside the build, and a suite that fails because the # sandbox cannot mount an overlay is not a signal about the policy. - 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 WARN="-Wall -Wextra -Wpedantic -Werror" 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 - name: build-container plan: - get: repo trigger: true passed: [test] privileged: true config: platform: linux image_resource: type: registry-image source: repository: concourse/oci-build-task inputs: - name: repo outputs: - name: image params: CONTEXT: repo DOCKERFILE: repo/container/Dockerfile UNPACK_ROOTFS: "true" run: path: build - put: final-image params: image: image/image.tar