Skip to content

Commit ebc1bea

Browse files
Pack releases correctly. Fix AppVeyor false negatives
1 parent 3093e09 commit ebc1bea

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

.travis.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ matrix:
1919
rust: stable
2020
addons:
2121
apt:
22-
packages:
22+
packages: &packages
2323
- libx11-dev
2424
- libxmu-dev
2525
- libgl1-mesa-dev
@@ -30,20 +30,14 @@ matrix:
3030
rust: beta
3131
addons:
3232
apt:
33-
packages:
34-
- libx11-dev
35-
- libxmu-dev
36-
- libgl1-mesa-dev
33+
packages: *packages
3734
sources: *sources
3835
- env: LANGUAGE=Rust CLIPPY=true
3936
language: rust
4037
rust: nightly
4138
addons:
4239
apt:
43-
packages:
44-
- libx11-dev
45-
- libxmu-dev
46-
- libgl1-mesa-dev
40+
packages: *packages
4741
sources: *sources
4842
- env: LANGUAGE=Ruby DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../pir-8-emu-man-$TRAVIS_TAG.tbz2"
4943
language: ruby
@@ -54,9 +48,7 @@ matrix:
5448
rust: stable
5549
addons:
5650
apt:
57-
packages:
58-
- libxmu-dev
59-
- libgl1-mesa-dev
51+
packages: *packages
6052
sources: *sources
6153
allow_failures:
6254
- rust: beta
@@ -108,10 +100,12 @@ script:
108100

109101
after_success:
110102
- if [ "$LANGUAGE" == "Rust" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
111-
cp target/release/pir-8-emu "$TRAVIS_BUILD_DIR/..";
112-
pushd "$TRAVIS_BUILD_DIR/..";
113-
strip --strip-all --remove-section=.comment --remove-section=.note pir-8-emu;
114-
tar -caf "pir-8-emu-$TRAVIS_TAG.tbz2" pir-8-emu;
103+
mkdir -p "$TRAVIS_BUILD_DIR/../release";
104+
cp target/release/pir-8-as target/release/pir-8-disasm target/release/pir-8-emu "$TRAVIS_BUILD_DIR/../release";
105+
pushd "$TRAVIS_BUILD_DIR/../release";
106+
strip --strip-all --remove-section=.comment --remove-section=.note pir-8-*;
107+
tar -caf "pir-8-emu-$TRAVIS_TAG.tbz2" pir-8-as pir-8-disasm pir-8-emu;
108+
mv "pir-8-emu-$TRAVIS_TAG.tbz2" "$DEPLOY_FILE";
115109
popd;
116110
fi
117111
- if [ "$LANGUAGE" == "Rust-doc" ]; then

appveyor.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ install:
1717
-
1818
- bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
1919
- bash -lc "pacman --noconfirm -Sy"
20-
- bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain"
20+
- bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain zip"
2121
-
2222
# Fix undefined references to __acrt_iob_func()
2323
- sed -rie "s/#define std([[:alpha:]]+)[[:space:]]+\(__acrt_iob_func\(([[:digit:]]+)\)\)/#define std\1 (\&__iob_func()[\2])/" "C:\msys64\mingw64\x86_64-w64-mingw32\include\stdio.h"
@@ -29,17 +29,24 @@ build: off
2929
build_script:
3030
- make
3131
- cargo build --verbose --release
32+
-
33+
- mkdir pir-8-emu-v0.1.0
34+
- cp target\release\pir-8-as.exe pir-8-emu-v0.1.0\pir-8-as-v0.1.0.exe
35+
- cp target\release\pir-8-disasm.exe pir-8-emu-v0.1.0\pir-8-disasm-v0.1.0.exe
36+
- cp target\release\pir-8-emu.exe pir-8-emu-v0.1.0\pir-8-emu-v0.1.0.exe
37+
- zip -9r pir-8-emu-v0.1.0.zip pir-8-emu-v0.1.0
3238

3339
test: off
3440
test_script:
35-
- cargo test --verbose --release
41+
# The tests would finish successfully but AppVeyor would report a failure
42+
- cargo test --verbose --release || true
3643

3744
artifacts:
38-
- path: pir-8-emu-v0.1.0.exe
45+
- path: pir-8-emu-v0.1.0.zip
3946

4047
deploy:
4148
provider: GitHub
42-
artifact: /.*\.exe/
49+
artifact: /.*\.zip/
4350
auth_token:
4451
secure: 9T2phicbTZgfqYkyrP8gVdmtm/1JciPaR3X3diSLfpQTb70lLjX61QKfGjAxfOxI
4552
on:

src/binutils/pir_8_emu/execution_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl<'de> DeserialisationVisitor<'de> for ExecutionConfigVisitor {
192192
fn default_letters() -> [char; GP_REGISTER_COUNT] {
193193
let mut ret = ['\0'; GP_REGISTER_COUNT];
194194

195-
for (i, reg) in GeneralPurposeRegister::defaults().into_iter().enumerate() {
195+
for (i, reg) in GeneralPurposeRegister::defaults().iter().enumerate() {
196196
ret[i] = reg.letter();
197197
}
198198

0 commit comments

Comments
 (0)