Skip to content

Commit 9b3e5f0

Browse files
authored
Add GitHub Actions to replace Travis-CI (#356)
* Add GitHub Actions flow * Pull out GDC config as it’s not supported
1 parent 0f8e514 commit 9b3e5f0

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
# allow this workflow to be triggered manually
12+
13+
jobs:
14+
builder:
15+
name: 'Build and test on ${{ matrix.arch }}-${{ matrix.os }}/${{ matrix.dc }}'
16+
runs-on: ${{ matrix.os }}
17+
continue-on-error: ${{ contains(matrix.dc, 'master') || contains(matrix.dc, 'beta') }}
18+
env:
19+
ARCH: ${{ matrix.arch }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
dc: [ldc-latest, ldc-beta, dmd-latest, dmd-master, dmd-beta]
24+
os: [ubuntu-latest]
25+
arch: [x86, x86_64]
26+
include:
27+
- dc: ldc-latest
28+
os: macos-latest
29+
arch: x86_64
30+
- dc: dmd-latest
31+
os: macos-latest
32+
arch: x86_64
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: dlang-community/setup-dlang@v1.1.0
36+
with:
37+
compiler: ${{ matrix.dc }}
38+
- name: Install multi-lib for 32-bit systems
39+
if: matrix.arch == 'x86'
40+
run: sudo apt-get install gcc-multilib
41+
- id: build
42+
name: Test building
43+
run: bash -e test_travis.sh
44+
- id: coverage
45+
name: Upload coverage data
46+
run: bash <(curl -s https://codecov.io/bash)
47+
48+

test_travis.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ then
44
docker run --rm --privileged multiarch/qemu-user-static:register --reset
55
docker build -t ion-arm64 . -f Dockerfile.aarch64
66
else
7+
echo $DC
78
echo $ARCH
8-
dub test --arch=$ARCH --build=unittest-dip1000
9+
if [ "$DC" != "gdc" ]
10+
then
11+
dub test --arch=$ARCH --build=unittest-dip1000
12+
fi
913
dub test --arch=$ARCH --build=unittest-cov
1014
# if [ \( "$DC" = "ldc2" \) -o \( "$DC" = "ldmd2" \) ]
1115
# then

0 commit comments

Comments
 (0)