Skip to content

Try to play a sound #208

Try to play a sound

Try to play a sound #208

Workflow file for this run

name: GitHub CI
on:
push:
branches: ['**']
pull_request:
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
macos:
runs-on: ${{ matrix.runner }}
env:
CC: clang
TEST: test
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
TERM: xterm
strategy:
fail-fast: false
matrix:
features: [huge]
runner: [macos-latest, macos-13, macos-14]
steps:
- name: Checkout repository from github
uses: actions/checkout@v4
- name: Install packages on Intel Mac
if: matrix.features == 'huge' && matrix.runner == 'macos-latest'
run: |
brew install lua
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
- name: Install packages on M1 Mac
if: matrix.features == 'huge' && matrix.runner == 'macos-14'
run: |
brew install lua libtool
echo "LUA_PREFIX=/opt/homebrew" >> $GITHUB_ENV
- name: Set up environment
run: |
(
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
case "${{ matrix.features }}" in
tiny)
echo "TEST=testtiny"
echo "CONFOPT=--disable-gui"
;;
normal)
;;
huge)
echo "CONFOPT="
;;
esac
) >> $GITHUB_ENV
- name: Configure
run: |
./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
# Append various warning flags to CFLAGS.
# BSD sed needs backup extension specified.
sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
# On macOS, the entity of gcc is clang.
sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
# Suppress some warnings produced by clang 12 and later.
if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then
sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
fi
- name: Build
env:
LC_ALL: C
run: |
make -j${NPROC}
- name: Check version
run: |
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
- name: Dump audio info
run: |
system_profiler SPHardwareDataType SPAudioDataType
- name: Play a sound
run: |
afplay /System/Library/Sounds/Funk.aiff
- name: Test
timeout-minutes: 20
run: |
#make ${TEST}
(sleep 20; screencapture debugscreen_${{ matrix.runner }}.png) &
cd src
make test_sound
sleep 30
- name: Publish debug screen
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: debugscreen_${{ matrix.runner }}.png
path: debugscreen_${{ matrix.runner }}.png