image: ubuntu/noble packages: - curl - ca-certificates - gnupg - protobuf-compiler - cmake - build-essential - docker.io - awscli - zstd secrets: - a42011da-a362-40da-9db6-1bf1f9be8be3 # ~/.s3-cache-key-id - c0cf5f2d-5d63-4d50-a324-5eaecaa992dd # ~/.s3-cache-key-secret sources: - https://git.srht.bigb.es/~bigbes/tarantool-protobuf environment: GOPATH: /home/build/go GOROOT: /home/build/.local/go GO_VERSION: "1.26.3" PATH: /home/build/.local/go/bin:/home/build/.local/bin:/home/build/go/bin:/usr/local/bin:/usr/bin:/bin AWS_DEFAULT_REGION: garage AWS_ENDPOINT_URL: https://s3.bigb.es S3_BUCKET: docker-cache S3_PREFIX: tarantool-protobuf/conformance-images submitter: git.sr.ht: enabled: true allow-refs: - refs/heads/master - "refs/tags/*" tasks: - aws_credentials: | mkdir -p ~/.aws cat > ~/.aws/config <> ~/.buildenv set -x aws --endpoint-url="$AWS_ENDPOINT_URL" s3 ls "s3://$S3_BUCKET/" >/dev/null - install_go: | mkdir -p ~/.local curl -sSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \ | tar -xz -C ~/.local go version - install_tarantool: | curl -L https://tarantool.io/release/3/installer.sh | sudo bash sudo apt-get install -y tarantool tarantool-dev tt - install_just: | mkdir -p ~/.local/bin curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh \ | bash -s -- --to ~/.local/bin - install_luatest: | cd tarantool-protobuf tt rocks install luatest - docker_start: | sudo systemctl start docker sudo usermod -aG docker build sudo chmod 666 /var/run/docker.sock docker version - conformance_image: | cd tarantool-protobuf HASH=$(sha256sum docker/conformance.Dockerfile | cut -c1-16) OBJECT_KEY="$S3_PREFIX/$HASH.tar.zst" S3_URI="s3://$S3_BUCKET/$OBJECT_KEY" echo "Image hash: $HASH" echo "S3 URI: $S3_URI" if aws --endpoint-url="$AWS_ENDPOINT_URL" s3api head-object \ --bucket "$S3_BUCKET" --key "$OBJECT_KEY" >/dev/null 2>&1; then echo "Cache HIT — pulling cached image" aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "$S3_URI" - \ | unzstd \ | docker load else echo "Cache MISS — building from scratch and uploading" docker build -t tarantool-protobuf-conformance:latest \ -f docker/conformance.Dockerfile docker/ docker save tarantool-protobuf-conformance:latest \ | zstd -T0 -3 \ | aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp - "$S3_URI" fi docker image inspect tarantool-protobuf-conformance:latest >/dev/null - codegen: | cd tarantool-protobuf just gen - conformance: | cd tarantool-protobuf docker run --rm -v "$(pwd):/work" -w /work \ tarantool-protobuf-conformance:latest - conformance_c: | cd tarantool-protobuf docker run --rm -v "$(pwd):/work" -w /work -e PB_ENABLE_C=1 \ --entrypoint bash tarantool-protobuf-conformance:latest -c ' set -e make -C runtime/pb/c clean >/dev/null make -C runtime/pb/c >/dev/null conformance_test_runner --enforce_recommended \ --failure_list test/conformance/known_failures.txt \ --text_format_failure_list test/conformance/known_failures_text.txt \ /usr/bin/tarantool cmd/conformance-runner.lua rc=$? make -C runtime/pb/c clean >/dev/null exit $rc '