-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and improve the CI configuration
- Fix a unittest that no longer compile by removing safe annotation; - Properly pass the compiler parameter to the Github action installing it; - Improve job definitions; - Set up a periodic build to avoid breakage when no development happens;
- Loading branch information
Showing
1 changed file
with
23 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,49 @@ | ||
name: CI | ||
|
||
on: [ push, pull_request ] | ||
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: | ||
build: | ||
name: Run | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
dc: [ dmd-latest, ldc-latest, dmd-2.085.1, ldc-1.14.0 ] | ||
include: | ||
- { os: macos-latest, dc: ldc-latest } | ||
- { os: ubuntu-latest, dc: dmd-latest } | ||
- { os: ubuntu-latest, dc: ldc-latest } | ||
- { os: windows-latest, dc: dmd-latest } | ||
- { os: windows-latest, dc: ldc-latest } | ||
|
||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 40 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Requiried for codecov action | ||
fetch-depth: 2 | ||
- uses: dlang-community/setup-dlang@v1 | ||
with: | ||
compiler: ${{ matrix.dc }} | ||
|
||
- name: 'Build & Test' | ||
shell: bash | ||
run: | | ||
dub test --compiler=$DC -b unittest-cov | ||
dub test -b unittest-cov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
flags: unittests |