Skip to content

build.yml: fix syntax error #182

build.yml: fix syntax error

build.yml: fix syntax error #182

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Soulfind Contributors
# SPDX-License-Identifier: GPL-3.0-or-later
name: CI
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
linting:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up D
uses: dlang-community/setup-dlang@v2
- name: Linting
run: dub lint
reuse-compliance:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: REUSE compliance
uses: fsfe/reuse-action@v5