From ebc1beadc747a91d8eaf11851f9b3fb5d705a302 Mon Sep 17 00:00:00 2001 From: nabijaczleweli Date: Sun, 18 Aug 2019 00:38:09 +0200 Subject: [PATCH] Pack releases correctly. Fix AppVeyor false negatives --- .travis.yml | 26 +++++++++------------- appveyor.yml | 15 +++++++++---- src/binutils/pir_8_emu/execution_config.rs | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e357726..2867673f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: rust: stable addons: apt: - packages: + packages: &packages - libx11-dev - libxmu-dev - libgl1-mesa-dev @@ -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 @@ -54,9 +48,7 @@ matrix: rust: stable addons: apt: - packages: - - libxmu-dev - - libgl1-mesa-dev + packages: *packages sources: *sources allow_failures: - rust: beta @@ -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 diff --git a/appveyor.yml b/appveyor.yml index 24be2bb0..aec7d232 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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" @@ -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: diff --git a/src/binutils/pir_8_emu/execution_config.rs b/src/binutils/pir_8_emu/execution_config.rs index f9b09d5c..5a8ec9e9 100644 --- a/src/binutils/pir_8_emu/execution_config.rs +++ b/src/binutils/pir_8_emu/execution_config.rs @@ -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(); }