Skip to content

Commit de2a426

Browse files
bors[bot]japaric
andcommitted
Merge #255
255: [WIP] move windows ci to travis r=therealprof a=japaric Co-authored-by: Jorge Aparicio <[email protected]>
2 parents 751ee92 + 16e5032 commit de2a426

File tree

7 files changed

+28
-105
lines changed

7 files changed

+28
-105
lines changed

.github/bors.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ delete_merged_branches = true
33
required_approvals = 1
44
status = [
55
"continuous-integration/travis-ci/push",
6-
"continuous-integration/appveyor/branch"
76
]
87
timeout_sec = 14400

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ matrix:
4848
- env: TARGET=x86_64-apple-darwin
4949
os: osx
5050

51+
# Windows
52+
- env: TARGET=x86_64-pc-windows-msvc
53+
os: windows
54+
5155
install:
5256
- bash ci/install.sh
5357

@@ -76,6 +80,8 @@ branches:
7680
only:
7781
- staging
7882
- trying
83+
# release tags
84+
- /^v\d+\.\d+\.\d+.*$/
7985

8086
notifications:
8187
email:

appveyor.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

ci/before_deploy.ps1

Lines changed: 0 additions & 19 deletions
This file was deleted.

ci/before_deploy.sh

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
set -ex
1+
set -euxo pipefail
22

33
main() {
4-
local src=$(pwd) \
5-
stage=
4+
if [ $TARGET = x86_64-pc-windows-msvc ]; then
5+
cargo=cargo
6+
else
7+
cargo=cross
8+
fi
69

7-
case $TRAVIS_OS_NAME in
8-
linux)
9-
stage=$(mktemp -d)
10-
;;
11-
osx)
12-
stage=$(mktemp -d -t tmp)
13-
;;
14-
esac
10+
$cargo rustc --bin svd2rust --target $TARGET --release -- -C lto
1511

16-
cross rustc --bin svd2rust --target $TARGET --release -- -C lto
12+
rm -rf stage
13+
mkdir stage
14+
cp target/$TARGET/release/svd2rust stage
1715

18-
cp target/$TARGET/release/svd2rust $stage/
16+
pushd stage
17+
tar czf ../$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
18+
popd
1919

20-
cd $stage
21-
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
22-
cd $src
23-
24-
rm -rf $stage
20+
rm -rf stage
2521
}
2622

2723
main

ci/install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ set -euxo pipefail
22

33
main() {
44
local sort=
5-
if [ $TRAVIS_OS_NAME = linux ]; then
5+
if [ $TRAVIS_OS_NAME = windows ]; then
6+
return
7+
elif [ $TRAVIS_OS_NAME = linux ]; then
68
sort=sort
79
else
810
sort=gsort

ci/script.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ test_svd() {
2222
}
2323

2424
main() {
25+
if [ $TRAVIS_OS_NAME = windows ]; then
26+
cargo check --target $TARGET
27+
return
28+
fi
29+
2530
cross check --target $TARGET
2631

2732
if [ -z ${VENDOR-} ]; then

0 commit comments

Comments
 (0)