Skip to content

Commit dd9d51d

Browse files
authored
Binary releases for travis/appveyor (#876)
Fixes #875, maybe.
1 parent e5b3830 commit dd9d51d

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

.appveyor.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,24 @@ environment:
1717
CONFIG: Release
1818
JOBS_FLAG: -j
1919
EXE_DIR: .
20+
DEPLOY: false
2021
- GENERATOR: Visual Studio 14 2015
2122
CONFIG: Release
2223
JOBS_FLAG: "/m:"
2324
EXE_DIR: '%CONFIG%'
25+
DEPLOY: true
26+
DEPLOY_NAME: wabt-%APPVEYOR_REPO_TAG_NAME%-win32.zip
2427
- GENERATOR: Visual Studio 14 2015 Win64
2528
CONFIG: Debug
2629
JOBS_FLAG: "/m:"
2730
EXE_DIR: '%CONFIG%'
31+
DEPLOY: false
2832
- GENERATOR: Visual Studio 14 2015 Win64
2933
CONFIG: Release
3034
JOBS_FLAG: "/m:"
3135
EXE_DIR: '%CONFIG%'
36+
DEPLOY: true
37+
DEPLOY_NAME: wabt-%APPVEYOR_REPO_TAG_NAME%-win64.zip
3238

3339
build_script:
3440
- cmake . -DCMAKE_BUILD_TYPE=%CONFIG% -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER% -G "%GENERATOR%"
@@ -37,3 +43,21 @@ build_script:
3743
test_script:
3844
- "%APPVEYOR_BUILD_FOLDER%\\bin\\wabt-unittests"
3945
- python test\run-tests.py -v --bindir %APPVEYOR_BUILD_FOLDER%\bin
46+
47+
artifacts:
48+
- path: "%DEPLOY_NAME%"
49+
name: wabt
50+
51+
before_deploy:
52+
- ren "%APPVEYOR_BUILD_FOLDER%\\bin" "wabt-%APPVEYOR_REPO_TAG_NAME%"
53+
- 7z a %DEPLOY_NAME% "%APPVEYOR_BUILD_FOLDER%\\wabt-%APPVEYOR_REPO_TAG_NAME%\\*.exe"
54+
55+
deploy:
56+
description: 'wabt release'
57+
provider: GitHub
58+
auth_token:
59+
secure: KFfsYkAo+kBfRikg9gm55VHkjNEiiDQk00S1kFjDrjEMrJRmrp6azGUeTSBfuiTH
60+
artifact: "%DEPLOY_NAME%"
61+
on:
62+
appveyor_repo_tag: true
63+
deploy: true

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ matrix:
1919
dist: trusty
2020
sudo: required
2121
compiler: clang
22+
env: WABT_DEPLOY=clang-release
2223
- os: linux
2324
dist: trusty
2425
sudo: required
@@ -42,6 +43,7 @@ matrix:
4243
env: SANITIZER=ubsan
4344
- os: osx
4445
compiler: clang
46+
env: WABT_DEPLOY=clang-release
4547
# Build the .js outputs using emcc
4648
- &test-emcc
4749
stage: test
@@ -67,3 +69,17 @@ matrix:
6769
compiler: clang
6870

6971
fast_finish: true
72+
73+
before_deploy:
74+
- scripts/travis-before-deploy.sh
75+
76+
deploy:
77+
provider: releases
78+
api_key:
79+
secure: UTs36nT7zk1E5cmv4PmsrLbfpQoCJmkQ1upBvyiUl7F2GtPpd7bn/lxN9+e6xroW3vvFTD0MAx/ylqqKHISMhUlRj3vSRW9M1JO/EKj3jQ8kqr92Nz9On5QcGJ8usMMuzq4rXW/t32XIFci25RlFTBxAVXaQq6cVbvjGzvGfvJ6V6vTtho6Pjgj2HCq3K38TYMwA6/+NiP30bV2OkYKjTRx6RCFkYUhKallr0t035GT30bgW7Zz5roLlXUXMiCt8TqY5MCcFYmKukYpLF/tp+B5MUXR0rFFoTsafOc7hWCIi9SdngkwlUFW2tbc9CD0MtNEIUpF+Pf+siXo2RKqfg9A4pdHyHTx1PIOqyDTGcMLHBrs8bsQAoO4PJy6V0WLA1PwQDajXzGfFC3O7Wg/ljOpUumaHCt8yl3/aFu0LZu1NOCZnTpu/kLMXiB1osbSPuYqO+v2j8qgS6xDWf183d9cBzqlep+Wnk2Pgoq1PX2lO08QfxJjW6o3dJkZ/4icpT8hHb4ymcIr3VI9Pl+5Gg1JiMZooZeGV/XMXDAaaO2SNELOK4Dz9eBy4d4ffgaNPZkmNIJZLEx8nISDCU+u2VLcC5FHsCT8VyjcG9JdAXwOmlv2auxhyU87buteJvsJFDavfnc4BEgHPM1xR9PVJzY3IXAOAwAXUZQPWxSKwEgQ=
80+
file: wabt-$TRAVIS_TAG-*.tar.gz*
81+
file_glob: true
82+
skip_cleanup: true
83+
on:
84+
tags: true
85+
condition: -n ${WABT_DEPLOY}

scripts/travis-before-deploy.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2018 WebAssembly Community Group participants
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
set -o nounset
19+
set -o errexit
20+
21+
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd -P)"
22+
source "${SCRIPT_DIR}/travis-common.sh"
23+
24+
if [[ -n ${WABT_DEPLOY:-} ]]; then
25+
# Rebuild the WABT_DEPLOY target so it copies the results into bin/
26+
make ${WABT_DEPLOY}
27+
28+
PKGNAME="wabt-${TRAVIS_TAG}-${TRAVIS_OS_NAME}"
29+
mv bin wabt-${TRAVIS_TAG}
30+
tar -czf ${PKGNAME}.tar.gz wabt-${TRAVIS_TAG}
31+
sha256sum ${PKGNAME}.tar.gz > ${PKGNAME}.tar.gz.sha256
32+
fi

0 commit comments

Comments
 (0)