use latest sccache, bump nix flake lock, cache everything in rust-cache

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2025-01-02 18:55:52 -05:00
parent 6c8a1b5e9b
commit 7a349fdc58
No known key found for this signature in database
5 changed files with 30 additions and 28 deletions

View file

@ -188,13 +188,13 @@ jobs:
- name: Run sccache-cache - name: Run sccache-cache
if: (env.SCCACHE_GHA_ENABLED == 'true') if: (env.SCCACHE_GHA_ENABLED == 'true')
uses: mozilla-actions/sccache-action@main uses: mozilla-actions/sccache-action@main
with:
version: "v0.8.2"
# use rust-cache # use rust-cache
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
cache-all-crates: "true" cache-all-crates: "true"
cache-on-failure: "true"
cache-targets: "true"
- name: Run CI tests - name: Run CI tests
env: env:
@ -366,13 +366,13 @@ jobs:
- name: Run sccache-cache - name: Run sccache-cache
if: (env.SCCACHE_GHA_ENABLED == 'true') if: (env.SCCACHE_GHA_ENABLED == 'true')
uses: mozilla-actions/sccache-action@main uses: mozilla-actions/sccache-action@main
with:
version: "v0.8.2"
# use rust-cache # use rust-cache
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
cache-all-crates: "true" cache-all-crates: "true"
cache-on-failure: "true"
cache-targets: "true"
- name: Build static ${{ matrix.target }}-all-features - name: Build static ${{ matrix.target }}-all-features
run: | run: |
@ -660,6 +660,8 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
cache-all-crates: "true" cache-all-crates: "true"
cache-on-failure: "true"
cache-targets: "true"
# Nix can't do portable macOS builds yet # Nix can't do portable macOS builds yet
- name: Build macOS x86_64 binary - name: Build macOS x86_64 binary
@ -921,4 +923,4 @@ jobs:
if [ ! -z $GITLAB_TOKEN ]; then if [ ! -z $GITLAB_TOKEN ]; then
echo "- \`docker pull ${GLCR_TAG}\`" >> $GITHUB_STEP_SUMMARY echo "- \`docker pull ${GLCR_TAG}\`" >> $GITHUB_STEP_SUMMARY
echo "- \`docker pull ${GLCR_TAG}-debug\`" >> $GITHUB_STEP_SUMMARY echo "- \`docker pull ${GLCR_TAG}-debug\`" >> $GITHUB_STEP_SUMMARY
fi fi

6
Cargo.lock generated
View file

