Skip to content

Commit 80f9a9d

Browse files
committed
Replace travis-ci with Github CI
Travis CI is going the way of the dodo for open source, as they introduced limitations which make it almost impossible to work with. Github CI is an appealing alternative, free for open source, expressive, and offering support for all three major platforms.
1 parent 52d814c commit 80f9a9d

File tree

3 files changed

+42
-25
lines changed

3 files changed

+42
-25
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
on: [ push, pull_request ]
3+
4+
jobs:
5+
main:
6+
name: Run
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ ubuntu-latest ]
11+
dc: [ dmd-latest, dmd-beta, ldc-latest ]
12+
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- name: Prepare compiler
16+
uses: dlang-community/setup-dlang@v1
17+
with:
18+
compiler: ${{ matrix.dc }}
19+
20+
- uses: actions/checkout@v2
21+
22+
- name: Test
23+
if: matrix.dc != 'ldc-latest'
24+
run: |
25+
# Tests are neither random- nor parallelizable atm., so use a --single serial thread.
26+
dub test --compiler=$DC -- --single --trace
27+
28+
- name: Test with coverage
29+
if: matrix.dc == 'ldc-latest'
30+
env:
31+
COVERAGE: true
32+
run: |
33+
# Mirrot the previous `run` step but with `--build=unittest-cov`
34+
dub test --compiler=$DC --build=unittest-cov -- --single --trace
35+
36+
- name: Upload code coverage
37+
if: matrix.dc == 'ldc-latest'
38+
uses: codecov/codecov-action@v1

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

source/dlangbot/app.d

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@ void agentShutdownCheck(HTTPServerRequest req, HTTPServerResponse res)
449449
shared static this()
450450
{
451451
import std.process : environment;
452+
// TODO: This should work on other compilers, but created a linker error on Github CI:
453+
// /home/runner/work/dlang-bot/dlang-bot/source/dlangbot/app.d:460: error: undefined reference to '_D3etc5linux11memoryerror26registerMemoryErrorHandlerFZb'
454+
// See https://github.com/dlang/dlang-bot/pull/263
455+
version (DMD)
452456
version (linux)
453457
{
454458
// Only Glibc x86 / x86_64 supports this method, so check if defined

0 commit comments

Comments
 (0)