CI: upgrade actions/checkout to v4. #65
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- push | |
- pull_request | |
jobs: | |
main: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
cc: gcc | |
- os: ubuntu-20.04 | |
cc: clang | |
- os: ubuntu-22.04 | |
cc: gcc | |
- os: ubuntu-22.04 | |
cc: clang | |
- os: macos-11 | |
cc: cc | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up APT | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: | | |
printf 'Apt::Install-Recommends "false";\n' | sudo tee -a /etc/apt/apt.conf | |
sudo apt-get update | |
- name: check C compiler version | |
run: | |
${{matrix.cc}} --version | |
- name: build | |
run: | |
make CC=${{matrix.cc}} | |
- name: install test deps | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: | | |
sudo apt-get install tmux | |
- name: install test deps | |
if: startsWith(matrix.os, 'macos-') | |
run: | | |
brew install tmux | |
- name: run tests | |
run: | |
perl -Mautodie=exec -e '$SIG{PIPE}="DEFAULT"; exec @ARGV' | |
make test | |
- name: check README syntax | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: | | |
python3 -m pip install restructuredtext-lint pygments | |
rst-lint --level=info --encoding=UTF-8 README | |
- name: run cppcheck | |
if: matrix.cc == 'gcc' | |
run: | | |
sudo apt-get install cppcheck | |
cppcheck --error-exitcode=1 *.c | |
# vim:ts=2 sts=2 sw=2 et |