odin-blend2d

Odin bindings to Blend2D
Log | Files | Refs | README | LICENSE

build.yml (19189B)


      1 name: "Build"
      2 on:
      3   push:
      4   pull_request:
      5 
      6 concurrency:
      7   group: ${{github.ref}}
      8   cancel-in-progress: ${{github.ref != 'refs/heads/master'}}
      9 
     10 defaults:
     11   run:
     12     shell: bash
     13 
     14 jobs:
     15   source-check:
     16     name: "source check"
     17     runs-on: ubuntu-latest
     18 
     19     steps:
     20     - name: "Checkout"
     21       uses: actions/checkout@v5
     22 
     23     - name: "Setup node.js"
     24       uses: actions/setup-node@v5
     25       with:
     26         node-version: "*"
     27 
     28     - name: "Check Enumerations"
     29       run: |
     30         cd tools
     31         node enumgen.js --verify
     32 
     33   build:
     34     strategy:
     35       fail-fast: false
     36       matrix:
     37         include:
     38           - { title: "linux/analyze-build"   , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=0", diagnostics: "analyze-build"}
     39           - { title: "linux/asan"            , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "asan", }
     40           - { title: "linux/msan"            , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "msan", }
     41           - { title: "linux/ubsan"           , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "ubsan", }
     42           - { title: "linux/hardened"        , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "hardened", }
     43           - { title: "linux/valgrind"        , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "valgrind", }
     44           - { title: "linux/no-deprecated"   , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_DEPRECATED=1" }
     45           - { title: "linux/no-logging"      , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1" }
     46           - { title: "linux/no-logging-text" , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1,ASMJIT_NO_TEXT=1" }
     47           - { title: "linux/no-builder"      , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_BUILDER=1" }
     48           - { title: "linux/no-compiler"     , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1" }
     49           - { title: "linux/no-introspection", host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1,ASMJIT_NO_INTROSPECTION=1" }
     50           - { title: "linux/no-jit"          , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_JIT=1" }
     51           - { title: "linux/no-validation"   , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_VALIDATION=1" }
     52           - { title: "linux/no-x86"          , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_X86=1" }
     53           - { title: "linux/no-aarch64"      , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_AARCH64=1" }
     54           - { title: "linux/use-c++20"       , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++20" }
     55           - { title: "linux/use-c++23"       , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++23" }
     56           - { title: "linux/use-avx2+bmi2"   , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-mavx2 -mbmi2" }
     57           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-9"   , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     58           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-9"   , conf: "Release", defs: "ASMJIT_TEST=1" }
     59           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-9"   , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     60           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-9"   , conf: "Release", defs: "ASMJIT_TEST=1" }
     61           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-10"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     62           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-10"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     63           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-10"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     64           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-10"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     65           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-11"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     66           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-11"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     67           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-11"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     68           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-11"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     69           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-12"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     70           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-12"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     71           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-12"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     72           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-12"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     73           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-13"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     74           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-13"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     75           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-13"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     76           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-13"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     77           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-14"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     78           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "gcc-14"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     79           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-14"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     80           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "gcc-14"  , conf: "Release", defs: "ASMJIT_TEST=1" }
     81           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-14", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     82           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-14", conf: "Release", defs: "ASMJIT_TEST=1" }
     83           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-14", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     84           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-14", conf: "Release", defs: "ASMJIT_TEST=1" }
     85           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-15", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     86           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-15", conf: "Release", defs: "ASMJIT_TEST=1" }
     87           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-15", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     88           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-15", conf: "Release", defs: "ASMJIT_TEST=1" }
     89           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-16", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     90           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-16", conf: "Release", defs: "ASMJIT_TEST=1" }
     91           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-16", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     92           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-16", conf: "Release", defs: "ASMJIT_TEST=1" }
     93           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-17", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     94           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-17", conf: "Release", defs: "ASMJIT_TEST=1" }
     95           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-17", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     96           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-17", conf: "Release", defs: "ASMJIT_TEST=1" }
     97           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-18", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
     98           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1" }
     99           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-18", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    100           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1" }
    101           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    102           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1" }
    103           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    104           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1" }
    105           - { title: "linux"                 , host: "ubuntu-24.04-arm", arch: "arm64"  , cc: "clang-19", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    106           - { title: "linux"                 , host: "ubuntu-24.04-arm", arch: "arm64"  , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1" }
    107           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-20", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    108           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x86"    , cc: "clang-20", conf: "Release", defs: "ASMJIT_TEST=1" }
    109           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-20", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    110           - { title: "linux"                 , host: "ubuntu-24.04"    , arch: "x64"    , cc: "clang-20", conf: "Release", defs: "ASMJIT_TEST=1" }
    111           - { title: "linux"                 , host: "ubuntu-24.04-arm", arch: "arm64"  , cc: "clang-20", conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    112           - { title: "linux"                 , host: "ubuntu-24.04-arm", arch: "arm64"  , cc: "clang-20", conf: "Release", defs: "ASMJIT_TEST=1" }
    113           - { title: "macos"                 , host: "macos-15-intel"  , arch: "x64"    , cc: "gcc-14"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    114           - { title: "macos"                 , host: "macos-15-intel"  , arch: "x64"    , cc: "gcc-14"  , conf: "Release", defs: "ASMJIT_TEST=1" }
    115           - { title: "macos"                 , host: "macos-15-intel"  , arch: "x64"    , cc: "clang"   , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    116           - { title: "macos"                 , host: "macos-15-intel"  , arch: "x64"    , cc: "clang"   , conf: "Release", defs: "ASMJIT_TEST=1" }
    117           - { title: "macos"                 , host: "macos-15"        , arch: "arm64"  , cc: "clang"   , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    118           - { title: "macos"                 , host: "macos-15"        , arch: "arm64"  , cc: "clang"   , conf: "Release", defs: "ASMJIT_TEST=1" }
    119           - { title: "windows"               , host: "windows-2022"    , arch: "x86"    , cc: "vs2022"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    120           - { title: "windows"               , host: "windows-2022"    , arch: "x86"    , cc: "vs2022"  , conf: "Release", defs: "ASMJIT_TEST=1" }
    121           - { title: "windows"               , host: "windows-2022"    , arch: "x64"    , cc: "vs2022"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    122           - { title: "windows"               , host: "windows-2022"    , arch: "x64"    , cc: "vs2022"  , conf: "Release", defs: "ASMJIT_TEST=1" }
    123           - { title: "windows"               , host: "windows-11-arm"  , arch: "arm64"  , cc: "vs2022"  , conf: "Debug"  , defs: "ASMJIT_TEST=1" }
    124           - { title: "windows"               , host: "windows-11-arm"  , arch: "arm64"  , cc: "vs2022"  , conf: "Release", defs: "ASMJIT_TEST=1" }
    125           - { title: "windows/uwp"           , host: "windows-2022"    , arch: "x64"    , cc: "vs2022"  , conf: "Release", defs: "ASMJIT_TEST=0,CMAKE_SYSTEM_NAME=WindowsStore,CMAKE_SYSTEM_VERSION=10.0,CMAKE_CXX_FLAGS=-D_WIN32_WINNT=0x0A00" }
    126           - { title: "freebsd"               , host: "ubuntu-latest"   , arch: "x64"    , cc: "clang"   , conf: "Release", vm: "freebsd", vm_ver: "14.2", defs: "ASMJIT_TEST=1" }
    127           - { title: "freebsd"               , host: "ubuntu-latest"   , arch: "arm64"  , cc: "clang"   , conf: "Release", vm: "freebsd", vm_ver: "14.2", defs: "ASMJIT_TEST=1" }
    128           - { title: "netbsd"                , host: "ubuntu-latest"   , arch: "x64"    , cc: "clang"   , conf: "Release", vm: "netbsd" , vm_ver: "10.1", defs: "ASMJIT_TEST=1" }
    129           - { title: "netbsd"                , host: "ubuntu-latest"   , arch: "arm64"  , cc: "clang"   , conf: "Release", vm: "netbsd" , vm_ver: "10.1", defs: "ASMJIT_TEST=1" }
    130           - { title: "openbsd"               , host: "ubuntu-latest"   , arch: "x64"    , cc: "clang"   , conf: "Release", vm: "openbsd", vm_ver: "7.4" , defs: "ASMJIT_TEST=1" }
    131           - { title: "openbsd"               , host: "ubuntu-latest"   , arch: "arm64"  , cc: "clang"   , conf: "Release", vm: "openbsd", vm_ver: "7.4" , defs: "ASMJIT_TEST=1" }
    132           - { title: "debian"                , host: "ubuntu-latest"   , arch: "arm/v7" , cc: "clang"   , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" }
    133           - { title: "debian"                , host: "ubuntu-latest"   , arch: "riscv64", cc: "clang"   , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" }
    134           - { title: "debian"                , host: "ubuntu-latest"   , arch: "ppc64le", cc: "clang"   , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" }
    135 
    136     name: "${{matrix.title}}/${{matrix.arch}}, ${{matrix.cc}} ${{matrix.conf}}"
    137     runs-on: "${{matrix.host}}"
    138 
    139     steps:
    140       - name: "Checkout"
    141         uses: actions/checkout@v5
    142         with:
    143           path: "source"
    144 
    145       - name: "Checkout Build Actions"
    146         uses: actions/checkout@v5
    147         with:
    148           repository: build-actions/build-actions
    149           path: "build-actions"
    150 
    151       - name: "Python"
    152         uses: actions/setup-python@v6
    153         with:
    154           python-version: "3.x"
    155 
    156       - name: QEMU
    157         if: ${{matrix.vm && !matrix.vm_ver}}
    158         uses: docker/setup-qemu-action@v3
    159         with:
    160           platforms: linux/${{matrix.arch}}
    161 
    162       - name: "Build & Test - Native"
    163         if: ${{!matrix.vm}}
    164         run: python build-actions/action.py
    165                --source-dir=source
    166                --config=source/.github/workflows/build-config.json
    167                --compiler=${{matrix.cc}}
    168                --diagnostics=${{matrix.diagnostics}}
    169                --architecture=${{matrix.arch}}
    170                --problem-matcher=auto
    171                --build-type=${{matrix.conf}}
    172                --build-defs="${{matrix.defs}}"
    173 
    174       - name: "Build & Test - Cross Platform Actions"
    175         if: ${{matrix.vm && matrix.vm_ver}}
    176         uses: cross-platform-actions/action@master
    177         with:
    178           operating_system: ${{matrix.vm}}
    179           architecture: ${{matrix.arch}}
    180           version: ${{matrix.vm_ver}}
    181           sync_files: "runner-to-vm"
    182           shutdown_vm: false
    183           shell: bash
    184           run: |
    185             set -e
    186 
    187             PATH="/usr/sbin:/usr/pkg/sbin:/usr/pkg/bin:$PATH:$(pwd)/build-actions"
    188             CI_NETBSD_USE_PKGIN=1
    189 
    190             export PATH
    191             export CI_NETBSD_USE_PKGIN
    192 
    193             sh ./build-actions/prepare-environment.sh
    194             python3 build-actions/action.py                        \
    195               --source-dir=source                                  \
    196               --config=source/.github/workflows/build-config.json  \
    197               --compiler=${{matrix.cc}}                            \
    198               --diagnostics=${{matrix.diagnostics}}                \
    199               --architecture=${{matrix.arch}}                      \
    200               --problem-matcher=auto                               \
    201               --build-type=${{matrix.conf}}                        \
    202               --build-defs="${{matrix.defs}}"
    203 
    204       - name: "Build & Test - Docker + QEMU"
    205         if: ${{matrix.vm && !matrix.vm_ver}}
    206         run: |
    207           docker run                                               \
    208             --rm                                                   \
    209             -v $(pwd):/${{github.workspace}}                       \
    210             -w ${{github.workspace}}/build-actions                 \
    211             --platform linux/${{matrix.arch}}                      \
    212             ${{matrix.vm}}                                         \
    213             bash action.sh                                         \
    214             --source-dir=../source                                 \
    215             --config=../source/.github/workflows/build-config.json \
    216             --compiler=${{matrix.cc}}                              \
    217             --diagnostics=${{matrix.diagnostics}}                  \
    218             --architecture=${{matrix.arch}}                        \
    219             --problem-matcher=auto                                 \
    220             --build-type=${{matrix.conf}}                          \
    221             --build-defs="${{matrix.defs}}"