Browse Source

Optimize CI run time

By doing a single `cargo build` ahead of time, we are creating all
necessary binaries at once. This allows our cache to work for tests
as well as the binaries.

There is also no need to use release binaries for the smoke test.
Building debug binaries is a lot faster and serves the same purpose:
Checking whether the application actually starts up.
verify-transactions
Thomas Eizinger 4 years ago
parent
commit
b5fe043ca8
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 10
      .github/workflows/ci.yml

10
.github/workflows/ci.yml

@ -62,12 +62,12 @@ jobs:
override: true
toolchain: stable
- uses: Swatinem/rust-cache@v1.3.0
- run: cargo test --workspace --all-features
- run: cargo build --target=${{ matrix.target }} --release --bin maker --bin taker
- name: Smoke test ${{ matrix.target }} release binary
- run: cargo build --all-targets --all-features
- run: cargo test --workspace
- name: Smoke test ${{ matrix.target }} binary
run: |
target/${{ matrix.target }}/release/maker &
target/debug/maker &
sleep 5s # Wait for maker to start
target/${{ matrix.target }}/release/taker &
target/debug/taker &
sleep 5s # Wait for taker to start
curl --fail http://localhost:8000/alive

Loading…
Cancel
Save