Skip to content

Merge pull request #2773 from Geod24/mlang/CommandLineName #2077

Merge pull request #2773 from Geod24/mlang/CommandLineName

Merge pull request #2773 from Geod24/mlang/CommandLineName #2077

Workflow file for this run

# Cross platform tests for DUB
name: Testsuite
# Only triggers on pushes to master & stable, as well as PR to master and stable
# Sometimes reverts appear in the upstream repository (e.g. when the revert button
# is clicked by a contributor with commit access), this should be tested as PR).
#
# Also note that Github actions does not retrigger on target branch changes,
# hence the check on push.
on:
pull_request:
branches:
- master
- stable
paths-ignore:
- 'changelog/**'
push:
branches:
- master
- stable
# Use this branch name in your fork to test changes
- github-actions
jobs:
main:
name: Run
strategy:
# Default, disable if you want to debug
fail-fast: false
matrix:
# Latest stable version, update at will
os: [ macOS-11, ubuntu-20.04, windows-2019 ]
dc:
- dmd-latest
- dmd-2.100.2
- ldc-latest
- dmd-master
# - ldc-master
# This is the bootstrap compiler used to compile the releases
- ldc-1.23.0
# Some intermediate compilers for good measure
- dmd-2.095.1
- dmd-2.098.1
include:
- { do_test: true }
- { dc: dmd-2.095.1, do_test: false }
- { dc: dmd-2.098.1, do_test: false }
- { dc: ldc-1.23.0 , do_test: false }
runs-on: ${{ matrix.os }}
steps:
# Install required dependencies
- name: '[OSX] Install dependencies'
if: runner.os == 'macOS'
run: |
brew install pkg-config coreutils
echo "PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig/" >> $GITHUB_ENV
- name: '[Linux] Install dependencies'
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat
# Compiler to test with
- name: Prepare compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
# Checkout the repository
- name: Checkout
uses: actions/checkout@v3
- name: '[POSIX] Test'
if: runner.os != 'Windows'
env:
COVERAGE: false
# The value doesn't matter as long as it's > 2.087
FRONTEND: 2.095.0
run: |
dub build --compiler=${{ env.DC }}
if [[ ${{ matrix.do_test }} == 'true' ]]; then
dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
./scripts/ci/travis.sh
fi
- name: '[Windows] Test'
if: runner.os == 'Windows'
env:
DUB: ${{ github.workspace }}\bin\dub.exe
run: |
dub build --compiler=${{ env.DC }}
if [[ ${{ matrix.do_test }} == 'true' ]]; then
dub test --compiler=${{ env.DC }}
dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
dub --single test/run-unittest.d
# FIXME: DMD fails a few tests on Windows; remove them for now
if [[ '${{ matrix.dc }}' = dmd* ]]; then
# DLL support is lacking
rm -rf test/{1-dynLib-simple,2-dynLib-dep,2-dynLib-with-staticLib-dep}
# Unicode in paths too
rm -rf test/issue130-unicode-СНА*
# ImportC probably requires set-up MSVC environment variables
rm -rf test/use-c-sources
fi
test/run-unittest.sh
fi
shell: bash