chore: update CI to new base image (#5505) #1084
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
name: Build chainflip-node with benchmarks | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
jobs: | |
build: | |
runs-on: namespace-profile-rust-builder | |
strategy: | |
matrix: | |
profile: [release, production] | |
container: | |
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2024-11-23" | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
NSC_CACHE_PATH: "/cache" | |
volumes: | |
- /cache:/cache | |
options: --cap-add=SYS_ADMIN | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Build with benchmarks | |
run: | | |
cargo build --profile=${{ matrix.profile }} --locked --features runtime-benchmarks -p chainflip-node | |
- name: Upload chainflip-node binary artifact with benchmarks | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 | |
with: | |
name: chainflip-node-ubuntu-benchmarks-${{ matrix.profile }} | |
path: | | |
./target/${{ matrix.profile }}/chainflip-node | |
benchmarks: | |
runs-on: namespace-profile-rust-builder | |
needs: [build] | |
timeout-minutes: 120 | |
strategy: | |
matrix: | |
profile: [release, production] | |
steps: | |
- name: Checkout 🛒 | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Download previously built binaries 📥 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: chainflip-node-ubuntu-benchmarks-${{ matrix.profile }} | |
- name: Run benchmarks 🏃 | |
run: | | |
chmod +x ./chainflip-node | |
./state-chain/scripts/benchmark-all.sh --binary ./chainflip-node --steps 2 --repetitions 1 |