Commit Graph

79 Commits

Author SHA1 Message Date
trinity-1686a ee4ea74698 attempt at making CI faster
Move rust-nightly to stage test so it runs in parallel with coverage,
which are the two longest jobs, and currently run in sequence.
Don't document dependancies, should make the step about 50% faster
Use about 12M of cache to not recompile grcov each time
Don't compile grcov with coverage, we don't need it, it's probably
slower both to compile and execute
2022-02-25 18:08:14 +01:00
Ian Jackson 9aefbf4227 rename *.sh scripts to bare name
As per #309

Update all references.  There is one remaining hit for
  git-grep '\.sh\b'
namely "build.sh" in maint/reproducible_build, which I think is
the build script for osxcross - ie, an external project.
2022-02-18 11:46:06 +00:00
Nick Mathewson e7a38ccb55 Temporarily allow failures in the coverage CI.
Right now it's failing on nightly through no fault of our own.
2022-02-09 08:29:00 -05:00
eta 4413645c1b Merge branch 'eta/arti-bench-ci' into 'main'
arti-bench: run the benchmarks in CI, and keep the results

See merge request tpo/core/arti!283
2022-02-03 20:35:27 +00:00
eta 05046626f3 arti-bench: run the benchmarks in CI, and keep the results
This adds `arti-bench` to the `integration` job in the CI pipelines, and
keeps around the JSON benchmark output for later comparison.
2022-02-03 18:31:32 +00:00
Daniel Schischkin 4509f8b9d4 Remove file ending of shellcheck_all and downgrade_dependencies script 2022-02-03 18:14:57 +00:00
Nick Mathewson 73bb6f342e Merge branch 'add-final-newline-force' into 'main'
Add editorconfig to force some rules (Final Newline)

See merge request tpo/core/arti!289
2022-02-03 15:27:13 +00:00
Daniel Schischkin 3a7412f4cf Add editorconfig to force some rules (Final Newline) 2022-02-03 15:27:13 +00:00
Ian Jackson 7be3bf6339 Temporarily disable some clippy lints on nightly 2022-02-02 21:57:30 +00:00
eta a71ab72bf2 Merge branch 'ci-rustup-show' into 'main'
CI: Add "rustup show" to show compiler versions in logs

See merge request tpo/core/arti!276
2022-01-31 18:33:22 +00:00
Nick Mathewson 81a49fb6ec Merge branch 'dedup-cobertura' into 'main'
add postprocessing script to deduplicate cobertura reports

See merge request tpo/core/arti!272
2022-01-31 17:19:01 +00:00
Ian Jackson ac8e28b6c7 CI: Add "rustup show" to show compiler versions in logs
Trying to debug the nightly failure here
  https://gitlab.torproject.org/Diziet/arti/-/pipelines/25417
and I can't seem to repro it.
2022-01-31 13:58:46 +00:00
Daniel Schischkin 1774de7e47 Remove redundancy/code duplication and switch to shellcheck_all.sh script 2022-01-29 00:09:36 +01:00
trinity-1686a daa1eba969 add postprocessing script to deduplicate cobertura reports 2022-01-28 20:52:50 +01:00
Daniel Schischkin 1d7fcd6d48 Undo remove document-private-items arg 2022-01-28 17:44:32 +01:00
Daniel Schischkin 01b3bc85c9 Remove argument document-private-items from nightly build 2022-01-28 17:28:25 +01:00
Daniel Schischkin 67ac91a809 Add missing file ending for downgrade_dependencies in gitlab ci 2022-01-28 15:26:14 +01:00
Daniel Schischkin 6fe0543645 Add shellcheck step into build stage 2022-01-28 15:21:28 +01:00
arturomf94 72a08cc295 Improve `coverage` job in CI 2022-01-28 00:28:06 +00:00
eta 2f39dbd587 Merge branch 'rtcompat-refactor' into 'main'
Refactor the tor-rtcompat API.

Closes #301 and #300

See merge request tpo/core/arti!263
2022-01-27 15:53:35 +00:00
eta 785ad605d7 Merge branch 'coverage-tracking' into 'main'
Add test coverage tracking with CI/CD

Closes #250

See merge request tpo/core/arti!221
2022-01-27 12:56:22 +00:00
Arturo Marquez 899691e5c7
Install bs4 in coverage job 2022-01-26 23:48:11 -06:00
Arturo Marquez b3ba32824e
Use `maint/with_coverage.sh` in coverage job 2022-01-26 23:13:15 -06:00
Nick Mathewson 474a46999d CI: Fix async-std task
Previously it didn't enable any TLS provider, since we made
native-tls optional a few commits ago.  Now it enables rustls,
so that rustls also gets a quick check along with async-std.

I've also switched this test to use "cargo clippy" in place of
"cargo test" because it's a strict superset.
2022-01-26 15:12:39 -05:00
Nick Mathewson c84c547bf4 Move our "minimal versions" code to a script.
Previously this code was in .gitlab-ci.yml, but for the purposes of
testing my fix for #275, it turned out to be much better to have it
in a script of its own.

