Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ concurrency:

jobs:
main:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
Expand All @@ -18,21 +21,23 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
DMD: ${{ startsWith(matrix.dc, 'ldc') && 'ldmd2' || 'dmd' }}
N: ${{ startsWith(matrix.os, 'macos') && '3' || '2' }}
steps:
- uses: actions/checkout@v4
- name: Install D compiler
uses: dlang-community/setup-dlang@v1.3.0
uses: dlang-community/setup-dlang@v2
with:
compiler: ${{ matrix.dc }}
# rdmd_test.d needs this
- name: Set DMD to its basename without extension
run: |
val=$(basename "${DMD}")
val=${val%.*}
tee -a ${GITHUB_ENV} <<<"DMD=${val}"
- name: Build
shell: bash
run: make -j$N DMD=$DMD
- name: Test
shell: bash
run: make -j$N DMD=$DMD test
- name: 'Windows: Build and test with MODEL=32'
if: runner.os == 'Windows'
shell: bash
run: make -j$N DMD=$DMD MODEL=32 all test
4 changes: 2 additions & 2 deletions rdmd_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ void runCompilerAgnosticTests(string rdmdApp, string defaultCompiler, string mod
/* Test help string output when no arguments passed. */
auto res = execute([rdmdApp]);
enforce(res.status == 1, res.output);
enforce(res.output.canFind("Usage: rdmd [RDMD AND DMD OPTIONS]... program [PROGRAM OPTIONS]..."));
enforce(res.output.canFind("Usage: rdmd [RDMD AND DMD OPTIONS...] program [PROGRAM OPTIONS...]"));

/* Test --help. */
res = execute([rdmdApp, "--help"]);
enforce(res.status == 0, res.output);
enforce(res.output.canFind("Usage: rdmd [RDMD AND DMD OPTIONS]... program [PROGRAM OPTIONS]..."));
enforce(res.output.canFind("Usage: rdmd [RDMD AND DMD OPTIONS...] program [PROGRAM OPTIONS...]"));

string helpText = res.output;

Expand Down