forked from wasmerio/wasmer
-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
65 lines (57 loc) · 1.68 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
os:
- linux
- osx
arch:
- amd64
- arm64
osx_image: xcode11.3
language: rust
before_install:
- if [[ $TRAVIS_OS_NAME == linux ]]; then sudo apt-get install -y patchelf; fi
install: travis_retry
rust:
- nightly-2021-01-25
cache:
directories:
- $HOME/.sccache/
- $HOME/.cargo/bin/
script:
- test -f $HOME/.cargo/bin/sccache || travis_retry cargo install sccache
- export RUSTC_WRAPPER=$HOME/.cargo/bin/sccache
- mkdir -p $HOME/.sccache/
- export SCCACHE_DIR="$HOME/.sccache/"
- SCCACHE_ERROR_LOG=`pwd`/sccache.log RUST_LOG=debug $RUSTC_WRAPPER --start-server
- $RUSTC_WRAPPER -s
- make capi
- ls ./target/release
- mkdir artifacts
- if [[ "$TRAVIS_OS_NAME" == osx ]];
then
mv ./target/release/libwasmer_runtime_c_api.dylib ./artifacts/libwasmer_darwin_amd64.dylib;
install_name_tool -id @executable_path/libwasmer_darwin_amd64.dylib ./artifacts/libwasmer_darwin_amd64.dylib;
fi
- if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_CPU_ARCH" == amd64 ]];
then
mv ./target/release/libwasmer_runtime_c_api.so ./artifacts/libwasmer_linux_amd64.so;
patchelf --set-soname libwasmer_linux_amd64.so ./artifacts/libwasmer_linux_amd64.so;
fi
- if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_CPU_ARCH" == arm64 ]];
then
mv ./target/release/libwasmer_runtime_c_api.so ./artifacts/libwasmer_linux_arm64.so;
patchelf --set-soname libwasmer_linux_arm64.so ./artifacts/libwasmer_linux_arm64.so;
fi
deploy:
provider: releases
file_glob: true
file: artifacts/*
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
draft: true
addons:
apt:
packages:
- cmake
branches:
only:
- master
- development