Skip to content

Commit

Permalink
Add moduleView/tour to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthaTi committed Sep 26, 2024
1 parent 966cb21 commit 3c6915a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ jobs:
test:
name: DUB tests
strategy:
fail-fast: false
matrix:
#os: [ubuntu-latest, windows-latest, macOS-latest, macos-12]
dc: [dmd, ldc, ldc-1.28.1]
Expand Down Expand Up @@ -40,3 +41,8 @@ jobs:
shell: bash
run: $DUB build :tour -v
if: matrix.dc != 'ldc-1.28.1'

- name: Test moduleView
shell: bash
run: $DUB test :module-view
if: matrix.dc != 'ldc-1.28.1'
9 changes: 6 additions & 3 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@
"fluid-tree-sitter": "~>0.1.6",
"fluid-tree-sitter:d": "~>0.1.6"
},
"name": "module_view",
"name": "module-view",
"sourceFiles": [
"source/fluid/module_view.d"
],
"sourcePaths": [],
"subConfigurations": {
"fluid": "source"
"fluid": "default"
},
"configurations": [
{
Expand All @@ -144,7 +144,10 @@
},
{
"name": "static",
"targetType": "staticLibrary"
"targetType": "staticLibrary",
"preRunCommands-windows": [
"ldd build/fluid-module-view-test-static.exe"
]
}
],
"targetPath": "build",
Expand Down
16 changes: 12 additions & 4 deletions source/fluid/module_view.d
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,21 @@ struct DlangCompiler {
// Test the executables
foreach (name; candidates) {

auto process = execute([name, "--version"]);
try {

// Found a compatible compiler
if (auto match = process.output.matchFirst(pattern)) {
auto process = execute([name, "--version"]);

// Found a compatible compiler
if (auto match = process.output.matchFirst(pattern)) {

return DlangCompiler(Type.ldc, name, match[1].to!int, match[2].to!int);
return DlangCompiler(Type.ldc, name, match[1].to!int, match[2].to!int);

}

}

catch (ProcessException) {
continue;
}

}
Expand Down
2 changes: 1 addition & 1 deletion tour/dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"fluid": {
"path": ".."
},
"fluid:module_view": {
"fluid:module-view": {
"path": ".."
},
"libdparse": "~>0.23.2"
Expand Down

0 comments on commit 3c6915a

Please sign in to comment.