From d67ec6ab7bb3f971d14c3d9315b69eeaa20beef2 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 15 Mar 2023 11:28:12 +0100 Subject: [PATCH] Share CI cache across jobs per OS --- .github/workflows/ci-python.yml | 2 ++ .github/workflows/ci.yml | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index f49116c7..850de3c5 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -23,6 +23,8 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: "ubuntu-latest" - name: "Python Dataflow example" run: cargo run --example python-dataflow diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e34ce229..d518131b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ matrix.platform }} - name: "Check" run: cargo check --all @@ -40,6 +42,8 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ matrix.platform }} - name: "Build examples" timeout-minutes: 30 @@ -73,6 +77,8 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ matrix.platform }} - name: "Build cli and binaries" timeout-minutes: 30 @@ -98,13 +104,19 @@ jobs: examples-remote: name: "Examples (Remote)" - runs-on: ubuntu-latest + strategy: + matrix: + platform: [ubuntu-latest] + fail-fast: false + runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ matrix.platform }} - name: "Remote Rust Dataflow example" if: false # skip this example for now until we uploaded new test nodes @@ -120,6 +132,8 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: ubuntu-latest - name: "Clippy" run: cargo clippy --all @@ -148,6 +162,8 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.1.0 - run: cargo --version --verbose - uses: Swatinem/rust-cache@v2 + with: + shared-key: ubuntu-latest - run: cargo install cargo-lichking - name: "Check dependency licenses"