Files
waozi b25d70d164 Install the AVIF build tools in CI and build CodeQL serially
Kryon's raylib library now builds libaom and dav1d, which need nasm,
Meson and Ninja, and links the system libopus. The Test job stopped at
libaom's missing assembler.

CodeQL's autobuild ran make -j4, so two ziran processes cloned the same
package into one cache directory at once and the cache was left
unusable. Build it with one manual make instead.
2026-11-07 15:08:49 -03:00

103 lines
3.3 KiB
YAML

name: Security
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: security-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential pkg-config xvfb xdotool xfwm4 dbus-x11 x11-utils imagemagick \
libsdl2-dev libcairo2-dev libpango1.0-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev gnumeric \
cmake nasm meson ninja-build libopus-dev
- name: Install the locked Ziran toolchain
run: |
set -eu
commit=$(awk '/"toolchain"/ { found = 1 } found && /"commit"/ { gsub(/[",]/, "", $2); print $2; exit }' ziran.lock)
git clone https://github.com/ziranlang/ziran.git "$RUNNER_TEMP/ziran"
git -C "$RUNNER_TEMP/ziran" checkout "$commit"
make -C "$RUNNER_TEMP/ziran" -j"$(nproc)" install-user
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Build
run: make build bundle
- name: Test
run: make test-ci
dependency-review:
name: Dependency Review
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Review dependency changes
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: moderate
codeql:
name: CodeQL
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
security-events: write
packages: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential pkg-config xvfb xdotool \
libsdl2-dev libcairo2-dev libpango1.0-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev \
cmake nasm meson ninja-build libopus-dev
- name: Install the locked Ziran toolchain
run: |
set -eu
commit=$(awk '/"toolchain"/ { found = 1 } found && /"commit"/ { gsub(/[",]/, "", $2); print $2; exit }' ziran.lock)
git clone https://github.com/ziranlang/ziran.git "$RUNNER_TEMP/ziran"
git -C "$RUNNER_TEMP/ziran" checkout "$commit"
make -C "$RUNNER_TEMP/ziran" -j"$(nproc)" install-user
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Initialize CodeQL
uses: github/codeql-action/init@6f5948dfacef28e207b48d0905cf90c03365536d # v3
with:
languages: c-cpp
build-mode: manual
# One serial make: parallel ziran processes would fetch the same
# package into one cache directory at once.
- name: Build
run: make build
- name: Analyze
uses: github/codeql-action/analyze@6f5948dfacef28e207b48d0905cf90c03365536d # v3