Skip to content

Commit

Permalink
Working
Browse files Browse the repository at this point in the history
  • Loading branch information
harryjph committed Feb 13, 2019
1 parent 0a53f90 commit b2067d8
Show file tree
Hide file tree
Showing 36 changed files with 106 additions and 11,258 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
Cargo.lock
.idea/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "scavenger"]
path = scavenger
url = https://github.com/PoC-Consortium/scavenger
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
language: rust
cache: cargo

before_deploy:
- ./build.sh

matrix:
include:
- os: osx
before_install:
- brew install gcc
- os: linux
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update && sudo apt-get install -y gcc-8
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

deploy:
provider: releases
api_key: $API_KEY
file: ${TRAVIS_OS_NAME}.zip
skip_cleanup: true
on:
branch: master
tags: true

notifications:
email: false
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"
build = "build.rs"

[lib]
name = "shabal_lib"
name = "shabal"
crate-type = ["dylib"]

[features]
Expand Down
26 changes: 13 additions & 13 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ fn main() {
let mut config = shared_config.clone();

config
.file("src/c/sph_shabal.c")
.file("src/c/shabal.c")
.file("src/c/common.c")
.file("scavenger/src/c/sph_shabal.c")
.file("scavenger/src/c/shabal.c")
.file("scavenger/src/c/common.c")
.compile("shabal");

generate_bindings();
Expand All @@ -43,8 +43,8 @@ fn main() {
config.flag("-mfpu=neon");

config
.file("src/c/mshabal_128_neon.c")
.file("src/c/shabal_neon.c")
.file("scavenger/src/c/mshabal_128_neon.c")
.file("scavenger/src/c/shabal_neon.c")
.compile("shabal_neon");
}
}
Expand All @@ -59,8 +59,8 @@ fn main() {
config.flag("-msse2");

config
.file("src/c/mshabal_128_sse2.c")
.file("src/c/shabal_sse2.c")
.file("scavenger/src/c/mshabal_128_sse2.c")
.file("scavenger/src/c/shabal_sse2.c")
.compile("shabal_sse2");

let mut config = shared_config.clone();
Expand All @@ -72,8 +72,8 @@ fn main() {
config.flag("-mavx");

config
.file("src/c/mshabal_128_avx.c")
.file("src/c/shabal_avx.c")
.file("scavenger/src/c/mshabal_128_avx.c")
.file("scavenger/src/c/shabal_avx.c")
.compile("shabal_avx");

let mut config = shared_config.clone();
Expand All @@ -85,8 +85,8 @@ fn main() {
config.flag("-mavx2");

config
.file("src/c/mshabal_256_avx2.c")
.file("src/c/shabal_avx2.c")
.file("scavenger/src/c/mshabal_256_avx2.c")
.file("scavenger/src/c/shabal_avx2.c")
.compile("shabal_avx2");

let mut config = shared_config.clone();
Expand All @@ -98,8 +98,8 @@ fn main() {
config.flag("-mavx512f");

config
.file("src/c/mshabal_512_avx512f.c")
.file("src/c/shabal_avx512f.c")
.file("scavenger/src/c/mshabal_512_avx512f.c")
.file("scavenger/src/c/shabal_avx512f.c")
.compile("shabal_avx512f");
}
}
Expand Down
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

cargo build --release --features "simd"

cd target/release
zip ../../${TRAVIS_OS_NAME}.zip libshabal.*
1 change: 1 addition & 0 deletions scavenger
Submodule scavenger added at 775b0e
Loading

0 comments on commit b2067d8

Please sign in to comment.