Validate format strings at compile time #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 Soulfind Contributors | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
os: [linux-x86_64, macos-x86_64, macos-arm64, windows-x86_64] | |
compiler: [ldc, dmd] | |
type: [release, debug] | |
include: | |
- os: linux-x86_64 | |
image: ubuntu-latest | |
container: alpine:edge | |
- os: macos-x86_64 | |
image: macos-13 | |
target: 10.12 | |
- os: macos-arm64 | |
image: macos-latest | |
target: 11 | |
- os: windows-x86_64 | |
image: windows-latest | |
- os: linux-x86_64 | |
compiler: ldc | |
dflags: -static -preview=all | |
- type: debug | |
flags: --debug=db --debug=msg --debug=user | |
- compiler: ldc | |
dflags: -preview=all | |
exclude: | |
- os: macos-arm64 | |
compiler: dmd | |
runs-on: ${{ matrix.image }} | |
container: ${{ matrix.container }} | |
env: | |
DFLAGS: ${{ matrix.dflags }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.target }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up D (Linux) | |
if: runner.os == 'Linux' | |
run: apk add ${{ matrix.compiler }} dub gcc musl-dev sqlite-static | |
- name: Set up D (Other) | |
if: runner.os != 'Linux' | |
uses: dlang-community/setup-dlang@v2 | |
with: | |
compiler: ${{ matrix.compiler }} | |
- name: Build | |
run: dub build -v --build=${{ matrix.type }} ${{ matrix.flags }} | |
- name: Sign binaries (macOS) | |
if: runner.os == 'macOS' | |
run: codesign -s - bin/* | |
- name: Archive artifacts | |
if: matrix.compiler == 'ldc' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: soulfind-${{ matrix.os }}-${{ matrix.type }} | |
path: bin |