Skip to content

Migrate CI to GitHub workflow. #6

Migrate CI to GitHub workflow.

Migrate CI to GitHub workflow. #6

Workflow file for this run

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}