Skip to content

Commit

Permalink
Migrate CI to GitHub workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
mity committed Dec 5, 2023
1 parent db02db8 commit 908f476
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 62 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Test

on:
- pull_request
- push

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: CFLAGS='--coverage -g -O0' cmake -DCMAKE_BUILD_TYPE=Debug -G 'Unix Makefiles' .
- name: Build
run: make VERBOSE=1
- name: Test
run: for testsuite in test-*; do echo "Running $testsuite:"; ./$testsuite; done
- 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 --remove coverage.info 'tests/*' --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/[email protected]
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" -A Win32 .
- name: Build
run: msbuild.exe c-reusables.sln /p:Configuration=Debug /p:Platform=Win32
- name: Test
run: Get-ChildItem -Path .\Debug\ -File "test-*.exe" | Foreach {Write $_.FullName; Invoke-Expression $_.FullName}

windows-64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: microsoft/[email protected]
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 17 2022" -A x64 .
- name: Build
run: msbuild.exe c-reusables.sln /p:Configuration=Debug /p:Platform=x64
- name: Test
run: Get-ChildItem -Path .\Debug\ -File "test-*.exe" | Foreach {Write $_.FullName; Invoke-Expression $_.FullName}
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Linux Build Status (travis-ci.com)](https://img.shields.io/travis/mity/c-reusables/master.svg?logo=linux&label=linux%20build)](https://travis-ci.com/mity/c-reusables)
[![Windows Build Status (appveyor.com)](https://img.shields.io/appveyor/ci/mity/c-reusables/master.svg?logo=windows&label=windows%20build)](https://ci.appveyor.com/project/mity/c-reusables/branch/master)
[![Build Status](https://github.com/mity/c-reusables/actions/workflows/ci-build.yml/badge.svg)](https://github.com/mity/c-reusables/actions/workflows/ci-build.yml)
[![Code Coverage (codecov.io)](https://img.shields.io/codecov/c/github/mity/c-reusables/master.svg?logo=codecov&label=code%20coverage)](https://codecov.io/github/mity/c-reusables)
[![Coverity Scan Status](https://img.shields.io/coverity/scan/mity-c-reusables.svg?label=coverity%20scan)](https://scan.coverity.com/projects/mity-c-reusables)

Expand Down
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

0 comments on commit 908f476

Please sign in to comment.