From 6283ba6568a93db4be28c8b0d1231843f41480af Mon Sep 17 00:00:00 2001 From: hatf0 Date: Mon, 16 Aug 2021 11:16:21 -0400 Subject: [PATCH 1/2] Add GitHub Actions flow --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ test_travis.sh | 6 +++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..746d1f3e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + # allow this workflow to be triggered manually + +jobs: + builder: + name: 'Build and test on ${{ matrix.arch }}-${{ matrix.os }}/${{ matrix.dc }}' + runs-on: ${{ matrix.os }} + continue-on-error: ${{ contains(matrix.dc, 'master') || contains(matrix.dc, 'beta') || matrix.dc == 'gdc' }} + env: + ARCH: ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + dc: [ldc-latest, ldc-beta, dmd-latest, dmd-master, dmd-beta, gdc] + os: [ubuntu-latest] + arch: [x86, x86_64] + include: + - dc: ldc-latest + os: macos-latest + arch: x86_64 + - dc: dmd-latest + os: macos-latest + arch: x86_64 + steps: + - uses: actions/checkout@v2 + - uses: dlang-community/setup-dlang@v1.1.0 + if: matrix.dc != 'gdc' + with: + compiler: ${{ matrix.dc }} + - uses: dlang-community/setup-dlang@v1.1.0 + name: 'Work around Ubuntu-packaged dub bug' + if: matrix.dc == 'gdc' + with: + compiler: dmd-latest + - name: Install GDC + if: matrix.dc == 'gdc' + run: | + sudo apt-get install gdc + echo "DC=gdc" >> $GITHUB_ENV + - name: Install multi-lib for 32-bit systems + if: matrix.arch == 'x86' + run: sudo apt-get install gcc-multilib + - id: build + name: Test building + run: bash -e test_travis.sh + - id: coverage + name: Upload coverage data + run: bash <(curl -s https://codecov.io/bash) + + diff --git a/test_travis.sh b/test_travis.sh index 5ec323ae..6279e27e 100644 --- a/test_travis.sh +++ b/test_travis.sh @@ -4,8 +4,12 @@ then docker run --rm --privileged multiarch/qemu-user-static:register --reset docker build -t ion-arm64 . -f Dockerfile.aarch64 else + echo $DC echo $ARCH - dub test --arch=$ARCH --build=unittest-dip1000 + if [ "$DC" != "gdc" ] + then + dub test --arch=$ARCH --build=unittest-dip1000 + fi dub test --arch=$ARCH --build=unittest-cov # if [ \( "$DC" = "ldc2" \) -o \( "$DC" = "ldmd2" \) ] # then From 3763d23b7d658d62ae7c66c0fa1b5f2dee66d41b Mon Sep 17 00:00:00 2001 From: Harrison Date: Tue, 17 Aug 2021 07:36:52 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Pull=20out=20GDC=20config=20as=20it?= =?UTF-8?q?=E2=80=99s=20not=20supported?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 746d1f3e..0f436b96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,13 +14,13 @@ jobs: builder: name: 'Build and test on ${{ matrix.arch }}-${{ matrix.os }}/${{ matrix.dc }}' runs-on: ${{ matrix.os }} - continue-on-error: ${{ contains(matrix.dc, 'master') || contains(matrix.dc, 'beta') || matrix.dc == 'gdc' }} + continue-on-error: ${{ contains(matrix.dc, 'master') || contains(matrix.dc, 'beta') }} env: ARCH: ${{ matrix.arch }} strategy: fail-fast: false matrix: - dc: [ldc-latest, ldc-beta, dmd-latest, dmd-master, dmd-beta, gdc] + dc: [ldc-latest, ldc-beta, dmd-latest, dmd-master, dmd-beta] os: [ubuntu-latest] arch: [x86, x86_64] include: @@ -33,19 +33,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: dlang-community/setup-dlang@v1.1.0 - if: matrix.dc != 'gdc' with: compiler: ${{ matrix.dc }} - - uses: dlang-community/setup-dlang@v1.1.0 - name: 'Work around Ubuntu-packaged dub bug' - if: matrix.dc == 'gdc' - with: - compiler: dmd-latest - - name: Install GDC - if: matrix.dc == 'gdc' - run: | - sudo apt-get install gdc - echo "DC=gdc" >> $GITHUB_ENV - name: Install multi-lib for 32-bit systems if: matrix.arch == 'x86' run: sudo apt-get install gcc-multilib