@ -95,7 +95,7 @@ checksum = "5f093eed78becd229346bf859eec0aa4dd7ddde0757287b2b4107a1f09c80002"
[[package]] [[package]]
name = "async-channel" name = "async-channel"
version = "2.3.1" version = "2.3.1"
source = "git+https://github.com/jevolk/async-channel?rev=fefa543ca5eddf21237d75776fce98b7e09e924a#fefa543ca5eddf21237d75776fce98b7e09e924a" source = "git+https://github.com/girlbossceo/async-channel?rev=92e5e74063bf2a3b10414bcc8a0d68b235644280#92e5e74063bf2a3b10414bcc8a0d68b235644280"
dependencies = [ dependencies = [
"concurrent-queue", "concurrent-queue",
"event-listener-strategy", "event-listener-strategy",
@ -938,7 +938,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]] [[package]]
name = "core_affinity" name = "core_affinity"
version = "0.8.1" version = "0.8.1"
source = "git+https://github.com/jevolk/core_affinity_rs?rev=9c8e51510c35077df888ee72a36b4b05637147da#9c8e51510c35077df888ee72a36b4b05637147da" source = "git+https://github.com/girlbossceo/core_affinity_rs?rev=9c8e51510c35077df888ee72a36b4b05637147da#9c8e51510c35077df888ee72a36b4b05637147da"
dependencies = [ dependencies = [
"libc", "libc",
"num_cpus", "num_cpus",
@ -1258,7 +1258,7 @@ dependencies = [
[[package]] [[package]]
name = "event-listener" name = "event-listener"
version = "5.3.1" version = "5.3.1"
source = "git+https://github.com/jevolk/event-listener?rev=96d7e0fc026d8f708b19bc9267a382676a50354c#96d7e0fc026d8f708b19bc9267a382676a50354c" source = "git+https://github.com/girlbossceo/event-listener?rev=fe4aebeeaae435af60087ddd56b573a2e0be671d#fe4aebeeaae435af60087ddd56b573a2e0be671d"
dependencies = [ dependencies = [
"concurrent-queue", "concurrent-queue",
"parking", "parking",

View file

@ -532,14 +532,14 @@ rev = "deaeb0694e2083f53d363b648da06e10fc13900c"
# adds LIFO queue scheduling; this should be updated with PR progress. # adds LIFO queue scheduling; this should be updated with PR progress.
[patch.crates-io.event-listener] [patch.crates-io.event-listener]
git = "https://github.com/jevolk/event-listener" git = "https://github.com/girlbossceo/event-listener"
rev = "96d7e0fc026d8f708b19bc9267a382676a50354c" rev = "fe4aebeeaae435af60087ddd56b573a2e0be671d"
[patch.crates-io.async-channel] [patch.crates-io.async-channel]
git = "https://github.com/jevolk/async-channel" git = "https://github.com/girlbossceo/async-channel"
rev = "fefa543ca5eddf21237d75776fce98b7e09e924a" rev = "92e5e74063bf2a3b10414bcc8a0d68b235644280"
[patch.crates-io.core_affinity] [patch.crates-io.core_affinity]
git = "https://github.com/jevolk/core_affinity_rs" git = "https://github.com/girlbossceo/core_affinity_rs"
rev = "9c8e51510c35077df888ee72a36b4b05637147da" rev = "9c8e51510c35077df888ee72a36b4b05637147da"
# #

24
flake.lock generated
View file

@ -117,11 +117,11 @@
}, },
"crane_2": { "crane_2": {
"locked": { "locked": {
"lastModified": 1733688869, "lastModified": 1734808813,
"narHash": "sha256-KrhxxFj1CjESDrL5+u/zsVH0K+Ik9tvoac/oFPoxSB8=", "narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "604637106e420ad99907cae401e13ab6b452e7d9", "rev": "72e2d02dbac80c8c86bf6bf3e785536acf8ee926",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -170,11 +170,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1733726208, "lastModified": 1735799625,
"narHash": "sha256-Z6zL4AtpZWxkvTd3l0KkPZamu2wtTKl4nNiqNSlgsb4=", "narHash": "sha256-lFadwWDvVIub11bwfZhsh2WUByf9LOi6yjsSUMmE0xk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "d51a64e1d23e509f28a6955a6652cc62409dd4a8", "rev": "a9d84a1545814910cb4ab0515ed6921e8b07ee95",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -550,11 +550,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1733656523, "lastModified": 1735685343,
"narHash": "sha256-w0FXPfpGhOihoJDiwMsyN1EzpsXi2F8VQ+NVZQSMtys=", "narHash": "sha256-h1CpBzdJDNtSUb5QMyfFHKHocTTky+4McgQEBQBM+xA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "93dc9803a1ee435e590b02cde9589038d5cc3a4e", "rev": "81934660d6e9ea54d2f0cdee821e8533b10c221a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -599,11 +599,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733642337, "lastModified": 1735742096,
"narHash": "sha256-I1uc97f/cNhOpCemIbBAUS+CV0R7jts0NW9lc8jrpxc=", "narHash": "sha256-q3a80h8Jf8wfmPURUgRR46nQCB3I5fhZ+/swulTF5HY=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "4c755e62a617eeeef3066994731ce1cdd16504ac", "rev": "7e639ee3dda6ed9cecc79d41f6d38235121e483d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -8,7 +8,7 @@ use std::{
}, },
}; };
use async_channel::{Receiver, RecvError, Sched, Sender}; use async_channel::{QueueStrategy, Receiver, RecvError, Sender};
use conduwuit::{ use conduwuit::{
debug, debug_warn, defer, err, implement, debug, debug_warn, defer, err, implement,
result::DebugInspect, result::DebugInspect,
@ -71,13 +71,13 @@ const BATCH_INLINE: usize = 1;
#[implement(Pool)] #[implement(Pool)]
pub(crate) async fn new(server: &Arc<Server>) -> Result<Arc<Self>> { pub(crate) async fn new(server: &Arc<Server>) -> Result<Arc<Self>> {
const CHAN_SCHED: (Sched, Sched) = (Sched::Fifo, Sched::Lifo); const CHAN_SCHED: (QueueStrategy, QueueStrategy) = (QueueStrategy::Fifo, QueueStrategy::Lifo);
let (total_workers, queue_sizes, topology) = configure(server); let (total_workers, queue_sizes, topology) = configure(server);
let (senders, receivers) = queue_sizes let (senders, receivers) = queue_sizes
.into_iter() .into_iter()
.map(|cap| async_channel::bounded_with_sched(cap, CHAN_SCHED)) .map(|cap| async_channel::bounded_with_queue_strategy(cap, CHAN_SCHED))
.unzip(); .unzip();
let pool = Arc::new(Self { let pool = Arc::new(Self {