Skip to content

Commit a8b967f

Browse files
Fix caching of rust, make sure we send system out/system err correctly, disable macos x86
1 parent b7496e1 commit a8b967f

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/native.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ jobs:
3939
runner: ubuntu-latest
4040
cross: true
4141
rustflags: "-C target-feature=-crt-static"
42-
# macOS runners are expensive; comment out the two darwin targets to disable them.
43-
- target: x86_64-apple-darwin
44-
runner: macos-13
45-
cross: false
46-
rustflags: ""
42+
# macOS runners are expensive; comment out the darwin targets to disable them.
43+
# x86_64 darwin disabled for now — re-enable if Intel Mac support is needed.
44+
# - target: x86_64-apple-darwin
45+
# runner: macos-13
46+
# cross: false
47+
# rustflags: ""
4748
- target: aarch64-apple-darwin
4849
runner: macos-14
4950
cross: false

.github/workflows/tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030

3131
- name: Install Rust toolchain
3232
uses: actions-rust-lang/setup-rust-toolchain@v1
33+
with:
34+
# This action bundles Swatinem/rust-cache; point it at the crate's subdirectory (the
35+
# default targets the repo root and misses it), so the cdylib build is cached across runs.
36+
cache-workspaces: sdk-core/src/main/rust
3337

3438
- name: Pull Restate docker image
3539
run: docker pull ghcr.io/restatedev/restate:main
@@ -59,6 +63,10 @@ jobs:
5963
uses: gradle/actions/setup-gradle@v4
6064
- name: Install Rust toolchain
6165
uses: actions-rust-lang/setup-rust-toolchain@v1
66+
with:
67+
# This action bundles Swatinem/rust-cache; point it at the crate's subdirectory (the
68+
# default targets the repo root and misses it), so the cdylib build is cached across runs.
69+
cache-workspaces: sdk-core/src/main/rust
6270

6371
- name: Build Javadocs
6472
run: gradle :sdk-aggregated-javadocs:javadoc

sdk-core/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ val cargoBuild by
5656
workingDir = rustSrcDir
5757
environment("SHARED_CORE_HEADER_OUT", generatedHeaderFile.get().asFile.absolutePath)
5858
commandLine("cargo", "build", "--release", "--target", hostRustTarget)
59+
standardOutput = System.out
60+
errorOutput = System.err
5961
inputs.dir("$rustSrcDir/src")
6062
inputs.file("$rustSrcDir/Cargo.toml")
6163
inputs.file("$rustSrcDir/build.rs")

0 commit comments

Comments
 (0)