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

2023 Коммитов

Автор SHA1 Сообщение Дата
ptaylor b0a6355d9e Make start_compile_task spawn a tokio task again 2024-11-08 13:06:08 +01:00
ptaylor c1b3c47bb1 ensure SCCACHE_NO_CACHE calls aren't tracked as an uncacheable compilations in the stats 2024-11-08 13:06:08 +01:00
ptaylor 4bff23fb11 Attempt to fix intermittent config_from_env() test failures by ensuring envvars are reset before unwrapping/asserting 2024-11-08 13:06:08 +01:00
ptaylor 19198f4709 Test nvcc and clang-cuda in workflows/ci.yml
* Test nvcc and clang-cuda in workflows/ci.yml
* Fix clang-cuda tests
* Ensure /tmp/sccache_*.txt files are included in failed job artifacts on Windows
2024-11-08 13:06:08 +01:00
ptaylor 34482cb3af Ensure compatibility with MSVC compatibility on Windows 2024-11-08 13:06:08 +01:00
ptaylor 2a0a7bc388 fix exit_status propagation, handle long nvcc language option (--x) 2024-11-08 13:06:08 +01:00
ptaylor 35d5b550ef Detect both nvcc and host compiler version so we can safely revert to caching outer nvcc invocations 2024-11-08 13:06:08 +01:00
ptaylor 9727019746 Update `Nvcc` compiler to support distributed compilation
* Adds top-level `Cicc` and `Ptxas` compiler types
* Updates `Nvcc` compiler implementation to decompose nvcc calls into its constituent subcompiler invocations via the `nvcc --dryrun` flag
* Bumps the `sccache-dist` request timeout from 5 to 10 minutes, because nvcc compilations can take a while
* Updates the CUDA tests, separates into tests for nvcc and clang since now their behavior is different
* Fixes lint
2024-11-08 13:06:08 +01:00
ptaylor a065ee5c5f Add an `UnhashedFlag` argument type for flags which should not affect the computed hash 2024-11-08 13:06:08 +01:00
ptaylor 33dd86bc78 Add an `extra_dist_files` field to the `ParsedArguments` struct, so compilers can add additional files to be included for each distributed compilation 2024-11-08 13:06:08 +01:00
ptaylor b537db02e8 Refactor `CompileCommand` into a trait
* Refactor `CompileCommand` into a trait with an execute function that accepts an `SccacheService<T>` ref and a `CommandCreatorSync` ref
* Rename `CompileCommand` struct to `SingleCompileCommand`
* Update all `generate_compile_command()` implementations to return a boxed `CompileCommand` trait

This allows compilers to return custom implementations of the `CompileCommand` trait that execute more complex logic than simply launching a subprocess.
2024-11-08 13:06:08 +01:00
ptaylor 5cf654b083 Ensure `use_preprocessor_cache_mode` considers the current value of the `SCCACHE_DIRECT` envvar. 2024-11-08 13:06:08 +01:00
ptaylor 61f1e4c9c2 * Refactor `start_compile_task()` into an async function
* Spawn the tokio compilation task in `check_compiler()` instead of in `start_compile_task()`
* Map the tokio compilation task into a stream, and return that stream as the response body

These changes reduce the amount of memory leaked when building the default linux target with glibc.

