diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index e784b96b..f3800006 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -3,44 +3,64 @@ on: [push, pull_request] jobs: test: + if: "!contains(github.event.head_commit.message, '[skip ci]')" name: Dub Test strategy: + fail-fast: false matrix: - os: [ubuntu-20.04] + os: [ubuntu-20.04, windows-latest] dc: - dmd-2.096.1 - dmd-2.095.0 - ldc-1.26.0 - ldc-1.20.0 - + arch: + - x86_64 + clang: + - 10 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - name: Install package dependencies - run: | - sudo apt-get update -y -qq - sudo apt-get install -y -qq libclang-10-dev + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3 + bundler-cache: true - - uses: actions/setup-ruby@v1 + # Ruby puts this on the path which breaks ldc + - name: Rename msys64/link.exe + if: startsWith(matrix.os,'windows') + shell: pwsh + run: mv C:\msys64\usr\bin\link.exe C:\msys64\usr\bin\msys-link.exe - - run: gem install bundler -v 1.17.3 + - name: Setup D + uses: dlang-community/setup-dlang@v1 + with: + compiler: ${{ matrix.dc }} - - run: bundle install + - name: Setup Visual Studio Command Prompt - Windows + if: startsWith(matrix.os,'windows') + uses: ilammy/msvc-dev-cmd@v1 - - name: Install D compiler - uses: dlang-community/setup-dlang@v1.0.5 + # NOTE use KyleMayes/install-llvm-action once https://github.com/KyleMayes/install-llvm-action/pull/11 is merged + - name: Setup LLVM + uses: aminya/install-llvm-action@default-directory with: - compiler: ${{ matrix.dc }} + version: ${{ matrix.clang }} + + - name: Linux - link libclang.so + if: contains(matrix.os, 'ubuntu') + run: sudo ln -s libclang-${{ matrix.clang }}.so.1 /lib/x86_64-linux-gnu/libclang.so + working-directory: ${{ env.LLVM_PATH }}/lib - name: Run tests - run: dub test -q --build=unittest-cov + run: dub test -q --build=unittest-cov --arch=${{ matrix.arch }} env: - LIBRARY_PATH: /usr/lib/llvm-10/lib + LIBRARY_PATH: "${{ env.LLVM_PATH }}/lib" - name: Build binary - run: dub build -q + run: dub build -q --arch=${{ matrix.arch }} env: - LIBRARY_PATH: /usr/lib/llvm-10/lib + LIBRARY_PATH: "${{ env.LLVM_PATH }}/lib" - uses: codecov/codecov-action@v1 diff --git a/Gemfile b/Gemfile index 0a68143c..c08e9094 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'aruba', '~> 0.6.2' -gem 'cucumber', '~>2.0.0' +gem 'aruba', '1.1.1' +gem 'cucumber', '6.1.0' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 947c75d2..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,39 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - aruba (0.6.2) - childprocess (>= 0.3.6) - cucumber (>= 1.1.1) - rspec-expectations (>= 2.7.0) - builder (3.2.3) - childprocess (0.7.1) - ffi (~> 1.0, >= 1.0.11) - cucumber (2.0.2) - builder (>= 2.1.2) - cucumber-core (~> 1.2.0) - diff-lcs (>= 1.1.3) - gherkin (~> 2.12) - multi_json (>= 1.7.5, < 2.0) - multi_test (>= 0.1.2) - cucumber-core (1.2.0) - gherkin (~> 2.12.0) - diff-lcs (1.3) - ffi (1.9.18) - gherkin (2.12.2) - multi_json (~> 1.3) - multi_json (1.12.1) - multi_test (0.1.2) - rspec-expectations (3.6.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - -PLATFORMS - ruby - -DEPENDENCIES - aruba (~> 0.6.2) - cucumber (~> 2.0.0) - -BUNDLED WITH - 1.14.6 diff --git a/README.md b/README.md index 741555b1..eb0dbcd3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ d++ - #include C and C++ headers in D files ==================================================== -[![Build Status](https://travis-ci.org/atilaneves/dpp.png?branch=master)](https://travis-ci.org/atilaneves/dpp) -[![Build Status](https://ci.appveyor.com/api/projects/status/github/atilaneves/dpp?branch=master&svg=true)](https://ci.appveyor.com/project/atilaneves/dpp) +[![CI](https://github.com/atilaneves/dpp/actions/workflows/d.yml/badge.svg)](https://github.com/atilaneves/dpp/actions/workflows/d.yml) [![Coverage](https://codecov.io/gh/atilaneves/dpp/branch/master/graph/badge.svg)](https://codecov.io/gh/atilaneves/dpp) [![Open on run.dlang.io](https://img.shields.io/badge/run.dlang.io-open-blue.svg)](https://run.dlang.io/is/JK0CAf) diff --git a/appveyor.yml b/appveyor.yml index 6bdee172..c6ce7833 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,77 +1,5 @@ -platform: x64 -environment: - matrix: - - DC: dmd - DVersion: 2.095.0 - arch: x64 +build: off -skip_tags: true - -install: - - ps: function SetUpDCompiler - { - if($env:DC -eq "dmd"){ - if($env:arch -eq "x86"){ - $env:DConf = "m32"; - } - elseif($env:arch -eq "x64"){ - $env:DConf = "m64"; - } - echo "downloading ..."; - $env:toolchain = "msvc"; - $version = $env:DVersion; - Invoke-WebRequest "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z" -OutFile "c:\dmd.7z"; - echo "finished."; - pushd c:\\; - 7z x dmd.7z > $null; - popd; - } - elseif($env:DC -eq "ldc"){ - echo "downloading ..."; - if($env:arch -eq "x86"){ - $env:DConf = "m32"; - } - elseif($env:arch -eq "x64"){ - $env:DConf = "m64"; - } - $env:toolchain = "msvc"; - $version = $env:DVersion; - Invoke-WebRequest "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-win64-msvc.zip" -OutFile "c:\ldc.zip"; - echo "finished."; - pushd c:\\; - 7z x ldc.zip > $null; - popd; - } - } - - ps: SetUpDCompiler - -before_build: - - ps: if($env:arch -eq "x86"){ - $env:compilersetupargs = "x86"; - $env:Darch = "x86"; - } - elseif($env:arch -eq "x64"){ - $env:compilersetupargs = "amd64"; - $env:Darch = "x86_64"; - } - - ps : if($env:DC -eq "dmd"){ - $env:PATH += ";C:\dmd2\windows\bin;"; - } - elseif($env:DC -eq "ldc"){ - $version = $env:DVersion; - $env:PATH += ";C:\ldc2-$($version)-win64-msvc\bin"; - $env:DC = "ldc2"; - } - - ps: $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall"; - - '"%compilersetup%" %compilersetupargs%' - -build_script: - - echo dummy build script - dont remove me - -test_script: - - echo %PLATFORM% - - echo %Darch% - - echo %DC% - - echo %PATH% - - '%DC% --version' - - dub test --arch=%Darch% --registry=http://31.15.67.41 +branches: + only: + - non-existing