summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-04-11 23:02:48 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-04-11 23:02:48 +0200
commitb8565482bc4200dedc79d8246b05fca70b0d0554 (patch)
tree012c7d2094306179981451ffadf2a1afbb3feccd
parentfb3f373960e00c407cccf45dedf9e363a48478a1 (diff)
parente5f87f503de739fdc1070ea5384e4ab5ed949f89 (diff)
Merge branch 'srht-builds' into master
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--.builds/debian.yml26
-rw-r--r--.builds/nixos.yml27
-rw-r--r--ci.nix22
3 files changed, 75 insertions, 0 deletions
diff --git a/.builds/debian.yml b/.builds/debian.yml
new file mode 100644
index 00000000..96ce2747
--- /dev/null
+++ b/.builds/debian.yml
@@ -0,0 +1,26 @@
+image: debian/stable
+sources:
+ - https://git.sr.ht/~matthiasbeyer/imag
+packages:
+ - curl
+ - libclang-dev
+ - libdbus-1-dev
+ - libssl-dev
+ - openssl
+ - pkg-config
+ - git
+tasks:
+ - install: curl https://sh.rustup.rs -sSf | sh -s -- -y
+ - build: |
+ cd imag
+ PATH="$HOME/.cargo/bin:$PATH" cargo build --all --all-features
+ - prepare-test: |
+ git config --global user.name "Test user"
+ git config --global user.email "test@user.tld"
+ - test: |
+ cd imag
+ PATH="$HOME/.cargo/bin:$PATH" cargo test --all --all-features
+ - clippy: |
+ cd imag
+ PATH="$HOME/.cargo/bin:$PATH" rustup component add clippy
+ PATH="$HOME/.cargo/bin:$PATH" cargo clippy --all --all-targets --all-features -- -D warnings
diff --git a/.builds/nixos.yml b/.builds/nixos.yml
new file mode 100644
index 00000000..baef33d6
--- /dev/null
+++ b/.builds/nixos.yml
@@ -0,0 +1,27 @@
+image: nixos/19.09
+repositories:
+ nixpkgs: https://nixos.org/channels/nixos-19.09
+sources:
+ - https://git.sr.ht/~matthiasbeyer/imag
+tasks:
+ - static: |
+ cd imag
+ bash ./scripts/find-dead-symlinks
+ bash ./scripts/license-headers-updated
+ bash ./scripts/branch-contains-no-tmp-commits
+ bash ./scripts/version-updated
+ - install: |
+ cd imag
+ nix-shell ./ci.nix --run "echo nix-shell ready"
+ - userdoc: |
+ cd imag
+ nix-shell ./ci.nix --run "cargo install mdbook --force"
+ cd doc/user
+ ~/.cargo/bin/mdbook build
+ - build: |
+ cd imag
+ nix-shell ./ci.nix --run "cargo build --all --all-features --tests"
+ - test: |
+ cd imag
+ nix-shell ./ci.nix --run "cargo test --all --all-features"
+
diff --git a/ci.nix b/ci.nix
new file mode 100644
index 00000000..3b9e0188
--- /dev/null
+++ b/ci.nix
@@ -0,0 +1,22 @@
+{ pkgs ? (import <nixpkgs> {}) }:
+
+pkgs.mkShell {
+ buildInputs = with pkgs; [
+ rustc
+ cargo
+
+ cmake
+ curl
+ gcc
+ libpsl
+ openssl
+ pkgconfig
+ which
+ zlib
+ dbus
+ libtool
+ ];
+ LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib";
+}
+
+