67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
|
|
env:
|
|
LLVM_VERSION: "19.1.2"
|
|
LINUX_IMAGE: "ubuntu-24.04"
|
|
MACOS_IMAGE: "macos-15"
|
|
WINDOWS_IMAGE: "windows-2022"
|
|
|
|
jobs:
|
|
build_and_test:
|
|
runs-on: ${{ matrix.os}}
|
|
timeout-minutes: 15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-24.04, macos-15, windows-2022]
|
|
build_type: [Debug, MinSizeRel, RelWithDebInfo, Release]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: System Info (Linux)
|
|
if: matrix.os == env.LINUX_IMAGE
|
|
run: |
|
|
uname -a
|
|
lsb_release -a
|
|
df -h
|
|
- name: System Info (macOS)
|
|
if: matrix.os == env.MACOS_IMAGE
|
|
run: |
|
|
uname -a
|
|
sw_vers -productVersion
|
|
df -h
|
|
- name: System Info (Windows)
|
|
if: matrix.os == env.WINDOWS_IMAGE
|
|
run: |
|
|
systeminfo
|
|
wmic logicaldisk get name, size, freespace
|
|
|
|
- name: Install dependencies (Linux)
|
|
if: matrix.os == env.LINUX_IMAGE
|
|
run: sudo apt update && sudo apt install -y llvm llvm-dev ninja-build mold curl libssl-dev libcurl4-openssl-dev
|
|
- name: Install dependencies (MacOS)
|
|
if: matrix.os == env.MACOS_IMAGE
|
|
run: brew install llvm ninja
|
|
- name: Install dependencies (Windows)
|
|
if: matrix.os == env.WINDOWS_IMAGE
|
|
run: choco install ninja && pwsh ./fetch-llvm.ps1 "${{ matrix.build_type }}"
|
|
|
|
- name: Clang version
|
|
run: clang -v
|
|
|
|
- name: Build and test
|
|
if: matrix.os == env.LINUX_IMAGE || matrix.os == env.MACOS_IMAGE
|
|
run: ./project.sh "build_type=${{ matrix.build_type }}" test all
|
|
- name: Build and test (Windows)
|
|
if: matrix.os == env.WINDOWS_IMAGE
|
|
run: pwsh ./project.ps1 "build_type=${{ matrix.build_type }}" test all
|