2023-03-31 19:31:02 +03:00
|
|
|
name: Zig Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- ".gitignore"
|
|
|
|
- "docs/**"
|
|
|
|
- "README"
|
|
|
|
- "CREDITS.TXT"
|
|
|
|
- "COPYING_GLIB"
|
|
|
|
- "COPYING.LGPL2"
|
|
|
|
- "AUTHORS.TXT"
|
|
|
|
- "CHANGELOG"
|
|
|
|
- "COPYING"
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2024-05-06 16:02:24 +03:00
|
|
|
build-ubuntu:
|
2023-03-31 19:31:02 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-05-06 16:02:24 +03:00
|
|
|
runs-on: [ubuntu-latest]
|
2023-03-31 19:31:02 +03:00
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
steps:
|
2024-07-19 06:06:53 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-31 19:31:02 +03:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
2024-09-21 13:24:31 +03:00
|
|
|
version: 0.13.0
|
2023-03-31 19:31:02 +03:00
|
|
|
- uses: lukka/get-cmake@latest
|
|
|
|
with:
|
|
|
|
cmakeVersion: latest
|
|
|
|
ninjaVersion: latest
|
|
|
|
|
|
|
|
- name: CMake Build
|
|
|
|
run: zig build cmake
|
|
|
|
|
|
|
|
- name: Build Summary
|
|
|
|
run: zig build --summary all -freference-trace
|
2024-05-06 16:02:24 +03:00
|
|
|
build-macos:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
runs-on: [macos-latest]
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
steps:
|
2024-07-19 06:06:53 +03:00
|
|
|
- uses: actions/checkout@v4
|
2024-05-06 16:02:24 +03:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
2024-09-21 15:48:40 +03:00
|
|
|
version: 0.13.0
|
2024-05-06 16:02:24 +03:00
|
|
|
- uses: lukka/get-cmake@latest
|
|
|
|
with:
|
|
|
|
cmakeVersion: latest
|
|
|
|
ninjaVersion: latest
|
2023-03-31 19:31:02 +03:00
|
|
|
|
2024-05-06 16:02:24 +03:00
|
|
|
# MacOS has a hard process limit that we will hit if we do a
|
|
|
|
# parallel build, so disable parallel cmake build (manual
|
|
|
|
# option set in `build.zig`)
|
|
|
|
- name: CMake Build
|
|
|
|
run: zig build -Dparallel=false cmake
|
|
|
|
|
|
|
|
- name: Build Summary
|
|
|
|
run: zig build --summary all -freference-trace
|
2023-03-31 19:31:02 +03:00
|
|
|
# ===================================================================
|
|
|
|
# zig-mingw:
|
|
|
|
# runs-on: windows-latest
|
|
|
|
# strategy:
|
|
|
|
# fail-fast: false
|
|
|
|
# matrix:
|
|
|
|
# include: [{ msystem: CLANG64, arch: x86_64, prefix: /clang64 }, { msystem: CLANG32, arch: i686, prefix: /clang32 }, { msystem: CLANGARM64, arch: aarch64, prefix: /clangarm64 }]
|
|
|
|
# steps:
|
2024-07-19 06:06:53 +03:00
|
|
|
# - uses: actions/checkout@v4
|
2023-03-31 19:31:02 +03:00
|
|
|
# with:
|
|
|
|
# path: temp
|
|
|
|
# submodules: recursive
|
|
|
|
# fetch-depth: 0
|
|
|
|
# - uses: goto-bus-stop/setup-zig@v2
|
|
|
|
# with:
|
|
|
|
# version: master
|
|
|
|
# - uses: msys2/setup-msys2@v2
|
|
|
|
# with:
|
|
|
|
# msystem: ${{ matrix.msystem }}
|
|
|
|
# path-type: inherit
|
|
|
|
# location: D:\
|
|
|
|
# install: git mingw-w64-clang-${{ matrix.arch }}-cmake
|
|
|
|
# update: true
|
|
|
|
|
|
|
|
# - name: Move Checkout
|
|
|
|
# run: |
|
|
|
|
# Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse
|
|
|
|
|
|
|
|
# - name: Build Summary - ${{ matrix.arch }}
|
|
|
|
# shell: msys2 {0}
|
|
|
|
# run: |
|
|
|
|
# cd /C/_
|
|
|
|
# zig build cmake
|
|
|
|
# if [${{ matrix.config.arch }} == 'i686' ]; then
|
|
|
|
# zig build --summary all -freference-trace -Dtarget=x86-windows
|
|
|
|
# else
|
|
|
|
# zig build --summary all -freference-trace -Dtarget=${{ matrix.arch }}-windows
|
|
|
|
# fi
|
2024-05-06 16:02:24 +03:00
|
|
|
|