Skip to content

Commit 3f03784

Browse files
committed
feat(travis-ci): deploy artifacts for macOS to GitHub releases [skip appveyor]
1 parent 6948a62 commit 3f03784

5 files changed

+52
-40
lines changed

.travis.yml

+28-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
language: cpp
2-
32
matrix:
43
include:
5-
- os: osx
6-
compiler: clang
7-
- os: linux
8-
compiler: gcc
9-
dist: trusty
10-
sudo: required
11-
12-
install:
13-
./travis-install.sh
14-
15-
script:
16-
./travis-script.sh
4+
- os: linux
5+
compiler: gcc
6+
dist: trusty
7+
sudo: required
8+
install: "./travis-install.sh"
9+
script: make test
10+
- os: osx
11+
compiler: clang
12+
install: "./travis-install.sh"
13+
script: make xcode/test
14+
before_deploy:
15+
- make xcode/dist
16+
- |
17+
zip -r rime-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.zip \
18+
dist thirdparty/bin thirdparty/share \
19+
-x '*/curl.exe'
20+
deploy:
21+
provider: releases
22+
api_key:
23+
secure: OXzu4Au7Uri/4pugRsQATYv2+QHNRfx64jRBSTdYUJ8ehdg67HHJrofxhUG2Q+lNZlm2VO51ihOsmp9c3gYtT+ohSxD3/y3z8VDw6k7a+5ihT+Svrr1fpHf30I2DupGe5bO1MFB9rltZ+kv/nERciT5n1jOO5ZxefNCRac2aylE=
24+
file: rime-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.zip
25+
skip_cleanup: true
26+
name: "librime ${TRAVIS_TAG}"
27+
body: "chore(release): ${TRAVIS_TAG} :tada:"
28+
draft: true
29+
on:
30+
repo: rime/librime
31+
tags: true

travis-install-linux.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
dep_packages=(
4+
doxygen
5+
libboost-filesystem-dev
6+
libboost-locale-dev
7+
libboost-regex-dev
8+
libboost-system-dev
9+
libgoogle-glog-dev
10+
libleveldb-dev
11+
libmarisa-dev
12+
libyaml-cpp-dev
13+
)
14+
15+
sudo apt-get update
16+
sudo apt-get install ${dep_packages[@]} -y
17+
make thirdparty/gtest
18+
make -C thirdparty/src/opencc build
19+
sudo env "PATH=$PATH" make -C thirdparty/src/opencc install

travis-install-osx.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
make xcode/thirdparty

travis-install.sh

+2-20
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,8 @@
22

33
cd "$(dirname "$0")"
44

5-
dep_packages=(
6-
doxygen
7-
libboost-filesystem-dev
8-
libboost-locale-dev
9-
libboost-regex-dev
10-
libboost-system-dev
11-
libgoogle-glog-dev
12-
libleveldb-dev
13-
libmarisa-dev
14-
libyaml-cpp-dev
15-
)
16-
17-
if [[ "$TRAVIS_OS_NAME" == linux ]]; then
18-
sudo apt-get update
19-
sudo apt-get install ${dep_packages[@]} -y
20-
make thirdparty/gtest
21-
make -C thirdparty/src/opencc build
22-
sudo env "PATH=$PATH" make -C thirdparty/src/opencc install
23-
elif [[ "$TRAVIS_OS_NAME" == osx ]]; then
24-
make xcode/thirdparty
5+
if [[ -n "$TRAVIS_OS_NAME" ]]; then
6+
bash "./travis-install-${TRAVIS_OS_NAME}.sh"
257
fi
268

279
if [[ -n "${RIME_PLUGINS}" ]]; then

travis-script.sh

-7
This file was deleted.

0 commit comments

Comments
 (0)