-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add build profiles to the commands (#4198)
* chore: add build profiles to the commands * chore: lots of benchmarking stuff * chore: move benchmarking to new job * chore: try with profile * fix: matrix * fix: don't build runtime separately * fix: name of artifacts * fix: permissions * [skip-ci] fix: workflow permissions 🐛 * fix: remove old branch * [skip-ci] fix: the f* permissions 🤬🐛 * [skip-ci] fix: delete binary 🧹 * Update .cargo/config.toml * fix: berghain prifile name --------- Co-authored-by: Assem Hasna <asem.hasna@gmail.com>
- Loading branch information
1 parent
22e9288
commit cabb2f2
Showing
9 changed files
with
102 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build chainflip-node with benchmarks | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
|
||
jobs: | ||
build: | ||
runs-on: [hetzner] | ||
strategy: | ||
matrix: | ||
ubuntu_version: [20.04] | ||
profile: [release, production] | ||
container: | ||
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2023-07-31-ubuntu-${{ matrix.ubuntu_version }}-27" | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup sccache | ||
run: ./ci/scripts/install_sccache.sh $SCCACHE_VERSION | ||
|
||
- name: Build with benchmarks | ||
run: | | ||
cargo build --profile=${{ matrix.profile }} --locked --features runtime-benchmarks -p chainflip-node | ||
sccache --show-stats | ||
- name: Upload chainflip-node binary artifact with benchmarks | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: chainflip-node-ubuntu-${{ matrix.ubuntu_version }}-benchmarks-${{ matrix.profile }} | ||
path: | | ||
./target/${{ matrix.profile }}/chainflip-node | ||
benchmarks: | ||
runs-on: [hetzner] | ||
needs: [build] | ||
timeout-minutes: 120 | ||
strategy: | ||
matrix: | ||
ubuntu_version: [20.04] | ||
profile: [release, production] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download previously built binaries | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: chainflip-node-ubuntu-${{ matrix.ubuntu_version }}-benchmarks-${{ matrix.profile }} | ||
|
||
- name: Run benchmarks | ||
run: | | ||
chmod +x ./chainflip-node | ||
./state-chain/scripts/benchmark-all.sh --binary ./chainflip-node --steps 2 --repetitions 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters