Portability and CMake support #290
Workflow file for this run
This file contains hidden or 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: Build | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**' | |
| - 'include/**' | |
| - 'Makefile' | |
| - '*.mk' | |
| - '.github/workflows/build.yml' | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'include/**' | |
| - 'Makefile' | |
| - '*.mk' | |
| - '.github/workflows/build.yml' | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| cc: gcc | |
| - os: macos-latest | |
| cc: clang | |
| env: | |
| CC: ${{ matrix.cc }} | |
| CFLAGS: -Os -Wall -Werror | |
| CSTANDARD: c99 | |
| WEXTRA: 1 | |
| FORTIFY: 3 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build static library | |
| run: make static | |
| - name: Build shared library | |
| run: make shared | |
| - name: Build examples | |
| run: make examples | |
| build-freebsd: | |
| runs-on: ubuntu-latest | |
| name: FreeBSD | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build on FreeBSD | |
| uses: vmactions/freebsd-vm@v1 | |
| with: | |
| release: "14.0" | |
| prepare: | | |
| pkg install -y gmake | |
| run: | | |
| echo Building on FreeBSD $(uname -m) | |
| gmake static | |
| gmake shared | |
| gmake examples |