Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Automated Linux packaging and deployment (#164)
Browse files Browse the repository at this point in the history
This will enable deploying Linux packages for Ubuntu, CentOS, Fedora and Debian in each tag. Not only that, packages will be built in each commit, to make sure nothing breaks.

It also adds a new place where the release version must be updated with a new release, maybe that could someday be automated. We now need to check the `Cargo.toml` file, the `travis.yml` file and the `rpmbuild/super.spec` file.

As an extra, given that I was working in this branch, I implemented a fix for #159, so all three, #40, #149 and #159 are fixed now.
  • Loading branch information
Razican authored May 30, 2018
1 parent 126540d commit 3b429a5
Show file tree
Hide file tree
Showing 21 changed files with 345 additions and 164 deletions.
13 changes: 6 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ environment:
MSYS_BITS: 64
- TARGET: beta-i686-pc-windows-gnu
MSYS_BITS: 32
- TARGET: 1.26.0-x86_64-pc-windows-msvc
- TARGET: 1.26.0-i686-pc-windows-msvc
- TARGET: 1.26.0-x86_64-pc-windows-gnu
- TARGET: 1.26.1-x86_64-pc-windows-msvc
- TARGET: 1.26.1-i686-pc-windows-msvc
- TARGET: 1.26.1-x86_64-pc-windows-gnu
MSYS_BITS: 64
- TARGET: 1.26.0-i686-pc-windows-gnu
- TARGET: 1.26.1-i686-pc-windows-gnu
MSYS_BITS: 32

install:
Expand All @@ -30,8 +30,7 @@ install:
- cargo -vV

build_script:
- cargo build
- cargo package
- cargo build --features no-color

test_script:
- cargo test
- cargo test --features no-color
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
downloads/*
dist/*
results/*
target
target/*
releases/*
rpmbuild/*
!rpmbuild/super.spec
*.bk
Expand Down
113 changes: 75 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,97 @@
language: rust
# cache: cargo
cache: cargo
dist: trusty
sudo: true
services:
- docker

os:
- linux
- osx
- linux
- osx

addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev
- zlib1g-dev
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev
- zlib1g-dev

# Run builds for all the supported trains
rust:
- nightly
- beta
- stable
- 1.26.0
- nightly
- beta
- stable
- 1.26.1

# Generate packages for multiple distributions.
matrix:
include:
- os: linux
rust: "stable"
env: PACKAGE="debian"
- os: linux
rust: "stable"
env: PACKAGE="ubuntu"
- os: linux
rust: "stable"
env: PACKAGE="fedora"
- os: linux
rust: "stable"
env: PACKAGE="centos"

before_script:
- export PATH=$PATH:~/.cargo/bin
- ./travis-helper.sh install_deps
- export PATH=$PATH:~/.cargo/bin
- "./travis-helper.sh install_deps"
# TODO: change tag when bumping version number. (Maintain in sync with Cargo.toml)
- |
if [[ $TRAVIS_TAG ]]; then
export TAG=$TRAVIS_TAG;
else
export TAG="0.4.1";
fi
# Run the multiple tests.
script:
- cargo build --verbose
- cargo package --verbose
- cargo test --verbose
- cargo build --verbose --features beta
- cargo test --verbose --features beta
- cargo build --verbose --features unstable
- cargo test --verbose --features unstable
- ./travis-helper.sh clippy_run
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then
cargo test -- --ignored
fi
# Won't work since our binary name is different from the crate name.
# - ./travis-helper.sh dist
- ./travis-helper.sh fmt_run
- "./travis-helper.sh build"
- "./travis-helper.sh package"
- "./travis-helper.sh test"
- "./travis-helper.sh test_ignored"
- "./travis-helper.sh build_unstable"
- "./travis-helper.sh test_unstable"
- "./travis-helper.sh test_unstable_ignored"
- "./travis-helper.sh clippy_run"
- "./travis-helper.sh dist_test"
- "./travis-helper.sh fmt_run"

# Upload code coverage report and documentation.
after_success:
- ./travis-helper.sh upload_code_coverage
- ./travis-helper.sh upload_documentation
- "./travis-helper.sh upload_code_coverage"
- "./travis-helper.sh upload_documentation"

deploy:
provider: releases
api_key:
secure: n19EgLXHFh8pXBulAfOFtzIMFPSm0yM0yi/sXY1bQgr+QztAHwxkGKaCU/y4yqYwDNH0hCFQn+P8X//Yucz/Cvw2Ng2G040hMJqsu/RztX5svq+pjmTNYX9QuwOg/6AnFoQs2zxRMZia4npVDA66q78G5GA+2eKZ/cDc5/6M32uh7RH8d6yYDnyCJ1lOk35tFu7DLZtfC5xQvOeC+iD4QIiKtVitcjRLQPiV71cG42a0wYYjX3sVKCjqF7NX/q5VHLxG0EofaLeyAI2NdK9RkuAfd6y8YyR0XNwlvq0qX8j5iDtc6ljzOtytlPYUlvyF3AqOJdVt+rBiI2/tZDtVkOobO+hS/+Tl680PpiX+m/HaHErgV0pMYCavYQkjPyMVE0DJCMTMCoHFhGMB+gC/piagVBZ9lKFHRgxXYBFhJVoco2vqMZDm85avI7IzL9YNtJqRt0h2JJZ4/42/Hn0+52CtXJI86HwUU4hD0eUsm9yyWNOsrDahmra1H28vxS7fjEb1Sozol3fMRWKMllKqsUr8Xd06wePqtfYow0ufdHTcumQte9Ls11hgZhDSMd7g6P9tPL5P0UeWa3x8xjNk6Lx3ghAVfzF2CePkeg4VQSHMonZEhaIxShdkCl3Z30F4DOe0p6Pq6ZsG6RRA4/qoIYGPvchfAC4L+VaWjC7yQ0k=
file: releases/*
skip_cleanup: true
prerelease: true # TODO: remove on 1.0
on:
repo: SUPERAndroidAnalyzer/super
tags: true
rust: stable
os: linux

notifications:
email:
recipients:
- razican@protonmail.ch
- brunoop@protonmail.ch
- sergiodlo@protonmail.com
- jaimesr@protonmail.ch
- razican@protonmail.ch
- brunoop@protonmail.ch
- sergiodlo@protonmail.com
- jaimesr@protonmail.ch
on_success: change
on_failure: always
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here you can find the rest of the changes for this version.
- SUPER now requires Rust 1.26.0 to be built.
- Removed `error-chain` dependency in favor of `failure`.
- Upgraded dependencies:
- `clap`: 2.25 => **2.30**
- `clap`: 2.25 => **2.31**
- `xml-rs`: 0.4 => **0.8**
- `serde`: 0.9 => **1.0**
- `chrono`: 0.3 => **0.4**
Expand Down
Loading

0 comments on commit 3b429a5

Please sign in to comment.