Skip to content

.github/workflows/c.yml: try running git status after checkout #67

.github/workflows/c.yml: try running git status after checkout

.github/workflows/c.yml: try running git status after checkout #67

Workflow file for this run

name: C CI
# xxx could be written as: "on: [push, pull_request]"
on:
push:
branches: [ bsdmake ]
pull_request:
branches: [ bsdmake ]
jobs:
regressionTest:
name: "${{ matrix.os }} ${{ matrix.make }} CC=${{ matrix.cc }} ${{ matrix.sanitizer }}=yes MKDOC=${{ matrix.docs }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# latest runners: ubuntu-latest, ubuntu-22.04, ubuntu-20.04, macos-latest, macos-12, macos-11
os: [ ubuntu-latest, ubuntu-20.04, macos-latest, macos-11 ] # ubuntu-22.04, netbsd!!!, freebsd!!!, openbsd!!!
cc: [ gcc, clang ]
make: [ bmake, make ]
sanitizer: [ NO_SANI, USE_ASAN, USE_UBSAN, USE_LEAKSAN ]
# XXX this isn't the ideal way to handle a binary option?
docs: [ yes, no ]
exclude:
# N.B.: here we _EXCLUDE_ the matrix options we don't want!
# MacOS-11.x
- os: macos-11
# it's clang anyway
cc: gcc
- os: macos-11
# make is gmake
make: make
- os: macos-11
docs: yes
# MacOS-12.x
- os: macos-12
# it's clang anyway
cc: gcc
- os: macos-12
# make is gmake
make: make
- os: macos-12
docs: yes
# MacOS-latest
- os: macos-latest
# it's clang anyway
cc: gcc
- os: macos-latest
# make is gmake
make: make
- os: macos-latest
docs: yes
# Ubuntu 22.04
- os: ubuntu-22.04
# it's gmake
make: make
- os: ubuntu-22.04
docs: no
# Ubuntu 20.04
- os: ubuntu-20.04
# it's gmake
make: make
- os: ubuntu-20.04
docs: no
# Ubuntu Latest
- os: ubuntu-latest
# it's gmake
make: make
- os: ubuntu-latest
docs: no
# NetBSD
- os: netbsd-latest
# xxx or we could also install bmake
make: bmake
- os: netbsd-latest
cc: clang
steps:
- name: Checkout
uses: actions/checkout@v4
run: git status
- name: whoami
run: |
uname -a
${{ matrix.make }} -V MAKE_VERSION
${{ matrix.cc }} --version
- name: macos_id
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
sw_vers
- name: ubuntu_dependencies
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install bmake cxref
- name: macos_dependencies
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
# n.b.: cxref is in macports.... which apparently can be installed like this:
# wget https://github.com/macports/macports-base/releases/download/v2.9.1/MacPorts-2.9.1-14-Sonoma.pkg
# sudo installer -pkg ./MacPorts-2.9.1-14-Sonoma.pkg -target /
brew update
brew install bmake
- name: netbsd_dependencies
if: ${{ startsWith(matrix.os, 'netbsd') }}
run: |
pkgin install cxref
- name: builddir
run: rm -rf build && mkdir build
- name: showenv
run: |
MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} showenv
env | sort
- name: build
run: MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} -j 3 CC=${{ matrix.cc }} ${{ matrix.sanitizer }}=yes MKDOC=${{ matrix.docs }}
- name: distribution
run: MAKEOBJDIRPREFIX=$(pwd -P)/build DESTDIR=$(pwd -P)/dist ${{ matrix.make }} -j 3 install MKDOC=${{ matrix.docs }}
- name: regression
run: MAKEOBJDIRPREFIX=$(pwd -P)/build ${{ matrix.make }} regress ${{ matrix.sanitizer }}=yes MKDOC=${{ matrix.docs }}