Skip to content

Commit 5068eaa

Browse files
committed
ci(repo): optimize github actions
1 parent a3e7380 commit 5068eaa

File tree

7 files changed

+45
-13
lines changed

7 files changed

+45
-13
lines changed

.cargo/config.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ inherits = "dev"
1515
debug = 0
1616
opt-level = 0
1717
debug-assertions = true
18-
codegen-units = 16
19-
incremental = false
18+
codegen-units = 32
19+
incremental = true
2020
rpath = false
2121
lto = false
2222
panic = 'unwind'
2323
overflow-checks = true
24+
25+
[net]
26+
git-fetch-with-cli = true
27+
parallel = true

.github/actions/setup-rust/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
toolchain:
1010
description: Rust toolchain version to install
1111
required: true
12-
default: 1.79.0
12+
default: 1.81.0
1313
cache:
1414
description: Use sscache
1515
required: false

.github/workflows/ci.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,38 @@ concurrency:
2323
cancel-in-progress: true
2424

2525
jobs:
26+
install-deps:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install Rust
32+
uses: ./.github/actions/setup-rust
33+
with:
34+
toolchain: ${{ env.RUST_NIGHTLY_VERSION }}
35+
cache: true
36+
37+
- name: Install nextest
38+
uses: taiki-e/cache-cargo-install-action@v2
39+
with:
40+
tool: cargo-nextest
41+
locked: true
42+
43+
- name: Install dependencies
44+
run: cargo fetch
45+
2646
compile:
27-
name: Compile packages
47+
needs: install-deps
48+
name: Compile ${{ matrix.package }}
2849
runs-on: ubuntu-latest
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
package:
54+
- fuel-streams
55+
- fuel-streams-core
56+
- fuel-streams-macros
57+
- fuel-streams-publisher
2958
steps:
3059
- uses: actions/checkout@v4
3160

@@ -34,8 +63,8 @@ jobs:
3463
with:
3564
toolchain: ${{ env.RUST_NIGHTLY_VERSION }}
3665

37-
- name: Compile all packages
38-
run: cargo build --profile ci --workspace
66+
- name: Compile package
67+
run: cargo build --profile ci --package ${{ matrix.package }}
3968

4069
test:
4170
needs: compile
@@ -82,8 +111,7 @@ jobs:
82111
run: make stop/nats
83112

84113
build:
85-
# needs:
86-
# - cargo-verifications
114+
needs: test
87115
name: Build ${{ matrix.package }} for ${{ matrix.platform.target }}
88116
runs-on: ${{ matrix.platform.os }}
89117
strategy:

.github/workflows/prepare_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
env:
1515
CARGO_TERM_COLOR: always
1616
CLICOLOR: 1
17-
RUST_VERSION: 1.79.0
17+
RUST_VERSION: 1.81.0
1818
RUST_NIGHTLY_VERSION: nightly-2024-11-06
1919

2020
jobs:

.github/workflows/publish_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
CI: true
10-
RUST_VERSION: 1.79.0
10+
RUST_VERSION: 1.81.0
1111

1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/update_deps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defaults:
2222
env:
2323
# Prevents cargo from complaining about unstable features
2424
RUSTC_BOOTSTRAP: 1
25-
RUST_VERSION: 1.79.0
25+
RUST_VERSION: 1.81.0
2626
PR_TITLE: "chore(deps): weekly `cargo update`"
2727
PR_MESSAGE: |
2828
Automation to keep dependencies in `Cargo.lock` current.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ test-watch:
244244

245245
test:
246246
@if [ "$(TEST_PROJECT)" = "all" ]; then \
247-
cargo nextest run --profile $(CARGO_PROFILE) --workspace --color always --locked && \
247+
cargo nextest run --cargo-profile $(CARGO_PROFILE) --workspace --color always --locked && \
248248
cargo test --profile $(CARGO_PROFILE) --doc --workspace; \
249249
else \
250-
cargo nextest run --profile $(CARGO_PROFILE) -p $(TEST_PROJECT) --color always --locked && \
250+
cargo nextest run --cargo-profile $(CARGO_PROFILE) -p $(TEST_PROJECT) --color always --locked && \
251251
cargo test --profile $(CARGO_PROFILE) --doc -p $(TEST_PROJECT); \
252252
fi
253253

0 commit comments

Comments
 (0)