Compare commits
No commits in common. "master" and "v0.16.0-beta.3" have entirely different histories.
master
...
v0.16.0-be
|
|
@ -5,8 +5,3 @@ indent_size = 4
|
||||||
tab_width = 4
|
tab_width = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|
||||||
[.github/workflows/*.yml]
|
|
||||||
indent_size = 2
|
|
||||||
tab_width = 2
|
|
||||||
indent_style = space
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# use older ubuntu / linux version for glibc compatibility
|
# use older ubuntu / linux version for glibc compatibility
|
||||||
os: [ubuntu-22.04, windows-latest]
|
os: [ubuntu-20.04, windows-latest, macos-latest]
|
||||||
dc:
|
dc:
|
||||||
- ldc-latest
|
- ldc-latest
|
||||||
- dmd-latest
|
- dmd-latest
|
||||||
|
|
@ -27,48 +27,20 @@ jobs:
|
||||||
dc: ldc-latest
|
dc: ldc-latest
|
||||||
build: debug
|
build: debug
|
||||||
libdparse-version: min
|
libdparse-version: min
|
||||||
# macos only with LDC
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: min, build: debug, arch: x86_64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: min, build: release, arch: x86_64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: max, build: debug, arch: x86_64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: max, build: release, arch: x86_64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: min, build: debug, arch: aarch64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: min, build: release, arch: aarch64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: max, build: debug, arch: aarch64 }
|
|
||||||
- { os: macos-latest, dc: ldc-latest, libdparse-version: max, build: release, arch: aarch64 }
|
|
||||||
# old compiler tests
|
# old compiler tests
|
||||||
- { os: ubuntu-22.04, dc: dmd-2.095.1, libdparse-version: min, build: debug, arch: x86_64 }
|
- { os: ubuntu-20.04, dc: dmd-2.095.1, libdparse-version: min, build: debug, arch: x86_64 }
|
||||||
- { os: ubuntu-22.04, dc: ldc-1.25.0, libdparse-version: min, build: debug, arch: x86_64 }
|
- { os: ubuntu-20.04, dc: ldc-1.25.0, libdparse-version: min, build: debug, arch: x86_64 }
|
||||||
# gdc
|
|
||||||
- { os: ubuntu-24.04, dc: gdc-14, libdparse-version: min, build: debug, arch: x86_64 }
|
|
||||||
- { os: ubuntu-24.04, dc: gdc-14, libdparse-version: max, build: debug, arch: x86_64 }
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup D tools (gdc only)
|
|
||||||
if: ${{ startsWith(matrix.dc, 'gdc') }}
|
|
||||||
uses: dlang-community/setup-dlang@v2
|
|
||||||
|
|
||||||
- name: Setup D
|
- name: Setup D
|
||||||
uses: dlang-community/setup-dlang@v2
|
uses: dlang-community/setup-dlang@v1
|
||||||
with:
|
with:
|
||||||
compiler: ${{ matrix.dc }}
|
compiler: ${{ matrix.dc }}
|
||||||
|
|
||||||
- name: Set gdc specific environment variables
|
|
||||||
if: ${{ startsWith(matrix.dc, 'gdc') }}
|
|
||||||
run: |
|
|
||||||
tee -a ${GITHUB_ENV} <<<"DC=${DMD}" # need gdmd for -run
|
|
||||||
# Linking errors without -allinst
|
|
||||||
# No other easy way to pass this to dub, using DFLAGS in the
|
|
||||||
# environment disables unittests
|
|
||||||
cat <<-EOF | sudo tee -a /etc/dmd.conf
|
|
||||||
[Environment]
|
|
||||||
DFLAGS=-allinst
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|
@ -80,6 +52,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build DSymbol
|
- name: Build DSymbol
|
||||||
env:
|
env:
|
||||||
|
DC: ${{matrix.dc}}
|
||||||
LIBDPARSE_VERSION: ${{ matrix.libdparse-version }}
|
LIBDPARSE_VERSION: ${{ matrix.libdparse-version }}
|
||||||
run: |
|
run: |
|
||||||
cd dsymbol
|
cd dsymbol
|
||||||
|
|
@ -87,6 +60,7 @@ jobs:
|
||||||
|
|
||||||
- name: Test DSymbol
|
- name: Test DSymbol
|
||||||
env:
|
env:
|
||||||
|
DC: ${{matrix.dc}}
|
||||||
LIBDPARSE_VERSION: ${{ matrix.libdparse-version }}
|
LIBDPARSE_VERSION: ${{ matrix.libdparse-version }}
|
||||||
run: |
|
run: |
|
||||||
cd dsymbol
|
cd dsymbol
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
intro_comment:
|
intro_comment:
|
||||||
name: Make intro comment
|
name: Make intro comment
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: 'Prepare sticky comment'
|
- name: 'Prepare sticky comment'
|
||||||
# commit of v2.5.0
|
# commit of v2.5.0
|
||||||
|
|
|
||||||
|
|
@ -9,22 +9,24 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
comment:
|
comment:
|
||||||
name: PR Info
|
name: PR Info
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
if: >
|
if: >
|
||||||
github.event.workflow_run.event == 'pull_request' &&
|
github.event.workflow_run.event == 'pull_request' &&
|
||||||
github.event.workflow_run.conclusion == 'success'
|
github.event.workflow_run.conclusion == 'success'
|
||||||
steps:
|
steps:
|
||||||
# from https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
# from https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
||||||
- name: 'Download artifact'
|
- name: 'Download artifact'
|
||||||
uses: actions/github-script@v8
|
uses: actions/github-script@v3.1.0
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
var { data: artifacts } = await github.actions.listWorkflowRunArtifacts({
|
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
run_id: ${{github.event.workflow_run.id }},
|
run_id: ${{github.event.workflow_run.id }},
|
||||||
});
|
});
|
||||||
var matchArtifact = artifacts.artifacts.filter((artifact) => artifact.name === "pr")[0];
|
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
|
return artifact.name == "pr"
|
||||||
|
})[0];
|
||||||
var download = await github.actions.downloadArtifact({
|
var download = await github.actions.downloadArtifact({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@ jobs:
|
||||||
|
|
||||||
# Compiler to test with
|
# Compiler to test with
|
||||||
- name: Prepare compiler
|
- name: Prepare compiler
|
||||||
uses: dlang-community/setup-dlang@v2
|
uses: dlang-community/setup-dlang@v1
|
||||||
with:
|
with:
|
||||||
compiler: dmd-latest
|
compiler: dmd-latest
|
||||||
|
|
||||||
- name: Prepare compiler
|
- name: Prepare compiler
|
||||||
uses: dlang-community/setup-dlang@v2
|
uses: dlang-community/setup-dlang@v1
|
||||||
with:
|
with:
|
||||||
compiler: ldc-latest
|
compiler: ldc-latest
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# use older ubuntu / linux version for glibc compatibility
|
# use older ubuntu / linux version for glibc compatibility
|
||||||
os: [ubuntu-22.04, windows-latest]
|
os: [ubuntu-20.04, windows-latest, macos-latest]
|
||||||
dc:
|
dc:
|
||||||
- ldc-latest
|
- ldc-latest
|
||||||
arch:
|
arch:
|
||||||
- x86_64
|
- x86_64
|
||||||
include:
|
|
||||||
- os: macos-latest
|
|
||||||
arch: aarch64
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
@ -24,7 +21,7 @@ jobs:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup D
|
- name: Setup D
|
||||||
uses: dlang-community/setup-dlang@v2
|
uses: dlang-community/setup-dlang@v1
|
||||||
with:
|
with:
|
||||||
compiler: ${{ matrix.dc }}
|
compiler: ${{ matrix.dc }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,6 @@ stdout.txt
|
||||||
# script-generated expected with absolute file paths
|
# script-generated expected with absolute file paths
|
||||||
tests/tc_locate_ufcs_function/expected.txt
|
tests/tc_locate_ufcs_function/expected.txt
|
||||||
tests/tc_recursive_public_import/expected.txt
|
tests/tc_recursive_public_import/expected.txt
|
||||||
# other script-generated files
|
|
||||||
tests/extra/tc_ufcs_all_kinds/generate_tests
|
|
||||||
|
|
||||||
# Dub files
|
# Dub files
|
||||||
.dub
|
.dub
|
||||||
|
|
|
||||||
|
|
@ -576,7 +576,7 @@ version (linux) unittest
|
||||||
}
|
}
|
||||||
const rssAfter = getRSS();
|
const rssAfter = getRSS();
|
||||||
// check the process memory increase with some eyeballed threshold
|
// check the process memory increase with some eyeballed threshold
|
||||||
assert(rssAfter - rssBefore < 6_000);
|
assert(rssAfter - rssBefore < 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is for testing that internString data is always on the same address
|
// this is for testing that internString data is always on the same address
|
||||||
|
|
|
||||||
|
|
@ -129,27 +129,29 @@ int main(string[] args)
|
||||||
|
|
||||||
fs.write("proc_test.d", code);
|
fs.write("proc_test.d", code);
|
||||||
|
|
||||||
auto output = executeShell("$DC -verrors=0 $ERROR_STYLE -c proc_test.d").output;
|
auto output = executeShell("$DC -verrors=0 -c proc_test.d").output;
|
||||||
|
|
||||||
size_t numErrors = 0;
|
size_t numErrors = 0;
|
||||||
|
|
||||||
string[][string] variableIncompatibilities;
|
string[][string] variableIncompatibilities;
|
||||||
|
|
||||||
// Example of a line we want to match: `proc_test.d:2568:22: error: [...]'
|
|
||||||
auto errRegex = regex(`proc_test\.d:([0-9]*):[0-9]*: error`, "i");
|
|
||||||
foreach (err; output.lineSplitter)
|
foreach (err; output.lineSplitter)
|
||||||
{
|
{
|
||||||
if (auto m = matchFirst(err, errRegex)) {
|
if (!err.startsWith("proc_test.d("))
|
||||||
auto lineNo = to!int(m[1]);
|
continue;
|
||||||
string line = lines[lineNo - 1];
|
err = err["proc_test.d(".length .. $];
|
||||||
enforce(line.endsWith("();"), "Unexpected error in line " ~ lineNo.to!string);
|
auto lineNo = err.parse!int;
|
||||||
line = line[0 .. $ - 3];
|
if (!err.startsWith("): Error: "))
|
||||||
string varName = line.findSplit(".")[0];
|
continue;
|
||||||
string funcName = line.findSplit(".")[2];
|
err = err["): Error: ".length .. $];
|
||||||
// writeln("variable type ", varLookup[varName], " can't call ", funcLookup[funcName]);
|
string line = lines[lineNo - 1];
|
||||||
variableIncompatibilities[varName] ~= funcName;
|
enforce(line.endsWith("();"), "Unexpected error in line " ~ lineNo.to!string);
|
||||||
numErrors++;
|
line = line[0 .. $ - 3];
|
||||||
}
|
string varName = line.findSplit(".")[0];
|
||||||
|
string funcName = line.findSplit(".")[2];
|
||||||
|
// writeln("variable type ", varLookup[varName], " can't call ", funcLookup[funcName]);
|
||||||
|
variableIncompatibilities[varName] ~= funcName;
|
||||||
|
numErrors++;
|
||||||
}
|
}
|
||||||
|
|
||||||
enforce(numErrors > 1_000, "compiler didn't error as expected, need to adjust tests!");
|
enforce(numErrors > 1_000, "compiler didn't error as expected, need to adjust tests!");
|
||||||
|
|
|
||||||
|
|
@ -4,21 +4,4 @@ if [ -z "${DC:-}" ]; then
|
||||||
DC=dmd
|
DC=dmd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DCBASE=$(basename "${DC}")
|
DC="$DC" "$DC" -run generate_tests.d "$1"
|
||||||
|
|
||||||
# Set up ERROR_STYLE to make all compilers output errors in the same
|
|
||||||
# format to make matching easier in generate_tests.d.
|
|
||||||
|
|
||||||
if [[ ${DCBASE} =~ gdmd ]]; then
|
|
||||||
ERROR_STYLE=
|
|
||||||
elif [[ ${DCBASE} =~ dmd|ldc ]]; then
|
|
||||||
ERROR_STYLE='-verror-style=gnu -vcolumns'
|
|
||||||
else
|
|
||||||
echo "unknonwn compiler ${DC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export DC ERROR_STYLE
|
|
||||||
# gdc uses language specific error message
|
|
||||||
export LC_ALL=${LC_ALL:-"C.UTF-8"}
|
|
||||||
${DC} -run generate_tests.d "${1}"
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue