Skip to content

Commit

Permalink
Pack releases correctly. Fix AppVeyor false negatives
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed Aug 17, 2019
1 parent 3093e09 commit ebc1bea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
26 changes: 10 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ matrix:
rust: stable
addons:
apt:
packages:
packages: &packages
- libx11-dev
- libxmu-dev
- libgl1-mesa-dev
Expand All @@ -30,20 +30,14 @@ matrix:
rust: beta
addons:
apt:
packages:
- libx11-dev
- libxmu-dev
- libgl1-mesa-dev
packages: *packages
sources: *sources
- env: LANGUAGE=Rust CLIPPY=true
language: rust
rust: nightly
addons:
apt:
packages:
- libx11-dev
- libxmu-dev
- libgl1-mesa-dev
packages: *packages
sources: *sources
- env: LANGUAGE=Ruby DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../pir-8-emu-man-$TRAVIS_TAG.tbz2"
language: ruby
Expand All @@ -54,9 +48,7 @@ matrix:
rust: stable
addons:
apt:
packages:
- libxmu-dev
- libgl1-mesa-dev
packages: *packages
sources: *sources
allow_failures:
- rust: beta
Expand Down Expand Up @@ -108,10 +100,12 @@ script:

after_success:
- if [ "$LANGUAGE" == "Rust" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
cp target/release/pir-8-emu "$TRAVIS_BUILD_DIR/..";
pushd "$TRAVIS_BUILD_DIR/..";
strip --strip-all --remove-section=.comment --remove-section=.note pir-8-emu;
tar -caf "pir-8-emu-$TRAVIS_TAG.tbz2" pir-8-emu;
mkdir -p "$TRAVIS_BUILD_DIR/../release";
cp target/release/pir-8-as target/release/pir-8-disasm target/release/pir-8-emu "$TRAVIS_BUILD_DIR/../release";
pushd "$TRAVIS_BUILD_DIR/../release";
strip --strip-all --remove-section=.comment --remove-section=.note pir-8-*;
tar -caf "pir-8-emu-$TRAVIS_TAG.tbz2" pir-8-as pir-8-disasm pir-8-emu;
mv "pir-8-emu-$TRAVIS_TAG.tbz2" "$DEPLOY_FILE";
popd;
fi
- if [ "$LANGUAGE" == "Rust-doc" ]; then
Expand Down
15 changes: 11 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ install:
-
- bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
- bash -lc "pacman --noconfirm -Sy"
- bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain"
- bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain zip"
-
# Fix undefined references to __acrt_iob_func()
- 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"
Expand All @@ -29,17 +29,24 @@ build: off
build_script:
- make
- cargo build --verbose --release
-
- mkdir pir-8-emu-v0.1.0
- cp target\release\pir-8-as.exe pir-8-emu-v0.1.0\pir-8-as-v0.1.0.exe
- cp target\release\pir-8-disasm.exe pir-8-emu-v0.1.0\pir-8-disasm-v0.1.0.exe
- cp target\release\pir-8-emu.exe pir-8-emu-v0.1.0\pir-8-emu-v0.1.0.exe
- zip -9r pir-8-emu-v0.1.0.zip pir-8-emu-v0.1.0

test: off
test_script:
- cargo test --verbose --release
# The tests would finish successfully but AppVeyor would report a failure
- cargo test --verbose --release || true

artifacts:
- path: pir-8-emu-v0.1.0.exe
- path: pir-8-emu-v0.1.0.zip

deploy:
provider: GitHub
artifact: /.*\.exe/
artifact: /.*\.zip/
auth_token:
secure: 9T2phicbTZgfqYkyrP8gVdmtm/1JciPaR3X3diSLfpQTb70lLjX61QKfGjAxfOxI
on:
Expand Down
2 changes: 1 addition & 1 deletion src/binutils/pir_8_emu/execution_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl<'de> DeserialisationVisitor<'de> for ExecutionConfigVisitor {
fn default_letters() -> [char; GP_REGISTER_COUNT] {
let mut ret = ['\0'; GP_REGISTER_COUNT];

for (i, reg) in GeneralPurposeRegister::defaults().into_iter().enumerate() {
for (i, reg) in GeneralPurposeRegister::defaults().iter().enumerate() {
ret[i] = reg.letter();
}

Expand Down

0 comments on commit ebc1bea

Please sign in to comment.