diff options
author | la Fleur <lafleur@boum.org> | 2021-10-21 09:23:05 +0000 |
---|---|---|
committer | la Fleur <lafleur@boum.org> | 2021-10-21 09:23:05 +0000 |
commit | c694d5109171e51ce16f40a79b55b496002feb84 (patch) | |
tree | 59bda13240964997822d136646d9cd9830b6e5e8 | |
parent | 762c778ddbc277891ecc8a4a180b4022c491b2a6 (diff) | |
parent | 31dabbbaf75745f68aaa9d867d444129aab10799 (diff) |
Merge branch 'add-ci' into 'master'
fixes #1 - add a basic CI ; clean examples
Closes #1
See merge request rustwall/rustables!4
-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 |