Skip to content

Commit

Permalink
build(ci): Added rule to run release build only on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
serg-temchenko committed May 24, 2024
1 parent 7d8595f commit 13412d3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,18 @@ jobs:
run: RUSTFLAGS="-D warnings" cargo build --locked -q -p polka-storage-runtime
- name: Build node with runtime-benchmark feature
run: RUSTFLAGS="-D warnings" cargo build --locked -q -p polka-storage-node --features runtime-benchmarks
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --locked -q --release
- name: Build in dev mode
run: RUSTFLAGS="-D warnings" cargo build --locked -q
- name: Cargo clippy
run: cargo clippy --locked -q --no-deps -- -D warnings
- name: Run tests
run: RUSTFLAGS="-D warnings" cargo test --locked -q --workspace
- name: Build in release mode
# Run only on merge to the protected branches
if: |
contains(github.ref, 'develop') ||
contains(github.ref, 'main')
run: RUSTFLAGS="-D warnings" cargo build --locked -q --release
- name: Failure handling
if: failure()
run: |
Expand Down

0 comments on commit 13412d3

Please sign in to comment.