From ed51bd7b0756a777c1c8911b63ccd973c033623d Mon Sep 17 00:00:00 2001 From: Andreas Zwinkau Date: Sat, 12 Jun 2021 13:04:07 +0200 Subject: [PATCH] Switch from TravisCI and AppVeyor to Github Actions (#8) No build status buttons anymore and no code coverage check anymore. On the plus side, we now also test on OS X. Fixes #7 --- .github/workflows/dub-test.yml | 23 ++++++++ .travis.yml | 13 ----- README.md | 3 - appveyor.yml | 100 --------------------------------- 4 files changed, 23 insertions(+), 116 deletions(-) create mode 100644 .github/workflows/dub-test.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/dub-test.yml b/.github/workflows/dub-test.yml new file mode 100644 index 0000000..c50599a --- /dev/null +++ b/.github/workflows/dub-test.yml @@ -0,0 +1,23 @@ +name: Run all D Tests +on: [push, pull_request] +jobs: + test: + name: Dub Tests + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + dc: [dmd-latest, ldc-latest, dmd-2.090.0, ldc-1.17.0] + exclude: + - { os: macOS-latest, dc: dmd-2.090.0 } + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Install D compiler + uses: dlang-community/setup-dlang@v1.1.0 + with: + compiler: ${{ matrix.dc }} + + - name: Run tests + run: dub -q test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 23f022d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: d -d: - - dmd - - dmd-beta - - dmd-nightly - - ldc - -script: - - dub test -b unittest-cov - - grep "is 100% covered" source-money.lst - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index e7166c5..47f62a3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -[![Build Status Travis](https://travis-ci.org/dlang-community/d-money.svg?branch=master)](https://travis-ci.org/dlang-community/d-money) -[![Build status Appveyor](https://ci.appveyor.com/api/projects/status/n6q6m5975c4h219m/branch/master?svg=true)](https://ci.appveyor.com/project/qznc/d-money/branch/master) -[![codecov status](https://codecov.io/gh/dlang-community/d-money/branch/master/graph/badge.svg)](https://codecov.io/gh/dlang-community/d-money) [![Dub Package](https://img.shields.io/dub/v/money.svg)](https://code.dlang.org/packages/money) # D-Money diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 8859121..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,100 +0,0 @@ -platform: x64 -environment: - matrix: - - DC: dmd - DVersion: beta - arch: x64 - - DC: dmd - DVersion: beta - arch: x86 - - DC: dmd - DVersion: stable - arch: x64 - - DC: dmd - DVersion: stable - arch: x86 - -skip_tags: false - -install: - - ps: function ResolveLatestDMD - { - $version = $env:DVersion; - if($version -eq "stable") { - $latest = (Invoke-WebRequest "http://downloads.dlang.org/releases/LATEST").toString(); - $url = "http://downloads.dlang.org/releases/2.x/$($latest)/dmd.$($latest).windows.7z"; - }elseif($version -eq "beta") { - $latest = (Invoke-WebRequest "http://downloads.dlang.org/pre-releases/LATEST").toString(); - $latestVersion = $latest.split("-")[0].split("~")[0]; - $url = "http://downloads.dlang.org/pre-releases/2.x/$($latestVersion)/dmd.$($latest).windows.7z"; - }elseif($version -eq "nightly") { - $url = "http://nightlies.dlang.org/dmd-master-2017-05-20/dmd.master.windows.7z" - }else { - $url = "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z"; - } - $env:PATH += ";C:\dmd2\windows\bin;"; - return $url; - } - - ps: function ResolveLatestLDC - { - $version = $env:DVersion; - if($version -eq "stable") { - $latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST").toString().replace("`n","").replace("`r",""); - $url = "https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-win64-msvc.zip"; - }elseif($version -eq "beta") { - $latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST_BETA").toString().replace("`n","").replace("`r",""); - $url = "https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-win64-msvc.zip"; - } else { - $latest = $version; - $url = "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-win64-msvc.zip"; - } - $env:PATH += ";C:\ldc2-$($latest)-win64-msvc\bin"; - $env:DC = "ldc2"; - return $url; - } - - ps: function SetUpDCompiler - { - $env:toolchain = "msvc"; - if($env:DC -eq "dmd"){ - echo "downloading ..."; - $url = ResolveLatestDMD; - echo $url; - Invoke-WebRequest $url -OutFile "c:\dmd.7z"; - echo "finished."; - pushd c:\\; - 7z x dmd.7z > $null; - popd; - } - elseif($env:DC -eq "ldc"){ - echo "downloading ..."; - $url = ResolveLatestLDC; - echo $url; - Invoke-WebRequest $url -OutFile "c:\ldc.zip"; - echo "finished."; - pushd c:\\; - 7z x ldc.zip > $null; - popd; - } - } - - ps: SetUpDCompiler - -build_script: - - ps: if($env:arch -eq "x86"){ - $env:compilersetupargs = "x86"; - $env:Darch = "x86"; - $env:DConf = "m32"; - }elseif($env:arch -eq "x64"){ - $env:compilersetupargs = "amd64"; - $env:Darch = "x86_64"; - $env:DConf = "m64"; - } - - ps: $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall"; - - '"%compilersetup%" %compilersetupargs%' - -test_script: - - echo %PLATFORM% - - echo %Darch% - - echo %DC% - - echo %PATH% - - '%DC% --version' - - dub test --arch=%Darch% --compiler=%DC%