Browse Source

Combine test, example, and cli jobs for better caching

By running a single job, we only need to store one cache per OS. Since the jobs share large parts of the dependencies, the total cache size of our workflow becomes smaller. This makes cache eviction less likely (GitHub only keeps the newest 10GB of caches).
ci-combine-jobs
Philipp Oppermann 2 years ago
parent
commit
7e53d43ac4
Failed to extract signature
1 changed files with 5 additions and 43 deletions
  1. +5
    -43
      .github/workflows/ci.yml

+ 5
- 43
.github/workflows/ci.yml View File

@@ -13,7 +13,7 @@ jobs:
platform: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: r7kamura/rust-problem-matchers@v1.1.0
@@ -27,20 +27,6 @@ jobs:
- name: "Test"
run: cargo test --all

examples:
name: "Examples"
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-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

- name: "Build examples"
timeout-minutes: 30
run: cargo build --examples
@@ -60,19 +46,10 @@ jobs:
timeout-minutes: 15
run: cargo run --example cxx-dataflow

CLI:
name: "CLI Test"
strategy:
matrix:
platform: [ubuntu-latest, macos-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
- name: "Remote Rust Dataflow example"
if: runner.os == 'Linux' && false # skip this example for now until we uploaded new test nodes
timeout-minutes: 30
run: cargo run --example rust-dataflow-url

- name: "Build cli and binaries"
timeout-minutes: 30
@@ -96,21 +73,6 @@ jobs:
cd ..
dora-cli destroy

examples-remote:
name: "Examples (Remote)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: r7kamura/rust-problem-matchers@v1.1.0
- run: cargo --version --verbose
- uses: Swatinem/rust-cache@v2

- name: "Remote Rust Dataflow example"
if: false # skip this example for now until we uploaded new test nodes
timeout-minutes: 30
run: cargo run --example rust-dataflow-url

clippy:
name: "Clippy"
runs-on: ubuntu-latest


Loading…
Cancel
Save