Refactoring `start_compile_task()` to be an async function is a necessary change to support re-entrancy for sccache-dist nvcc support.
2024-11-08 13:06:08 +01:00
Xuanwo 990854fc8e
refactor: Bump OpenDAL to 0.50 (#2283)
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-11-08 11:51:15 +01:00
zhouronghua 9ddf6595a9
Fix: fix sccache bug for dwo file generate (#2271) 2024-11-08 11:49:48 +01:00
Xuanwo f4da22866c
feat: Use profile-generate to replace outdated -Zprofile options (#2282) 2024-11-06 11:43:04 +01:00
Keming e6df56d1de
chore(docs): bump the github script version used in GHA (#2281) 2024-11-05 16:22:57 +08:00
Jay 877746cd78
*: add UDS support (#2206)
* *: add UDS support

A new module named `net` is added to unify TCP socket and UDS.
By default, sccache server is still listen on local TCP port,
user can choose to listen on UDS by setting environment variable
`SCCACHE_SERVER_UDS`.

Generic is used in server implementation for best performance,
trait object is used in client implementation for simplicity and
better readability.

Close #933.

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* fix linux compile errors

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* fix format

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* more fix

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* fix windows

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* address comment

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* fix gcc failure

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* address comment

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

* fix clippy

Signed-off-by: Jay Lee <busyjaylee@gmail.com>

---------

Signed-off-by: Jay Lee <busyjaylee@gmail.com>
2024-10-22 12:02:09 +08:00
Mikko Lehtonen 2932b22d10
Simplify Xcode CI / Docs (#2266)
* Add `objective-c++-header` as supported language.

* Parse -ivfsstatcache

* Simplify Xcode CI / Docs

I happened to stumble upon the `C_COMPILER_LAUNCHER` Xcode attribute,
which fits the bill perfectly, so use that instead.
2024-10-07 10:21:24 +02:00
Dimitrios Apostolou af5ea0937d
Fix cache collision between object file and precompiled headers (#2268)
When compiling with PCH enabled, it happens that some times object files
end up with PCH content, or that .gch files end up with object code.

Simplest way to reproduce the problem:

  $ touch empty.c
  $ gcc              -c -o out1 empty.c
  $ gcc  -x c-header -c -o out2 empty.c
  $ file out1 out2
  out1: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
  out2: GCC precompiled header (version 014) for C

The two files are different. But if we feed these compilations to
sccache, they lead to the same result:

  $ sccache gcc              -c -o out3 empty.c
  $ sccache gcc  -x c-header -c -o out4 empty.c
  $ file out3 out4
  out3: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
  out4: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

Same thing is reproducible with c++ compiler and -x c++-header argument.

The reason is that the hash string that identifies each command line is
the same.

With this patch, compilation of C files is always differentiated from
compilations of same C-Header files. And compilation of C++ files is
always differentiated from compilations of same C++-Header files.

Fixes #1851.
2024-10-05 09:49:58 +02:00
Daniele 19714edea9
docs: fix formatting in Caching (#2267) 2024-10-03 16:23:38 +02:00
Mikko Lehtonen 2debbfccf6
Implement features required by Xcode (#2257)
* Mark `-index-store-path` as Hard

Xcode sets it by default, but it can be disabled with
`COMPILER_INDEX_STORE_ENABLE=NO` Xcode build setting.

* Mark serialize-diagnostics and deps as artifacts

Xcode requires these files to be present after compiling, so they need
to be stored and restored for the build to complete.

* Update tests for the dep changes

* Add test for `-index-store-path`

* Add documentation for Xcode use

* Xcode integration test

* Add comment about wrapper script use
2024-10-02 09:46:21 +02:00
Sylvestre Ledru d7763fc54d sccache: prepare new release 2024-09-28 10:46:21 +02:00
Yonas Yanfa fce4fbb6f9
Update FreeBSD docs to refer to 14.1 (#2263) 2024-09-28 11:42:46 +08:00
dependabot[bot] be7e7ab51f
build(deps): bump jobserver from 0.1.31 to 0.1.32 (#2255)
Bumps [jobserver](https://github.com/rust-lang/jobserver-rs) from 0.1.31 to 0.1.32.
- [Commits](https://github.com/rust-lang/jobserver-rs/compare/0.1.31...0.1.32)

---
updated-dependencies:
- dependency-name: jobserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 09:18:02 +02:00
dependabot[bot] fb998ac80a
build(deps): bump quinn-proto from 0.11.3 to 0.11.8 (#2254)
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.3 to 0.11.8.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.3...quinn-proto-0.11.8)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 10:55:48 +02:00
dependabot[bot] 507f506cbe
build(deps): bump which from 6.0.0 to 6.0.3 (#2252)
Bumps [which](https://github.com/harryfei/which-rs) from 6.0.0 to 6.0.3.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/6.0.0...6.0.3)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 10:44:43 +02:00
Alex Overchenko 330d160824
Disable "warnings as errors" flag for CL preprocessing (#2251) 2024-08-31 18:42:05 +02:00
Hiroshi Yamauchi 95455ad45c
Add windows arm64 to the CI (#2243) 2024-08-07 21:23:02 +02:00
dependabot[bot] 0e66562431
build(deps): bump log from 0.4.20 to 0.4.22 (#2218)
Bumps [log](https://github.com/rust-lang/log) from 0.4.20 to 0.4.22.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.20...0.4.22)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 17:02:46 +08:00
Xuanwo 9cc22d9582
feat: Bump opendal to 0.48.0 (#2240)
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-08-02 09:05:47 +02:00
Maksim Bondarenkov 29d17c7c5c
deps: update winapi-util (#2236) 2024-07-26 01:18:52 +08:00
王宇逸 48178440c0
refactor: use windows-sys instead of winapi (#2233) 2024-07-25 22:27:59 +08:00
dependabot[bot] 9958e7c8a0
build(deps): bump vmactions/freebsd-vm from 1.0.7 to 1.0.8 (#2219)
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v1.0.7...v1.0.8)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-18 16:32:15 +02:00
Šarūnas Ginčas 7d451d99c8
Add cache hit percentage to stats (#2211)
* Add cache hit percentage to stats

* Change macro to a function
2024-07-18 16:31:52 +02:00
NyanRus 14e465ae78
Add custom zstd compression level (#2199)
* Add custom zstd compression level

* docs for SCCACHE_CACHE_ZSTD_LEVEL

* add zstd level test

* docs for zstd level that warns new cache required

* fix integration-test of zstd-compression-level
2024-07-17 10:15:27 +02:00
Mike Hommey f571231680 Remove the heapsize feature
It is not exposed, so never compiled. It's leftover from when
lru_disk_cache was a separate crate.
2024-07-17 16:14:23 +09:00
AJIOB 901923b713 Add lost feature status 2024-07-16 11:28:20 +02:00
AJIOB 42db6f1011 Update OpenDAL for fixing #2220 2024-07-14 21:56:54 +02:00
dependabot[bot] 9b5aa17364
build(deps): bump reqwest from 0.12.4 to 0.12.5 (#2215)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.4 to 0.12.5.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.4...v0.12.5)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 10:22:10 +08:00
dependabot[bot] d5a1787a85
build(deps): bump uuid from 1.7.0 to 1.9.0 (#2213)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.7.0...1.9.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:01:06 +08:00
aeiouaeiouaeiouaeiouaeiouaeiou 35c502af4b Update CI version of macOS
https://github.com/actions/runner-images/issues/9255
2024-06-23 09:17:52 +02:00
dependabot[bot] 3b5634ac90 build(deps): bump zstd from 0.13.0 to 0.13.1
Bumps [zstd](https://github.com/gyscos/zstd-rs) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/gyscos/zstd-rs/releases)
- [Commits](https://github.com/gyscos/zstd-rs/compare/v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: zstd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 14:40:13 +02:00
dependabot[bot] 34024394e0 build(deps): bump async-trait from 0.1.77 to 0.1.80
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.77 to 0.1.80.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.77...0.1.80)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 14:40:04 +02:00
dependabot[bot] a63e1e8072 build(deps): bump anyhow from 1.0.81 to 1.0.86
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.81 to 1.0.86.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.86)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 14:39:54 +02:00
Xuanwo 9e00c874de Format toml
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-06-16 14:15:55 +02:00
Xuanwo c1bd3c1fa6 refactor: Bump OpenDAL to 0.47
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-06-16 14:15:55 +02:00
Xuanwo 78f3a3222b Remove ref_env
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-06-16 11:16:59 +02:00
Xuanwo f1debd2414 Fix clippy
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-06-16 11:16:59 +02:00
Xuanwo dc261cdecb Fix clippy
Signed-off-by: Xuanwo <github@xuanwo.io>
2024-06-16 11:16:59 +02:00