1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
name: C/C++ CI
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: master
pull_request:
branches: master
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
cc: [gcc, clang]
include:
- os: macos-latest
- os: ubuntu-20.04
cc: slackware
container: 'andy5995/slackware-build-essential:15.0'
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- if: ${{ matrix.cc == 'clang' }}
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Show info
run: |
export -p
echo '${{ toJSON(matrix) }}'
# If the build tools ever seem to be out of date, this can be uncommented
#
#- if: ${{ contains(matrix.os, 'ubuntu') && matrix.container == null }}
#run: |
#sudo apt-get update -qq
#sudo apt-get upgrade -y -qq
- name: Make
run: make
freebsd:
runs-on: ubuntu-latest
name: build (FreeBSD 15.0)
steps:
- uses: actions/checkout@v4
- name: Test in FreeBSD 15.0
uses: vmactions/freebsd-vm@v1
with:
release: "15.0"
usesh: true
prepare: |
pkg install -y gmake
run: |
cc --version
gmake
openbsd:
runs-on: ubuntu-latest
name: build (OpenBSD 7.6)
steps:
- uses: actions/checkout@v4
- name: Test in OpenBSD 7.6
uses: vmactions/openbsd-vm@v1
with:
release: "7.6"
usesh: true
prepare: |
pkg_add gmake
run: |
cc --version
gmake
|