Commit graph

52 commits

Author SHA1 Message Date
Martin Kinkelin
f3f89ca5b6 CI: Adapt to generic Makefile for Phobos 2023-12-18 17:10:31 +08:00
Martin Kinkelin
bc793e59e9 druntime: Rename posix.mak to Makefile 2023-12-18 07:29:32 +08:00
Martin Kinkelin
c49e18add9 Makefile: Improve search for D host compiler 2023-12-11 03:20:09 +01:00
Martin Kinkelin
ff698ba103 Convert posix.mak to generic Makefile
Usable on Windows too, with a GNU make.
2023-12-09 15:59:14 +01:00
Razvan Nitu
63aa219be6
Temporarily disable code coverage test for circleCI (#15128) 2023-04-25 11:00:56 +03:00
Iain Buclaw
bccd472095 circleci: Migrate to circleci convenience images 2022-10-17 00:38:42 +02:00
Iain Buclaw
09d04945bd Fix build script paths to work with new merged repository structure
Co-Authored-By: Geod24 <pro.mathias.lang@gmail.com>
Co-Authored-By: Martin Kinkelin <noone@nowhere.com>
Co-Authored-By: Vladimir Panteleev <git@cy.md>
2022-07-09 23:49:27 +02:00
MoonlightSentinel
894fbffca6
CircleCI: Pass BUILD and MODEL to run.d during validation
s.t. it reliably finds the generated compiler
2022-04-16 04:38:45 +02:00
Martin Kinkelin
09c43ae59e CircleCI: Try to use same-named druntime/Phobos branches for PRs from official repo 2022-01-31 20:09:12 +01:00
MoonlightSentinel
9ff5805c1d Switch to new CodeCov uploader
The currently used bash uploader is deprecated and will be removed in
the future[1]. This commit replaces the existing setup with the new
uploader for all currently supported platforms as proposed in [2].

Additional notes:
- FreeBSD support isn't supported yet and keeps using the old uploader
- Moved the new implementation into a dedicated file `source`d by
  all coverage CI's (instead of changing each individual configuration)

[1] https://about.codecov.io/blog/codecov-uploader-deprecation-plan
[2] https://about.codecov.io/blog/introducing-codecovs-new-uploader
2021-10-27 07:37:27 +00:00
MoonlightSentinel
4522e0236f CircleCI: Ignore coverage upload failures
(Temporary) workaround s.t. external issues don't cause CI failures

Should probably be reverted once codecov/codecov-bash#411 is resolved
2021-02-24 15:49:23 +01:00
MoonlightSentinel
71d56e4cf9
Bump default host compiler version to 2.095.0
Enabling CTFE coverage for CircleCI requires a more recent host compiler
(>= 2.094.0). Adapted `build.d` and `posix.mak` as well because they
should always use the same bootstrap version.
2021-01-09 14:24:27 +01:00
Luís Ferreira
ff3f00725a
tests: add test case for .length semantic analysis
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2020-10-29 15:29:45 +00:00
MoonlightSentinel
33cde05f53 Precompile build.d for coverage on CircleCI
Avoids using the generated compiler to recompile build.d
2020-09-05 02:45:57 +02:00
Sebastian Wilzbach
35f5ed29db CircleCi: use build.d and run.d directly + remove PIC=1
PIC=1 was added during the NO_PIC/PIC transition before DMD defaulted to
PIC code on Linux. PIC=1 is has been the default for many years now and
on modern Linux distributions it's even the only way to execute
binaries.
2020-09-03 22:29:44 +02:00
Sebastian Wilzbach
26d0502634 Run cxx-header test on CircleCi 2020-08-30 19:29:05 +02:00
MoonlightSentinel
54ce9fcc25
Improve CodeCov upload
Removes the now obsolete gcov plugin (no C++ sources remaining) and
fail if any error occurred in the CodeCov script
2020-08-08 23:15:40 +02:00
MoonlightSentinel
5a6b3ab209
build.d: Change working directory to the project root ...
.. instead of `src`. This ensures that error messages, coverage data, ...
will be reported relative to the root directory as expected by many IDE's.

Also adjusted the CodeCov script to deal with the new paths.
2020-08-08 23:11:39 +02:00
Sebastian Wilzbach
4268066441
Run CircleCi with BUILD=debug 2020-03-29 18:13:52 +02:00
MoonlightSentinel
f092f2c1ab
Remove recursive make and DMD_TESTSUITE_MAKE_ARGS 2020-03-18 17:01:50 +01:00
Martin Nowak
053d7009f3 Merge remote-tracking branch 'upstream/stable' into merge_stable 2019-12-18 10:12:10 +01:00
Nicholas Lindsay Wilson
ea1d142a22 Fix circle CI issue "MODEL: unbound variable"
CIRCLE_STAGE is either `pic` or `-no_pic`, not `build` or some other
value.
2019-12-13 19:04:47 +08:00
Damian Ziemba
3546329050 Bump minimal version of DMD used for host builds.
2.088.0 is the lowest version of DMD that works on MacOS Catalina.
2019-10-17 14:01:05 +02:00
سليمان السهمي (Suleyman Sahmi)
07e1e1056d [CI] CircleCi sometimes builds DMD stable against Phobos master 2019-06-04 07:15:06 +00:00
Sebastian Wilzbach
19d59d7452 [CircleCi] Fix build by using Ubuntu 18.04 as base 2019-03-27 12:17:18 +01:00
Martin Kinkelin
6d03416ed4 Tweak parallelization when building test tools
The d_do_test and sanitize_json rules can be processed in parallel.
Additionally, the d_do_test executable can be built while its unittests
are built & run in the background (both take around 8 seconds on my box
with LDC).
These tools are prerequisites for the runnable/compilable/fail tests and
are thus built before running the actual tests.
These changes save a total of about 10 seconds on my box with LDC.

The best parallelization for a full test run is achieved via
`DMD_TESTSUITE_MAKE_ARGS="-j<N>" make start_all_tests`; the CI scripts
have been adapted accordingly.
2019-03-12 00:48:07 +01:00
Martin Kinkelin
35bb8f76a3 CI: Tweak test parallelization for Circle, AppVeyor & Semaphore
Circle wasn't parallelized at all, and AppVeyor/Semaphore only ran the
blocks (runnable/compilable/fail_compilation) in parallel, which scales
very badly (as runnable is by far the longest one, and there's just 3
blocks) and yields a mixed output.
2019-02-28 22:15:15 +01:00
Jacob Carlborg
f80c3f3a85 Add unit test runner.
This will allow to use the compiler as a library to implement more
unit test like tests. These tests will be able to inspect the
internals of the compiler to perform new kinds of tests that are not
possible today.

Unit tests live in the `test/unit` directory. They are written using
the built-in `unittest` blocks. The unit test framework supports
callbacks executed before and after each test. The unit test runner
allows to limit the tests executed either by file(s) and/or by UDAs.
Example:

```d
module self_test;

import support : afterEach, beforeEach;

@beforeEach initializeFrontend()
{
    import dmd.frontend : initDMD;
    initDMD();
}

@afterEach deinitializeFrontend()
{
    import dmd.frontend : deinitializeDMD;
    deinitializeDMD();
}

@("self test")
unittest
{
    import std.algorithm : each;
    import dmd.frontend;

    findImportPaths.each!addImport;

    auto t = parseModule("test.d", q{
        int a = 3;
    });

    assert(!t.diagnostics.hasErrors);
    assert(!t.diagnostics.hasWarnings);
}
```

* To run all unit tests, run: `./run.d -u`
* To run only the unit tests in a single file, run: `./run.d -u unit/self_test.d`
* To run only the unit tests matching a UDA, run: `./run.d -u --filter "self test"`
2019-02-09 11:57:14 +01:00
Sebastian Wilzbach
f26380312c Replace results_dir paths in TEST_OUTPUT with {{RESULTS_DIR}} 2019-01-11 11:46:57 +01:00
Nicholas Lindsay Wilson
3bbb228f3f Fix issues 1870 and 12790: Write out string mixin code to a file for debugging purpose 2018-11-07 08:15:25 +08:00
Sebastian Wilzbach
b3ed1031d5 Add different ENABLE + unittest modes to build.d 2018-07-01 22:24:34 +02:00
Sebastian Wilzbach
e417f0e0df Initial raw builder 2018-06-26 04:00:42 +02:00
Sebastian Wilzbach
a2f1a2e48c Use D to run the testsuite 2018-05-04 17:37:28 +02:00
Sebastian Wilzbach
d108af5664 Port the individual test script runner to D 2018-04-05 08:13:05 +02:00
Walter Bright
98f8988ebf convert divcoeff.c to D 2018-03-31 10:28:37 -07:00
Sebastian Wilzbach
47b3a029d7 Add a convenience script for running individual tests 2018-03-22 00:40:01 +01:00
Sebastian Wilzbach
36cf500b18 Use results_dir for the ddoc9764 test 2018-03-13 16:57:03 +01:00
Sebastian Wilzbach
57bc629086 Try to deactivate the host environment before running the testsuite 2018-02-09 19:01:49 +01:00
Sebastian Wilzbach
b81f40f9e6
Revert "Experiment with using only two CircleCi images" 2018-01-31 09:56:48 +01:00
Sebastian Wilzbach
2a2444f2d3 Experiment with using only two CircleCi images 2018-01-31 07:41:37 +01:00
Sebastian Wilzbach
bb172bcfc5 Allow using updated CircleCi without rebasing PRs 2018-01-25 09:16:53 +01:00
Sebastian Wilzbach
252ab44d00 Allow to run the DMD testsuite on hardened systems (#7420)
* Use a special D docker image for CircleCi

* Fix Issue 18014 - Allow to run the DMD testsuite on hardened systems
2018-01-24 20:40:36 +09:00
Sebastian Wilzbach
3b0b5f2027 Run CircleCi in 32-bit too 2018-01-16 03:35:45 +01:00
Sebastian Wilzbach
366fee847b Use GitHub's merge head for checking out PRs 2018-01-01 16:46:02 +01:00
Sebastian Wilzbach
5a2825e545 Fix detection of G++ on older distributions.
On auto-tester the version string is:

HOST_CXX(c++): c++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

CircleCi offers:

c++ (Debian 4.9.2-10) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
2017-12-30 01:36:22 +01:00
Sebastian Wilzbach
0a108f8386 Set ENABLE_WARNINGS=1 on CircleCi and Travis 2017-12-27 00:07:42 +01:00
Sebastian Wilzbach
bbabe579ed Ensure that the testsuite doesn't generate unchecked temporary files 2017-12-22 10:29:52 +01:00
The Dlang Bot
41ecaec9f1
Merge pull request #7477 from wilzbach/make-debug
Build DMD with BUILD=debug on CircleCi
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2017-12-22 00:50:31 +01:00
Sebastian Wilzbach
c22616ae6e Temporarily disable test for issue 17167 on CircleCi 2017-12-21 19:10:26 +01:00
Sebastian Wilzbach
3518b48087 Build the DMD with BUILD=debug on CircleCi 2017-12-21 00:14:39 +01:00