Merge pull request #25 from deltachat/circle-ci

Add basic setup for circleci
This commit is contained in:
Friedel Ziegelmayer
2019-05-01 23:23:24 +02:00
committed by GitHub
2 changed files with 72 additions and 1 deletions

67
.circleci/config.yml Normal file
View File

@@ -0,0 +1,67 @@
# copied from http://koushiro.me/2019/04/30/Building-and-Testing-Rust-projects-on-CircleCI/
# TODO remove things that aren't needed for apt
# TODO might want to create our own docker image for this and get rid of apt stuff
version: 2.1
jobs:
build:
docker:
- image: ubuntu:18.04
working_directory: ~/deltachat-core-rust
steps:
- checkout
- run:
name: Setup build environment (TODO move this to custom docker container)
command: |
apt update
apt install -y sudo curl build-essential git pkg-config zlib1g-dev python libssl-dev autoconf libtool
# this will pick default toolchain from `rust-toolchain` file
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain none -y;
source $HOME/.cargo/env
no_output_timeout: 1800s
- run:
name: build etpan (TODO move this to custom docker container)
command: |
curl -L -o libetpan-1.9.1.tar.gz https://github.com/dinhviethoa/libetpan/archive/1.9.1.tar.gz
tar xzf libetpan-1.9.1.tar.gz
cd libetpan-1.9.1
./autogen.sh
./configure --disable-silent-rules --enable-ipv6 --enable-iconv --disable-db --with-openssl --with-sasl --with-zlib --without-curl --without-expat
make -j $(nproc)
sudo make install
sudo ldconfig -v
- run:
name: build sasl2 (TODO move this to custom docker container)
command: |
curl -O https://www.cyrusimap.org/releases/cyrus-sasl-2.1.27.tar.gz
tar zxf cyrus-sasl-2.1.27.tar.gz
cd cyrus-sasl-2.1.27
./configure --enable-shared --disable-cmulocal --disable-sample --disable-obsolete_cram_attr --disable-obsolete_digest_attr --disable-alwaystrue --enable-checkapop --enable-cram --enable-digest --enable-scram --enable-plain --enable-anon --enable-login
make -j $(nproc)
sudo make install
sudo ldconfig -v
- run:
name: Format
command: |
export PATH=~/.cargo/bin:$PATH
rustup component add rustfmt
cargo fmt -- --check
- run:
name: Test
command: |
export PATH=~/.cargo/bin:$PATH
export RUST_BACKTRACE=1
cargo test
workflows:
version: 2.1
build:
jobs:
- build

View File

@@ -1,6 +1,10 @@
# Delta Chat Rust
Current commit on deltachat/deltachate-core: `12ef73c8e76185f9b78e844ea673025f56a959ab`.
> Project porting deltachat-core to rust
[![CircleCI](https://circleci.com/gh/deltachat/deltachat-core-rust.svg?style=svg)](https://circleci.com/gh/deltachat/deltachat-core-rust)
Current commit on deltachat/deltachat-core: `12ef73c8e76185f9b78e844ea673025f56a959ab`.
## Development