Include error tasks during tester benchmarks (#990) #13
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 Docker tester image | |
on: | |
push: | |
paths: | |
- '.github/workflows/merge-docker-tester.yaml' | |
- 'analog-gmp/**' | |
- 'config/subxt/**' | |
- 'primitives/**' | |
- 'tc-subxt/**' | |
- 'tester/**' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'rust-toolchain.toml' | |
branches: | |
- 'development' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
DOCKER_REPO: analoglabs/tester | |
jobs: | |
set-tags: | |
name: Get & set tags | |
runs-on: ubuntu-latest | |
outputs: | |
commit_hash: ${{ steps.get-sha.outputs.sha }} | |
commit_hash8: ${{ steps.get-sha.outputs.sha8 }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get SHA | |
id: get-sha | |
run: | | |
sha=$(git log -1 --format='%H') | |
echo "sha=$sha" >> $GITHUB_OUTPUT | |
echo "sha8=$(git log -1 --format='%H' | cut -c1-8)" >> $GITHUB_OUTPUT | |
echo "SHA commit:" $sha | |
build-binary: | |
name: Build Docker image | |
needs: ["set-tags"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch latest code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Cargo | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Build contracts | |
run: forge build --root analog-gmp --optimize --optimizer-runs=200000 --evm-version=shanghai --use=0.8.25 --force | |
- name: Build tester | |
run: cargo build --release -p tester | |
- name: Copy contracts | |
run: cp -r target/release/tester tester-bin | |
- name: Build and push | |
uses: ./.github/actions/buildah-action | |
with: | |
image_name: ${{ env.DOCKER_REPO }}:${{ needs.set-tags.outputs.commit_hash8 }} | |
containerfile: ./config/docker/Dockerfile.tester-release | |
context: . | |
volume: ${{ github.workspace }}/target:/build/target | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
registry: docker.io | |
push: 'true' | |