Skip to content

Add Division

Add Division #58

Workflow file for this run

name: Build CI
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}-${{ matrix.config.os-version }}
strategy:
fail-fast: false
matrix:
config:
- name: Windows (MSVC, static)
os: windows
os-version: 2025
static: true
- name: Windows (MSVC, dynamic)
os: windows
os-version: 2025
static: false
- name: Linux (GCC, ARM64)
os: ubuntu
os-version: 24.04-arm
use-clang: false
arm: true
- name: Linux (Clang, ARM64)
os: ubuntu
os-version: 24.04-arm
use-clang: true
arm: true
- name: Linux (GCC, x86_64)
os: ubuntu
os-version: 24.04
use-clang: false
arm: false
- name: Linux (Clang)
os: ubuntu
os-version: 24.04
use-clang: true
arm: false
- name: MacOS (x86_64)
os: macos
os-version: 15-intel
arm: false
- name: MacOS (Arm64)
os: macos
os-version: 15
arm: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Setup MSVC (Windows)
if: matrix.config.os == 'windows'
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
toolset: "14.44"
- name: Setup Clang (Linux)
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
echo "CC=clang-21" >> "$GITHUB_ENV"
echo "CXX=clang++-21" >> "$GITHUB_ENV"
echo "OBJC=clang-21" >> "$GITHUB_ENV"
- name: Setup GCC (Linux)
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == false
uses: egor-tensin/setup-gcc@v1
with:
version: 14
platform: x64
- name: Setup Clang (MacOS)
if: matrix.config.os == 'macos'
run: |
brew update
brew install llvm@21 lld@21
echo "$(brew --prefix)/opt/llvm@21/bin:$(brew --prefix)/opt/lld@21/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L$(brew --prefix)/opt/llvm@21/lib -L$(brew --prefix)/opt/llvm@21/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm@21/lib/c++ -L$(brew --prefix)/opt/lld@21/lib" >> "$GITHUB_ENV"
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm@21/include -I$(brew --prefix)/opt/lld@21/include" >> "$GITHUB_ENV"
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
echo "OBJC=clang" >> "$GITHUB_ENV"
echo "CC_LD=lld" >> "$GITHUB_ENV"
echo "CXX_LD=lld" >> "$GITHUB_ENV"
echo "OBJC_LD=lld" >> "$GITHUB_ENV"
- name: Setup meson (MacOS)
if: matrix.config.os == 'macos'
run: |
brew update
brew install meson
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
- name: Setup meson
if: matrix.config.os != 'macos'
run: |
pip install meson --break-system-packages
- name: Install dependencies (Linux)
if: matrix.config.os == 'ubuntu'
run: |
sudo apt-get update
sudo apt-get install ninja-build -y --no-install-recommends
- name: Configure
run: meson setup build -Dbuildtype=release -Ddefault_library=${{( matrix.config.os == 'windows' && matrix.config.static ) && 'static' ||'shared' }} --fatal-meson-warnings
- name: Build
run: meson compile -C build