Files
mlib/.github/workflows/ccpp.yml
T

76 lines
1.7 KiB
YAML

name: C/C++ CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: make check C99
run: make check
- name: make check C11
working-directory: ./tests
run: make clean check CC="cc -std=c11"
- name: make check C++
working-directory: ./tests
run: make clean check CC="c++ -std=c++11"
build_windows_mingw:
strategy:
matrix:
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: make check
shell: bash
run: mingw32-make CC="gcc -std=c99 -D__USE_MINGW_ANSI_STDIO=1" check
build_windows_msys2:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v1
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain
- name: make check
run: make CC="gcc -std=c99 -D__USE_MINGW_ANSI_STDIO=1" check
build_windows_visual:
strategy:
matrix:
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: make check
shell: cmd
working-directory: ./tests
run: Make-check-cl.bat cl
build_windows_clang_cl:
strategy:
matrix:
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: make check
shell: cmd
working-directory: ./tests
run: Make-check-cl.bat clang-cl