mirror of
https://github.com/nine-lives-later/zzmq.git
synced 2024-09-29 04:48:46 +08:00
Add test scripts
This commit is contained in:
parent
39e1a03064
commit
a8f6d13aea
6
build_and_test.sh
Executable file
6
build_and_test.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
zig build test --summary all
|
||||
zig fmt . > /dev/null
|
7
build_and_test_docker.sh
Executable file
7
build_and_test_docker.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
IMAGE=zzmq_test_347563478
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build . -t $IMAGE -f test.Dockerfile
|
23
test.Dockerfile
Normal file
23
test.Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
FROM alpine:3.19 as builder
|
||||
|
||||
# install Zig 0.11 from Alpine edge repo: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/zig
|
||||
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
RUN apk add --no-cache zig@testing~=0.11.0
|
||||
|
||||
# install dependencies (keep in sync with main image below)
|
||||
RUN apk add --no-cache czmq-dev@testing
|
||||
|
||||
COPY . /build/
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN zig build test -Doptimize=ReleaseFast --summary all
|
||||
|
||||
RUN touch /var/touched # dummy build output
|
||||
|
||||
|
||||
|
||||
# empty result image
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /var/touched /tmp/touched
|
Loading…
Reference in New Issue
Block a user