Skip to content

CI

CI #147

Workflow file for this run

# Github worflow to test Agora on a variety of platforms
#
# Also uploads the documentation to Github pages.
#
# Note:
# - Try to use the native Github action syntax (${{ expression }}) when possible,
# as they are substituted with their value in the logs, unlike env variable.
# For example use `${{ github.workspace }}` over `${GITHUB_WORKSPACE}`
name: CI
on:
push:
branches:
- 'v*.*.x'
tags:
- 'v*'
pull_request:
branches:
- 'v*.*.x'
# Do a periodic build (every Monday at 0600) to ensure integrity
schedule:
- cron: '0 6 * * 1'
jobs:
main:
name: Run
# The configuration matrix: We define all possible combinations here,
# then add excludes for things we don't want to test,
# and include to specify job-specific data.
strategy:
# Disable `fail-fast` because we want the whole test suite to run even if one
# of the nigthly is broken
fail-fast: false
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
dc: [ dmd-latest, ldc-latest, dmd-master, ldc-master ]
# Define job-specific parameters
include:
# By default, don't generate artifacts nor run extra checks for push
- { artifacts: false, run_extra_checks: false }
- { dc: ldc-latest, artifacts: true, run_extra_checks: true }
exclude:
- { dc: dmd-latest, os: macOS-latest }
- { dc: dmd-master, os: macOS-latest }
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
# Checkout this repository and its submodules
- uses: actions/checkout@v4
with:
# For codecov
fetch-depth: 2
# Install the D compiler
- name: Prepare compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
# Add whatever debugging information can be useful in the long run here
- name: Print system information
shell: bash
run: |
${DC} --version
dub --version
- name: 'Run unittests'
shell: bash
run: dub test --compiler=$DC -b unittest-cov -c unittest
- name: 'Upload code coverage'
uses: codecov/codecov-action@v4
with:
flags: unittests