Merge 04ad7cdd4f into d8e43e23ec
This commit is contained in:
commit
004155c38a
|
|
@ -15,20 +15,42 @@ permissions:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
strategy:
|
||||||
runs-on: ubuntu-latest
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
dc: [dmd, ldc]
|
||||||
|
include:
|
||||||
|
- { os: ubuntu-latest, dc: gdc-14 }
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7
|
- uses: dlang-community/setup-dlang@v2
|
||||||
|
with:
|
||||||
|
compiler: ${{ matrix.dc }}
|
||||||
|
dub: latest
|
||||||
|
|
||||||
- name: 'Build & Test'
|
- name: Setup gdc specific environment
|
||||||
run: |
|
if: ${{ startsWith(matrix.dc, 'gdc') }}
|
||||||
# Build the project, with its main file included, without unittests
|
run: |
|
||||||
dub build --compiler=$DC
|
tee -a ${GITHUB_ENV} <<<"DC=${DMD}"
|
||||||
# Build and run tests, as defined by `unittest` configuration
|
# Linking errors without -allinst
|
||||||
# In this mode, `mainSourceFile` is excluded and `version (unittest)` are included
|
# No other easy way to pass this to dub, using DFLAGS in the
|
||||||
# See https://dub.pm/package-format-json.html#configurations
|
# environment disables unittests
|
||||||
dub test --compiler=$DC
|
cat <<-EOF | sudo tee -a /etc/dmd.conf
|
||||||
# Run tests
|
[Environment]
|
||||||
cd tests && rdmd test
|
DFLAGS=-allinst
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: 'Build & Test'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Build the project, with its main file included, without unittests
|
||||||
|
dub build
|
||||||
|
# Build and run tests, as defined by `unittest` configuration
|
||||||
|
# In this mode, `mainSourceFile` is excluded and `version (unittest)` are included
|
||||||
|
# See https://dub.pm/package-format-json.html#configurations
|
||||||
|
dub test
|
||||||
|
# Run tests
|
||||||
|
cd tests && "${DMD}" -run test.d
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue