From 615e092b24acc6e4637ffdb6e23f21fccc148845 Mon Sep 17 00:00:00 2001 From: sebcrozet Date: Sun, 5 Apr 2020 18:43:25 +0200 Subject: [PATCH] Add circle CI configuration files. --- .circleci/Xargo.toml | 2 + .circleci/config.yml | 93 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 .circleci/Xargo.toml create mode 100644 .circleci/config.yml diff --git a/.circleci/Xargo.toml b/.circleci/Xargo.toml new file mode 100644 index 00000000..6bdef96d --- /dev/null +++ b/.circleci/Xargo.toml @@ -0,0 +1,2 @@ +[target.x86_64-unknown-linux-gnu.dependencies] +alloc = {} \ No newline at end of file diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..76451343 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,93 @@ +version: 2.1 + +executors: + rust-nightly-executor: + docker: + - image: rustlang/rust:nightly + rust-executor: + docker: + - image: rust:latest + + +jobs: + check-fmt: + executor: rust-executor + steps: + - checkout + - run: + name: install rustfmt + command: rustup component add rustfmt + - run: + name: check formatting + command: cargo fmt -- --check + build-native: + executor: rust-executor + steps: + - checkout + - run: + name: build --no-default-feature + command: cargo build --no-default-features; + - run: + name: build (default features) + command: cargo build; + - run: + name: build --all-features + command: cargo build --all-features + - run: + name: build nalgebra-glm + command: cargo build -p nalgebra-glm --all-features + - run: + name: build nalgebra-lapack + command: cargo build -p nalgebra-lapack --feature netlib + build-wasm: + executor: rust-executor + steps: + - checkout + - run: + name: install cargo-web + command: cargo install -f cargo-web; + - run: + name: build --all-features + command: cargo web build --verbose --target wasm32-unknown-unknown; + - run: + name: build nalgebra-glm + command: cargo build -p nalgebra-glm --all-features + build-no-std: + executor: rust-executor + steps: + - checkout + - run: + name: install xargo + command: cargo install -f xargo; + - run: + name: build + command: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu; + - run: + name: build --features alloc + command: cp '.circleci/Xargo.toml .'; xargo build --verbose --no-default-features --features alloc --target=x86_64-unknown-linux-gnu; + build-nightly: + executor: rust-nightly-executor + steps: + - checkout + - run: + name: build --all-features + command: cargo build --all-features + + +workflows: + version: 2 + build: + jobs: + - check-fmt + - build-native: + requires: + - check-fmt + - build-wasm: + requires: + - check-fmt + - build-no-std: + requires: + - check-fmt + - build-nightly: + requires: + - check-fmt