Also, we now need to update our "quote" second-order dependency,
since otherwise our minimal first-order dependencies won't build
correctly.
2022-01-07 19:10:07 -05:00
Arturo Marquez 3633a78715
Remove lcov from coverage job 2022-01-07 00:41:04 -06:00
Arturo Marquez 4ddddceeaa
Change output type to `cobertura` 2022-01-07 00:07:03 -06:00
Arturo Marquez c86be6cdd6
Use python3.9 in coverage job 2022-01-06 22:13:15 -06:00
Arturo Marquez 86e829ec1b
Add pip3 show to coverage job 2022-01-06 21:48:09 -06:00
Arturo Marquez da3b937c82
Add pip3 to coverage job 2022-01-06 21:46:53 -06:00
Arturo Marquez 6aea21abeb
Remove build in coverage job 2022-01-06 21:26:15 -06:00
Arturo Marquez 2fc67c0145
Use stable image and download nightly in coverage
Following suggestion here:
`https://gitlab.torproject.org/tpo/core/arti/-/issues/250#note_2764010`
2022-01-06 21:18:09 -06:00
Arturo Marquez b46a562060
Add cargo build to coverage job 2022-01-06 20:34:16 -06:00
Arturo Marquez 34e3438d3b
Change target 2022-01-06 19:57:34 -06:00
Arturo Marquez 3c853126de
Add `coverage` job
Following instructions at:

`https://www.collabora.com/news-and-blog/blog/2021/03/24/rust-integrating-llvm-source-base-code-coverage-with-gitlab/`
2022-01-06 14:05:17 -06:00
Daniel Eades 88aba9e007 don't deny 'println' in examples in CI 2021-12-09 15:42:36 +00:00
Daniel Eades fe788aad5e update CI to test all targets 2021-12-09 14:30:41 +00:00
Trinity Pointard 7dd1a20d42 update rusqlite and revert minimal version change 2021-12-09 11:51:39 +01:00
Nick Mathewson 854b854764 Temporarily change minimal-versions CI to use Rust 1.56
Because of arti#257, compatibility with earlier versions of rust are
broken: we hope this is temporary, but fixing it will probably
require a new version of rusqlite.
2021-12-08 12:07:46 -05:00
Trinity Pointard 6615afda8c normalize --target to better reuse build artifacts
testing was done on a different target than building, so everything was
compiled twice (actually, it's the same target, but rust doesn't realize
that)
makes build+test about 20% faster
2021-11-12 16:30:37 +01:00
Trinity Pointard 026cac0c60 try to cache cargo-audit 2021-11-12 15:47:27 +01:00
Nick Mathewson 753cbc9626 In rust-nightly CI, forbid debugging prints.
This patch makes the rust-nightly CI task fail if it detects any
dbg!(), println!(), or eprintln!() calls in production code.

Because of clippy limitations, it may also gripe about calls to
these macros in our tests.  The preferred workarounds are to either
instead.  Both are acceptable.

We're doing this check in CI rather than unconditionally with clippy
directives, since we often want to have these calls in our code
temporarily while we're developing.  Some day we might want this
test to go into a pre-push hook.

This patch also adds #![allow()] directives for println!() and
eprintln!() in the arti crate.  Since that one isn't a library, it's
okay for it to speak to stdout/stderr.

Closes #218.
2021-11-04 11:13:29 -04:00
Nick Mathewson e9cbf8c54f minimal-versions: switch to 1.53. 2021-10-31 12:14:41 -04:00
Trinity Pointard 1fd720a926 add ci check for deps minimal versions and msrv 2021-10-31 09:54:52 +01:00
Trinity Pointard 0438a3da93 move integration tests to scripts 2021-10-28 11:28:22 -04:00
eta 4fa0122dde Improve and future-proof the `arti` CLI
This switches out `arti`'s argument-parsing library with `clap`, which
is a lot more featureful (and very widely used within the Rust
ecosystem). We also now use a lot of `clap`'s features to improve the
CLI experience:

- The CLI now expects a subcommand (currently, either "help", or "proxy"
  for the existing SOCKS proxy behaviour). This should let us add
  additional non-SOCKS-proxy features to arti in future.
- `clap` supports default values determined at runtime, so the way the
  default config file is loaded was changed: now, we determine the
  OS-specific path for said file before invoking `clap`, so the help
  command can show it properly.
  - The behaviour of `tor_config` was also changed; now, one simply
    specifies a list of configuration files to load, together with
    whether they're required.
  - That function also way overused generics; this has been fixed.
- Instead of using the ARTI_LOG environment variable to configure
  logging, one now uses the `-l, --log-level` CLI option.
  (The intent is for this option to be more discoverable by users.)
- The `proxy` subcommand allows the user to override the SOCKS port used
  on the CLI without editing the config file.
2021-10-27 19:11:48 +01:00
Nick Mathewson 7c7a388e28 Rename tor_client/arti_tor_client to arti_client.
Solves a name conflict with the existing tor_client create.

Closes #130.
2021-10-21 14:22:11 -04:00
Nick Mathewson 290fe83671 Move "cargo audit" invocation into a script. 2021-10-17 10:41:52 -04:00
Trinity Pointard 9c275a04ee update ctrlc and der
ctrlc had rustsec issues, der was yanked
2021-10-06 23:55:08 +02:00
Nick Mathewson 0c0a057bef In CI, *temporarily* ignore RUSTSEC-2021-0119 in nix crate.
The affected API (getgrouplist) isn't one that we use, directly or
transitively.  We can't just upgrade immediately, since the ctrlc
crate is currently stuck on the older version of nix.
2021-10-01 09:24:38 -04:00