Migrate CI from Travis and Appveyor to Github Workflows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
new file mode 100644
index 0000000..5c54228
--- /dev/null
+++ b/.github/workflows/ci-build.yml
@@ -0,0 +1,49 @@
+name: Build and Test
+
+on:
+ - pull_request
+ - push
+
+jobs:
+ linux:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Configure
+ # We enforce -Wdeclaration-after-statement because Qt project needs to
+ # build MD4C with Integrity compiler which chokes whenever a declaration
+ # is not at the beginning of a block.
+ run: CFLAGS='--coverage -g -O0 -Wall -Wdeclaration-after-statement -Werror' cmake -DCMAKE_BUILD_TYPE=Debug -G 'Unix Makefiles' .
+ - name: Build
+ run: make VERBOSE=1
+ - name: Test
+ run: ./scripts/run-tests.sh
+ - name: Code Coverage Report
+ if: ${{ github.event_name == 'push' }}
+ continue-on-error: true
+ run: |
+ sudo apt-get install -y lcov
+ lcov --directory . --capture --output-file coverage.info
+ lcov --remove coverage.info '/usr/*' --output-file coverage.info
+ lcov --list coverage.info
+ bash <(curl -s https://codecov.io/bash)
+
+ windows-32:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: microsoft/setup-msbuild@v1.3.1
+ - name: Configure
+ run: cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A Win32 .
+ - name: Build
+ run: msbuild.exe md4c.sln.sln /p:Configuration=Release /p:Platform=Win32
+
+ windows-64:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: microsoft/setup-msbuild@v1.3.1
+ - name: Configure
+ run: cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64 .
+ - name: Build
+ run: msbuild.exe md4c.sln /p:Configuration=Release /p:Platform=x64
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 66ba337..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# YAML definition for travis-ci.com continuous integration.
-# See https://docs.travis-ci.com/user/languages/c
-arch:
- - amd64
- - ppc64le
-language: c
-dist: bionic
-
-compiler:
- - gcc
-
-addons:
- apt:
- packages:
- - python3 # for running tests
- - lcov # for generating code coverage report
-
-before_script:
- - mkdir build
- - cd build
- # We enforce -Wdeclaration-after-statement because Qt project needs to
- # build MD4C with Integrity compiler which chokes whenever a declaration
- # is not at the beginning of a block.
- - CFLAGS='--coverage -g -O0 -Wall -Wdeclaration-after-statement -Werror' cmake -DCMAKE_BUILD_TYPE=Debug -G 'Unix Makefiles' ..
-
-script:
- - make VERBOSE=1
-
-after_success:
- - ../scripts/run-tests.sh
- # Creating report
- - lcov --directory . --capture --output-file coverage.info # capture coverage info
- - lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
- - lcov --list coverage.info # debug info
- # Uploading report to CodeCov
- - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
diff --git a/README.md b/README.md
index 9abe987..2782423 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,3 @@
-[![Linux Build Status (travis-ci.com)](https://img.shields.io/travis/mity/md4c/master.svg?logo=linux&label=linux%20build)](https://travis-ci.com/mity/md4c)
-[![Windows Build Status (appveyor.com)](https://img.shields.io/appveyor/ci/mity/md4c/master.svg?logo=windows&label=windows%20build)](https://ci.appveyor.com/project/mity/md4c/branch/master)
-[![Code Coverage Status (codecov.io)](https://img.shields.io/codecov/c/github/mity/md4c/master.svg?logo=codecov&label=code%20coverage)](https://codecov.io/github/mity/md4c)
-[![Coverity Scan Status](https://img.shields.io/coverity/scan/mity-md4c.svg?label=coverity%20scan)](https://scan.coverity.com/projects/mity-md4c)
-
# MD4C Readme
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index d4bcaff..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# YAML definition for Appveyor.com continuous integration.
-# See http://www.appveyor.com/docs/appveyor-yml
-
-version: '{branch}-{build}'
-
-before_build:
- - 'cmake --version'
- - 'if "%PLATFORM%"=="x64" cmake -G "Visual Studio 12 Win64" .'
- - 'if not "%PLATFORM%"=="x64" cmake -G "Visual Studio 12" .'
-
-build:
- project: md4c.sln
- verbosity: detailed
-
-skip_tags: true
-
-os:
- - Windows Server 2012 R2
-
-configuration:
- - Debug
- - Release
-
-platform:
- - x64 # 64-bit build
- - win32 # 32-bit build
-
-artifacts:
- - path: $(configuration)/md2html/md2html.exe