Граф коммитов

118 Коммитов

Автор SHA1 Сообщение Дата
temportalflux 00bd5030e3 Add msvc response file integration test
Builds against windows and performs a series of compilation checks to ensure that the mock project builds and response files are properly expanded
2023-03-10 00:26:17 +01:00
Xuanwo 520a30b681
fix: Disable connection pool to fix dist server feature (#1612)
Signed-off-by: Xuanwo <github@xuanwo.io>
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2023-02-22 17:06:51 +01:00
Xuanwo 59e906df3d
fix upload artifact (#1598)
Signed-off-by: Xuanwo <github@xuanwo.io>
2023-02-17 14:08:43 +01:00
Xuanwo 64eeb966aa
feat: Add Webdav (a.k.a HTTP Cache) support (#1597)
* feat: Add Webdav (a.k.a HTTP Cache) support

Signed-off-by: Xuanwo <github@xuanwo.io>
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-02-14 09:48:41 +01:00
Xuanwo 3c4fe052ab fix: Sccache dist tests broken after bump to tokio 1.21 and later
Signed-off-by: Xuanwo <github@xuanwo.io>
2023-01-28 18:27:01 +01:00
Xuanwo 46553736b1 refactor: Migrate memcached to opendal based
Signed-off-by: Xuanwo <github@xuanwo.io>
2023-01-14 11:05:10 +01:00
Xuanwo 0485ba7b16
feat: Introduce the default gha version (#1550) 2023-01-12 21:40:11 +01:00
grembo a47fafc77d
Fix freebsd CI build (#1531)
* Fix freebsd CI build

This works around a bug in pot 0.15.4

Fixes #1529

* freebsd-ci: Add ca_root_nss package explicitly

+ It has been removed from curl as a dependency.
2023-01-08 16:19:11 +01:00
Xuanwo 066addee7a
refactor: Migrate gha cache to opendal based (#1528)
Signed-off-by: Xuanwo <github@xuanwo.io>
2023-01-08 13:59:36 +01:00
Xuanwo 66fff86cda
ci: Add integration tests for azblob (#1514)
* ci: Add integration tests for azblob

+ refactor the other existing integration tests
2022-12-29 12:49:24 +01:00
Xuanwo a2bcd29f79
ci: Add integration tests for s3 (#1513)
* ci: Add integration tests for s3

Signed-off-by: Xuanwo <github@xuanwo.io>
2022-12-28 18:48:55 +01:00
Xuanwo 822df7679f
ci: Refactor integration tests to make space for more services support (#1511) 2022-12-28 10:13:59 +01:00
Xuanwo 6cf985d0ff
ci: Add integration test for redis (#1510)
Build it twice, look if the cache is hit or not
2022-12-27 14:40:30 +01:00
AJ Schmidt 2c13a7224b Re-enable `aarch64-unknown-linux-musl`
This PR uncomments the `ubuntu-20.04`/`aarch64-unknown-linux-musl` matrix combination to verify if the issues described in #1458 are resolved.
2022-12-23 10:21:17 +01:00
Sylvestre Ledru 72b91e5ad8 github action: reverse the check 2022-12-16 22:18:58 +01:00
Sylvestre Ledru 26c0986017 add version check 2022-12-16 21:26:57 +01:00
Sylvestre Ledru 8a63239c6a reorder the github config to have release last 2022-12-16 21:26:57 +01:00
grembo febb667fb6
Support FreeBSD as sccache-dist server (#1184)
* Support FreeBSD as sccache-dist server

FreeBSD support makes use of [pot](https://github.com/potbsd/pot)
for sandboxing.

Implementation was done to be minimally invasive, almost all
FreeBSD specific parts happen in segregated files.

Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2022-12-15 14:11:15 +01:00
Sylvestre Ledru a31cf6491e Disable the aarch64-unknown-linux-musl task for now
Closes: #1458

We can't generating binaries because of that for now.
2022-12-08 15:06:52 +01:00
Bernhard Schuster 4e9f2b8ffc Update .github/dependabot.yml
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2022-11-29 07:42:19 +01:00
Bernhard Schuster 749eb0bb77 Update .github/dependabot.yml
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2022-11-29 07:42:19 +01:00
Bernhard Schuster 7d71e0af89 Update dependabot.yml 2022-11-29 07:42:19 +01:00
Bernhard Schuster 35173dda1e Reduce depandapot PR frequency
Mental overhead is still too high due to the number of deps, many times the patch updates are edge cases being fixed that are not relevant to us, and effectively slowing down actual development. 

Ref #1277 which assumed weekly would be ok, which it is not.
2022-11-29 07:42:19 +01:00
Sylvestre Ledru b7fe0a76a2 Lower the ubuntu-18.04 version 2022-11-27 09:04:24 +01:00
Sylvestre Ledru 8265bd2243 adjust the CI to use 1.60 2022-11-27 09:04:24 +01:00
Sylvestre Ledru 64e7d9ab25 Revert "run cargo-deny in the ci"
This reverts commit 62cb36204a.
2022-11-24 13:54:41 +01:00
Sylvestre Ledru 62cb36204a run cargo-deny in the ci 2022-11-24 10:01:18 +01:00
Sylvestre Ledru 7218dfd136
Some minor github updates (#1401)
* github action: remove trailing space

* github action: use the new syntax
2022-11-21 09:07:43 +00:00
messense 8ae16a0971 Set executable bit for binaries in release artifacts 2022-11-15 09:22:29 +01:00
Sylvestre Ledru ce9b127afb Install gcc & clang for the test_sccache_command test 2022-11-12 20:32:30 +01:00
Emily Mabrey 5956be2fc7 Add ZIP archives to Windows Releases
Modify Github Actions config to also create ZIP archives
Improve file handling in Github Actions releases

Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
2022-08-19 09:07:33 +02:00
dependabot[bot] b9be3f7b5b Bump codecov/codecov-action from 2 to 3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-16 13:11:08 +02:00
aeiouaeiouaeiouaeiouaeiouaeiou e0f7c6b476
Increase Codecov coverage job timeout (#1284) 2022-08-15 09:24:19 +02:00
Emily Mabrey 30968b9e85
Revert "Bump codecov/codecov-action from 2 to 3 (#1188)" (#1283)
This reverts commit 12797d503e.
2022-08-13 20:45:57 +02:00
Bernhard Schuster 44367c0e41 reduce dependabot frequency
Currently there are 1-4 daily PRs to review, which
is a lot of chore. Decimating the PRs down helps
the level of time chore.
2022-08-11 10:01:35 +02:00
dependabot[bot] 12797d503e
Bump codecov/codecov-action from 2 to 3 (#1188)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-10 16:26:27 +02:00
aeiouaeiouaeiouaeiouaeiouaeiou 2af14599a6 Update CI version of macOS
See: https://github.com/actions/virtual-environments/issues/5583
2022-08-08 10:27:05 +02:00
Sylvestre Ledru 9bd1b623b9
Add the dependabot configuration for crates & github-actions 2022-06-21 09:22:07 +02:00
aeiouaeiouaeiouaeiouaeiouaeiou 14a36037b4 Update actions to v3
Update the version of the actions used in the GitHub workflow file.
2022-06-16 08:17:49 +02:00
Jonathan Schwender 5032a8303c
Increase the MSRV and bump dependencies (#1137)
* Bump the MSRV to 1.58

Bumps the official MSRV to 1.58.
This is likely more than required the upcoming version bumps.

* Upgrade cargo zstd to 0.10

* Bump serial_test to v0.6

Changelog does not mention any breaking changes.

* Bump blake to v1

* Bump rouille to 3.5

Required to bump syslog to v6, since otherwise no common version
can be selected for `time`

* Bump syslog to v6

No changelog available. Depends on rouille bump to 3.5, to get a
common version of ´time´.

* Upgrade JWT to v8

The explicit insecure decode method was removed and replaced by
an option for the Validation struct.
The `exp` field had to be added to JobJwt, since otherwise the validation would fail at runtime.
Apparently the `exp` field is required now, even if the valdiation of `exp` is turned off.
2022-05-05 10:47:19 -04:00
Michael Kruse da2934fcc2
Use clang -fminimize-whitespace to increase cache hits. (#1162)
* Add -fminimize-whitespace preprocessor flag when Clang >= 14 to increase cache hits

This proof of concept tries to take advantage of the new `-fminimize-whitespace`
preprocessor option in Clang. `-fminimize-whitespace` was added to Clang with the
intention to help increase the chance of a cache hit in tools like `sccache`
when only whitespace changes.

I also added a `version()` method to CCompilerImpl trait to expose the compiler
version to the preprocessor. This could be useful if version-dependent
features are added to `sccache` in the future.

Feedback on this is definitely welcome!

* Add tests for clang whitespace normalization

* Use clang -fminimize-whitespace to incread cache hits.

* Use ubuntu-22.04 for testing Clang 14

* Move compiler version from CCompiler to each CCompilerImpl.

* Use semver

Co-authored-by: Max Fan <root@max.fan>
Co-authored-by: Michael Kruse <sccache@meinersbur.de>
2022-04-29 08:21:18 +02:00
Mitchell Hentges 2940944371
Revert "Automatically remove "awaiting response" label on-comment (#1129)" (#1142)
This reverts commit 443b124eed.
2022-03-15 16:37:56 -04:00
Mitchell Hentges 443b124eed
Automatically remove "awaiting response" label on-comment (#1129)
Also will close tickets that have been "awaiting response" for over 15 days.
2022-03-15 12:08:08 -04:00
Igor Matuszewski 18ead2f6f6
Fix aarch64-unknown-linux-musl build by puliing GCC 10 specifically (#1139)
Previously, there would occur a mismatch on the GCC 9 version,
preventing us from installing it properly. Instead of that, try just
pulling GCC 10 rather than both 9 and 10.
2022-03-11 13:33:18 -05:00
Emily Mabrey d22f5f24dc
Update actions/checkout from v1 to v2 (#1134)
Update the version of the checkout action in Github CI runner.

Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
2022-03-01 16:24:46 -05:00
Jonathan Schwender edf0ac5176
Parse env-deps from dep-info (#1107)
* Refactor sccache cargo test

- Improve cleanup by using Result instead of panicking, to ensure that
the temporary folder gets cleaned up.
Previously, when a test failed, no clean up would happen. Now the cleanup
happens, unless there is an unexpected panic somewhere in  the intergration test code.

- this commit aims to make it easier to add new tests

Split sccache cargo tests

To make it clearer what is failing, split the cargo test into multiple
tests. Since Sccache can't be invoked in parallel, we use the
`serial_test`  to serialize testing,otherwise cargo by default would
start them in parallel.

The logger is now also lazily initialized, so the first test to run will
initialize it. It now writes a linebreak, because otherwise the output
is hard to read with
`RUST_LOG=debug cargo test --test sccache_cargo -- --nocapture`.

We catch panics (which are not intended by the tests ) to ensure that the
temporary directory for the test gets cleaned up.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

Remove panic=abort from CI coverage test

I suspect the commandline was just taken like that from the example
here: https://doc.rust-lang.org/stable/unstable-book/compiler-flags/profile.html

However, there seems to be no reason to actually abort, since we don't have
a custom test harness or anything.
Since we want to catch panics, so we can correctly clean up, we need
panic=unwind.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Parse env_deps from dep-info

This will trigger rebuilds if environment variables changed that the rust code
depended on with env!.
On the Rust side this requires at least Rust 1.46, otherwise there will be
no env-dep info in the dep-info file. In that case we cannot detect
the dependency on the env-value, and behaviour is unchanged compared to
the current sccache behaviour.
With recent Rust versions however, we can trigger a rebuild if a variable
that is referenced via env! or option_env! is changed.

Other env variables like `CARGO_*` or `RUSTFLAGS` which may affect
the compilation are not listed in the dep-info file, so they have to
be blanket added (as is currently already the case).

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Add test for cargo env_deps

The previous commit added support for parsing "env_dep"
information from dep_info files. This commit adds a test
for changing an environment variable, that is referenced
in rust code via env!, and asserts that sccache rebuilds
and the rust code uses the new value of the changed
environment variable.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2022-03-01 16:21:36 -05:00
Jonathan Schwender bc17166878 Bump linting in CI to Rust 1.58.1
Bump the lint tests to use the current toolchain.
We don't want to use `stable` here, since that could cause CI failures
whenever a new rust version with new lints is introduced.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2022-02-13 12:41:11 +01:00
Sylvestre Ledru 18614d55aa
Add coverage support (#1073)
* Add coverage support

The windows support for coverage fails with:
found invalid metadata files for crate `vte_generate_state_changes`
2021-12-02 21:55:06 +01:00
Sylvestre Ledru 7dea20a295 Add rust beta & nightly for Windows CI 2021-11-30 17:39:04 +01:00
Markus Westerlind 3a4987cdf8 chore: Make 1.48 the new minimum rust version 2021-11-13 17:42:52 +01:00
Sylvestre Ledru 6902165648 Disable the fail-fast
One of the current failure is about ubuntu configuration
2021-11-02 19:22:51 +01:00
Emily Mabrey 0454224e46 Update CI version of Ubuntu
Replace Github CI use of deprecated Ubuntu 16.04 with Ubuntu 18.04.

Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
2021-11-02 19:22:51 +01:00
Emily Mabrey 53e1615352 Update CI to Rust 1.54.0
Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
2021-11-02 19:22:51 +01:00
Sylvestre Ledru 04e619ff71 Replace deprecated clippy option
Replace "clippy::unknown-clippy-lints" with "unknown-lints".

Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
2021-11-02 19:22:51 +01:00
Igor Matuszewski 7ad6199afa Simplify Clippy lint setup
The `unknown_clippy_lints` is deprecated and has been integrated into
the rustc `unknown_lints` lint, see
https://rust-lang.github.io/rust-clippy/master/#unknown_clippy_lints.

For the other two lints that are currently allowed, this moves it to the
source code so it's easier to see what's expected to work and be warned
against and what's not, without having to look at how exactly the
current CI is set up. It's common to simply run `cargo clippy` when
working on the project (similarly to `cargo fmt`) so this optimizes for
that scenario.

Some other repos that use this:
- https://github.com/rust-lang/cargo/blob/master/src/cargo/lib.rs
- https://github.com/rust-lang/rls/blob/master/rls/src/lib.rs
- https://github.com/serde-rs/json/blob/master/src/lib.rs
2021-10-31 22:50:07 +01:00
Mike Hommey 3f318a8675 Run lints against a precise version of the rust toolchain
This will allow PRs with failed CI just because they happened with
a newer version of rustfmt/clippy than last time the master branch
was checked.
2021-03-11 05:26:35 +09:00
Mike Hommey b3f4727eda Fix clippy warnings with recent versions of clippy 2021-01-16 05:42:39 +09:00
Mike Hommey f9f6e40837 Show clippy version in clippy jobs 2021-01-16 05:42:39 +09:00
Mike Hommey 7e2a977c76 Stop allowing CI failures on clippy 2021-01-06 10:17:18 +09:00
Mike Hommey 64ed0c1267 Move remainder of the CI to Github Actions
This includes:
- Building in release mode for all release platforms on all PRs and
  merges/pushes.
- Publishing release assets on tags.

The extra benefit here is that the release assets are not pushed unless
all builds are successful, which was not the case before, leading to
0.2.13 without Windows binaries. We also make it necessary for all tests
and lints to pass.

Another benefit is that builds now have artifacts published, allowing
to download them for some period of time after they were produced on
a PR or on master.

The setup for musl-based builds suffers on arm64 from not being able to
build natively (per lack of arm64 runners), and from Ubuntu not having
musl-cross packages, so it requires a little manual (hackish)
cross-compilation work.

The Linux builds can safely be done on a newer version of the base
system as we are using the musl runtime, and compile openssl statically,
preventing any dependency on symbols from too new systems, ensuring
binary compatibility with older systems.

The macOS builds were done against Xcode 9.4 (the default on Travis),
which targets macOS 10.13. The 10.13 SDK is not available on Github
Actions, but we can set the deployment target to that value while using
the 10.14 SDK from Xcode 10.3 for binary compatibility. In theory, we
should be able to use an even newer Xcode/SDK, but I'd rather not risk
it at this point.

The Windows builds should have no binary compatibility issues.
2021-01-06 07:58:24 +09:00
Mike Hommey 5868ff81c7 Move tests from Travis/Appveyor to Github Actions
On Travis, we used to build and run tests with both
--no-default-features and without, but without additional features, which
was the majority of cases, testing with --no-default-features was not
really useful, so we don't do that anymore, except for the dist-server.

Also, since dist-tests enables dist-server, the dist-server cases ended
up running the same tests multiple times, which we now avoid.

We also now split building the tests from running them, such that logs
can be a little easier to work with.

Github actions don't have arm64 runners yet, so we now don't run tests on
arm64 linux, but that's not expected to catch problems that wouldn't be
caught by the other tests.

The Appveyor setup was running tests with multiple versions of rust,
which is not done here, but that's not expected to catch problems that
wouldn't be caught by the other tests either.
2021-01-06 07:58:24 +09:00
Mike Hommey d34ef509f5 Move rustfmt and clippy to a separate set of jobs
And enable clippy, albeit allowing failures as the code is not
clippy-clean yet. We run clippy on all 3 main platforms because each
has platform-specific code that yields different warnings.
We explicitly disable two warnings:
- type_complexity, because it feels like unnecessary noise to try to fix
  those before switching to async code.
- new-without-default, because I'm not particularly convinced.

Also stop running rustfmt on Travis.
2021-01-06 07:58:24 +09:00
Mike Hommey aca0c9c111 Use plain actions/checkout
We don't have submodules, and the repository is not large enough that a
small fetch depth makes a significant different.
2021-01-06 07:58:24 +09:00
Mike Hommey 3de60cf6cc Switch Github workflow to use an in-tree action to install rust
Only actions from github (under github/ and actions/) are allowed, and
while actions from the mozilla organisation are technically allowed,
they're currently not meant to be, so use an in-tree action instead.
2021-01-06 07:58:24 +09:00
Mike Hommey 5c60588e32 Update minimum rust version on appveyor and github actions 2020-12-10 14:16:11 +09:00
Nicholas Nethercote 669f99f14d rustfmt the code and add a check to CI.
The code was already mostly rustfmt'd, so we might as well go the whole
way.
2020-06-05 08:03:06 -04:00
Nathan Froyd 0e60647fee remove github action format check
Even though Actions aren't supported on the main repo, they can still be
supported on personal repos, and people might proactively fix their
Windows bustage if GitHub sends them emails about it.  So let's keep
Actions, but turn off things we haven't enabled on Travis yet.
2020-03-13 11:42:40 -04:00
Ryan Dahl 09c9e32f02 Add github actions 2020-03-09 16:07:20 -04:00