Skip to content

Commit 16cf8fe

Browse files
committed
Update 'build_upload_mithril_artifact' action
Avoid unwanted usage of features when building the artifacts from the workspace. Split in 2 phases: tooling first and then distribution.
1 parent f54946b commit 16cf8fe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/actions/build-upload-mithril-artifact/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
build-args:
55
description: Arguments to pass to 'cargo build'
66
required: false
7-
default: ''
7+
default: '-p mithril-aggregator -p mithril-client -p mithril-common -p mithril-signer -p mithril-stm'
88
runs:
99
using: "composite"
1010
steps:
@@ -14,10 +14,10 @@ runs:
1414
pip3 install toml
1515
python3 ./.github/workflows/scripts/edit-cargo-toml-version.py -l $(echo ${{ github.sha }} | cut -c1-7)
1616
17-
- name: Cargo build
17+
- name: Cargo build - Distribution
1818
shell: bash
1919
run: cargo build --release ${{ inputs.build-args }}
20-
20+
2121
- name: Publish Mithril Distribution (${{ runner.os }}-${{ runner.arch }})
2222
uses: actions/upload-artifact@v3
2323
with:

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
cache-version: ${{ secrets.CACHE_VERSION }}
3232
cargo-tools: cargo-deb
3333

34+
# We separate the build in 2 steps as we want to avoid side effects with Rust feature unification.
35+
- name: Cargo build - Tooling
36+
shell: bash
37+
run: cargo build --release --workspace --exclude mithril-aggregator --exclude mithril-client --exclude mithril-signer --exclude mithril-stm
38+
3439
- name: Build Mithril workspace & publish artifacts
3540
uses: ./.github/workflows/actions/build-upload-mithril-artifact
3641

0 commit comments

Comments
 (0)