2021-04-10 14:30:02 +02:00
# Some convenient links:
# - https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
#
name : CI-cygwin
2023-09-01 18:52:20 +02:00
on :
push :
branches :
- 'main'
- 'releases/**'
tags :
- '2.*'
pull_request :
2021-04-10 14:30:02 +02:00
2022-08-26 23:25:07 +02:00
permissions :
contents : read
2021-04-10 14:30:02 +02:00
defaults :
run :
shell : cmd
jobs :
build_cygwin :
strategy :
matrix :
2022-07-13 21:09:07 +02:00
os : [ windows-2022]
2022-11-25 23:13:28 +01:00
arch : [ x64]
2022-07-13 13:46:03 +02:00
include :
- platform : 'x86_64'
packages : |
gcc-g++
2023-05-26 06:55:36 +02:00
python3
2022-02-16 07:06:04 +01:00
fail-fast : false
2021-04-10 14:30:02 +02:00
runs-on : ${{ matrix.os }}
steps :
2022-10-11 19:50:59 +02:00
- uses : actions/checkout@v3
2021-04-10 14:30:02 +02:00
- name : Set up Cygwin
2022-07-13 13:46:03 +02:00
uses : cygwin/cygwin-install-action@master
2021-04-10 14:30:02 +02:00
with :
platform : ${{ matrix.arch }}
2022-07-13 13:46:03 +02:00
packages : ${{ matrix.packages }}
2021-04-10 14:30:02 +02:00
2022-07-13 21:09:07 +02:00
# Cygwin will always link the binaries even if they already exist. The linking is also extremely slow. So just run the "check" target which includes all the binaries.
- name : Build all and run test
2021-04-10 14:30:02 +02:00
run : |
2022-09-09 15:06:40 +02:00
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make VERBOSE=1 -j2 check
2021-07-11 17:23:33 +02:00
- name : Extra test for misra
run : |
2022-07-13 13:46:03 +02:00
cd %GITHUB_WORKSPACE%\addons\test
..\..\cppcheck.exe --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64
python3 ..\misra.py -verify misra\misra-test.c.dump
2023-05-27 10:24:00 +02:00
..\..\cppcheck.exe --addon=misra --enable=style --inline-suppr --enable=information --error-exitcode=1 misra\misra-ctu-1-test.c misra\misra-ctu-2-test.c
2021-07-11 17:23:33 +02:00