diff options
-rw-r--r-- | .gitattributes | 1 | ||||
-rw-r--r-- | .gitlab-ci.yml | 29 | ||||
-rw-r--r-- | ci-fix/libnftnl.a | 3 |
3 files changed, 33 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..352f149 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.a filter=lfs diff=lfs merge=lfs -text diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..20ddef0 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/rust/tags/ +image: "rust:alpine" + +# Optional: Install a C compiler, cmake and git into the container. +# You will often need this when you (or any of your dependencies) depends on C code. +before_script: + - apk update + - apk add build-base pkgconf libmnl-dev libmnl-static libnftnl-dev + +cache: + paths: + - target/ + - cargo/ + +# Set CARGO_HOME inside the CI directory, otherwise cargo won't use the cache. +variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + +test:cargo: + script: + # Copy the libnftnl-static lib file that is stored in LFS. Workaround to + # be able to compile under alpine musl. + - cp ci-fix/libnftnl.a /usr/lib + - mkdir -p target cargo + - du -sh target cargo + - rustc --version && cargo --version + - cargo test --workspace --verbose --release + diff --git a/ci-fix/libnftnl.a b/ci-fix/libnftnl.a new file mode 100644 index 0000000..3d55ec9 --- /dev/null +++ b/ci-fix/libnftnl.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6fad6864934b2e18bf5de9a64bbb019439daf2ea0ac7dcc3b7f4fffd94587c5 +size 458128 |