Skip to content

Commit 6026b84

Browse files
committed
More caching, more cleanup
1 parent 3cceeb7 commit 6026b84

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

.github/workflows/build_and_release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ jobs:
4848
include:
4949
- runner: [runs-on, runner=32cpu-linux-x64, "run-id=${{ github.run_id }}"]
5050
os: ubuntu
51+
cachekey: ubuntu-x86
5152
- runner: [runs-on, runner=32cpu-linux-arm64, "run-id=${{ github.run_id }}"]
5253
os: ubuntu
54+
cachekey: ubuntu-arm64
5355
- runner: self-hosted
5456
os: macos
57+
cachekey: macos-arm64
5558
- runner: macos-13
5659
os: macos
60+
cachekey: macos-x86
5761

5862
steps:
5963
- name: Free Disk Space (Ubuntu)
@@ -70,6 +74,17 @@ jobs:
7074

7175
- uses: actions/checkout@v4
7276

77+
- uses: actions/cache@v4
78+
name: Cache Rust toolchain
79+
with:
80+
path: |
81+
rust/build
82+
rust/library
83+
rust/src/doc
84+
rust/src/llvm-project
85+
rust/src/tools
86+
key: ${{ matrix.cachekey }}-buildtoolchain-${{ env.RUST_COMMIT }}
87+
7388
- name: Install ninja
7489
uses: lukka/get-cmake@v3.30.2
7590

build.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -euo pipefail
55
source config.sh
66

77
# Fail fast if these tools aren't properly installed and in the path
8-
need_cmd clang
9-
need_cmd clang++
8+
# need_cmd clang
9+
# need_cmd clang++
1010

1111
# Rust requires a custom target file to exist for our custom target as part of the bootstrap build,
1212
# but it doesn't actually look at the contents.
@@ -19,9 +19,6 @@ export CFLAGS_riscv32em_athena_zkvm_elf="-ffunction-sections -fdata-sections -fP
1919
# Set Rust flags
2020
export CARGO_TARGET_RISCV32EM_ATHENA_ZKVM_ELF_RUSTFLAGS="-Cpasses=loweratomic"
2121

22-
# Prevent the build system from adding --target flag
23-
#export RUSTC_TARGET_ARG=""
24-
2522
# Will create component archives (dists) ./rust/build/dist
2623
cd rust
2724
./x build --stage 2

patches/config.ci.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ tools = ["cargo", "cargo-clippy", "clippy", "rustfmt"]
77
configure-args = []
88
cargo-native-static = true
99

10-
[target.riscv32em-athena-zkvm-elf]
11-
cc = "clang"
12-
cxx = "clang++"
10+
# [target.riscv32em-athena-zkvm-elf]
11+
# cc = "clang"
12+
# cxx = "clang++"
1313

1414
[rust]
1515
lld = true

patches/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ extended = true
66
tools = ["cargo", "cargo-clippy", "clippy", "rustfmt"]
77
configure-args = []
88

9-
[target.riscv32em-athena-zkvm-elf]
10-
cc = "clang"
11-
cxx = "clang++"
9+
# [target.riscv32em-athena-zkvm-elf]
10+
# cc = "clang"
11+
# cxx = "clang++"
1212

1313
[rust]
1414
lld = true

0 commit comments

Comments
 (0)