From b8fac51d428be78d1112abb036bb34ae79e06707 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kuba=20Podg=C3=B3rski?= <kuba--@users.noreply.github.com>
Date: Wed, 22 Jan 2020 12:49:19 +0100
Subject: [PATCH] remove travis and appveyor (#116)

---
 .github/workflows/build.yml | 42 ++++++++++++++++++-------------------
 .travis.sh                  | 18 ----------------
 .travis.yml                 | 22 -------------------
 CMakeLists.txt              |  2 +-
 appveyor.yml                | 14 -------------
 src/zip.c                   |  3 ++-
 6 files changed, 23 insertions(+), 78 deletions(-)
 delete mode 100755 .travis.sh
 delete mode 100644 .travis.yml
 delete mode 100644 appveyor.yml

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6e43754..8669985 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -2,47 +2,45 @@ name: build
 
 on: [push]
 
-env:
-  BUILD_TYPE: Debug
-  INSTALL_PREFIX: _install
-
 jobs:
-  build-ubuntu:
-    runs-on: ubuntu-latest     
+  ubuntu:
+    runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v2
-      
+
     - name: Configure
-      run: cmake -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=$ENV{BUILD_TYPE} -DSANITIZE_ADDRESS=On -DCMAKE_INSTALL_PREFIX=$ENV{INSTALL_PREFIX} .
+      run: cmake -DENABLE_COVERAGE=ON -DSANITIZE_ADDRESS=On .
     - name: Build
       run: cmake --build .
     - name: Test
-      run: ctest -VV
-      
+      run: ASAN_OPTIONS=detect_leaks=0 LSAN_OPTIONS=verbosity=1:log_threads=1 ctest -VV
+
     - name: CodeCov
       run: bash <(curl -s https://codecov.io/bash)
-   
-   
-  build-macos:      
-    runs-on: macos-latest      
+
+
+  macos:
+    runs-on: macos-latest
     steps:
     - uses: actions/checkout@v2
-      
+
     - name: Configure
-      run: cmake -DCMAKE_BUILD_TYPE=$ENV{BUILD_TYPE} -DSANITIZE_ADDRESS=On -DCMAKE_INSTALL_PREFIX=$ENV{INSTALL_PREFIX} .
+      run: |
+        pip3 install scan-build
+        scan-build cmake -DSANITIZE_ADDRESS=On .
     - name: Build
-      run: cmake --build .
+      run: scan-build -v --exclude test -enable-checker security.FloatLoopCounter -enable-checker security.insecureAPI.UncheckedReturn --status-bugs cmake --build .
     - name: Test
-      run:  ASAN_OPTIONS=detect_leaks=0 LSAN_OPTIONS=verbosity=1:log_threads=1 ctest -VV  
+      run:  ctest -VV
 
 
-  build-windows:      
-    runs-on: windows-latest
+  windows:
+    runs-on: "windows-latest"
     steps:
     - uses: actions/checkout@v2
-      
+
     - name: Configure
-      run:  cmake  -G"Visual Studio 16 2019" .
+      run:  cmake  .
     - name: Build
       run:  cmake --build . --config "Debug"
     - name: Test
diff --git a/.travis.sh b/.travis.sh
deleted file mode 100755
index 22974b1..0000000
--- a/.travis.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# Build script for travis-ci.org builds.
-#
-if [ $ANALYZE = "true" ] && [ "$CC" = "clang" ]; then
-    # scan-build -h
-    scan-build cmake -G "Unix Makefiles"
-    scan-build -enable-checker security.FloatLoopCounter \
-        -enable-checker security.insecureAPI.UncheckedReturn \
-        --status-bugs -v \
-        make -j 8 \
-        make -j 8 test
-else
-    cmake -DCMAKE_BUILD_TYPE=Debug -DSANITIZE_ADDRESS=On -DCMAKE_INSTALL_PREFIX=_install
-    make -j 8
-    make install
-    ASAN_OPTIONS=detect_leaks=0 LSAN_OPTIONS=verbosity=1:log_threads=1 ctest -V
-fi
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 86bac1c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-language: c
-addons:
-  apt:
-    packages: &1
-    - lcov
-# Compiler selection
-compiler:
-  - clang
-  - gcc
-env:
-  - ANALYZE=false
-  - ANALYZE=true
-# Build steps
-script:
-  - ./.travis.sh
-after_success:
-  # Creating report
-  - cmake -DENABLE_COVERAGE=ON
-  - make
-  - make test
-  # Uploading report to CodeCov
-  - bash <(curl -s https://codecov.io/bash)
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08f8545..1cc97e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
 
 project(zip
   LANGUAGES C
-  VERSION "0.1.16")
+  VERSION "0.1.17")
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
 
 option(CMAKE_DISABLE_TESTING "Disable test creation" OFF)
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index ea17f5d..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-version: zip-0.1.15.{build}
-build_script:
-- cmd: >-
-    cd c:\projects\zip
-
-    mkdir build
-
-    cd build
-
-    cmake -G"Visual Studio 14" -DCMAKE_BUILD_TYPE=Debug ..
-
-    cmake --build . --config %CMAKE_BUILD_TYPE%
-
-    ctest --verbose -C "Debug"
diff --git a/src/zip.c b/src/zip.c
index 9deabee..3b2821e 100644
--- a/src/zip.c
+++ b/src/zip.c
@@ -808,7 +808,8 @@ int zip_create(const char *zipname, const char *filenames[], size_t len) {
 
     if (MZ_FILE_STAT(name, &file_stat) != 0) {
       // problem getting information - check errno
-      return -1;
+      status = -1;
+      break;
     }
 
     if ((file_stat.st_mode & 0200) == 0) {