Skip to content

ci/macos: fix libtool and disable integration test #249

ci/macos: fix libtool and disable integration test

ci/macos: fix libtool and disable integration test #249

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
webui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'webui/package-lock.json'
- name: build
run: |
cd webui && npm install && npm run build && cd ..
zip -r webui.zip webui/dist
- uses: actions/upload-artifact@v4
with:
name: webui
path: webui.zip
retention-days: 1
ccheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ccheck
run: |
make ccheck
test:
runs-on: ${{ matrix.os }}
needs: webui
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
env:
MACOSX_DEPLOYMENT_TARGET: "10.12"
steps:
- uses: actions/checkout@v4
- name: install clang-16 and ninja
if: ${{ runner.os == 'Linux' }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main"
sudo apt-get update
sudo apt-get install -y clang-tools-16 clang-16 clang-tidy-16 ninja-build cppcheck gdb nasm yasm
- name: install sound libs
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libasound2-dev libjack-jackd2-dev libpulse-dev libpulse0 pulseaudio libportaudio2 dbus-x11
dbus-launch pulseaudio --start
- name: install brew deps
if: ${{ runner.os == 'macOS' }}
run: |
brew install ninja automake cppcheck pkg-config nasm coreutils libtool curl
echo 'export PATH="$(brew --prefix)/opt/curl/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
curl --version
which curl
- name: websocat linux
if: ${{ runner.os == 'Linux' }}
run: |
wget https://github.com/vi/websocat/releases/download/v1.13.0/websocat.x86_64-unknown-linux-musl
mv websocat.x86_64-unknown-linux-musl /usr/local/bin/websocat
chmod +x /usr/local/bin/websocat
- name: websocat macos
if: ${{ runner.os == 'macOS' }}
run: |
wget https://github.com/vi/websocat/releases/download/v1.13.0/websocat.x86_64-apple-darwin
mv websocat.x86_64-apple-darwin /usr/local/bin/websocat
chmod +x /usr/local/bin/websocat
- uses: actions/cache@v4
with:
path: third_party
key: ${{ runner.os }}-${{ hashFiles('versions.mk') }}
- uses: actions/download-artifact@v4
with:
name: webui
- name: unzip webui
run: rm -Rf webui && unzip webui.zip
- name: make StudioLink - Linux
if: ${{ runner.os == 'Linux' }}
run: make CC=clang-16 CI=1
- name: Test StudioLink
if: ${{ runner.os == 'Linux' }}
run: make test && test/integration.sh
- name: clang-tidy
if: ${{ runner.os == 'Linux' }}
run: |
clang-tidy-16 -p build -checks=cert-\*,-cert-dcl37-c,-cert-dcl51-cpp,-clang-analyzer-valist.Uninitialized libsl/src/*.c
clang-tidy-16 -p build -checks=cert-\*,-cert-dcl37-c,-cert-dcl51-cpp,-clang-analyzer-valist.Uninitialized test/src/*.c
- name: clang scan-build
if: ${{ runner.os == 'Linux' }}
run: make clean && scan-build-16 --status-bugs make
- name: make StudioLink - macOS
if: ${{ runner.os == 'macOS' }}
run: make CI=1 && make test
analyze:
name: CodeQL Analyze
runs-on: ubuntu-latest
needs: webui
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: install and ninja
run: |
sudo apt-get update && sudo apt-get install -y ninja-build nasm
- name: install sound libs
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libasound2-dev libjack-jackd2-dev libpulse-dev libpulse0
- uses: actions/cache@v4
with:
path: third_party
key: ${{ runner.os }}-gcc-${{ hashFiles('versions.mk') }}
- uses: actions/download-artifact@v4
with:
name: webui
- name: unzip webui
run: rm -Rf webui && unzip webui.zip
- run: make && make clean
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
queries: security-extended
- run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3