Bump h2 from 0.3.22 to 0.3.24 #292
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: minafoundation-default-runners | |
steps: | |
- name: 📥 Checkout | |
uses: actions/checkout@v4 | |
- name: ✅ Format | |
run: cargo fmt --all -- --check | |
- name: 🔍 Lint | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
- name: 🛠️ Build | |
run: | | |
if [[ ${{ github.ref }} == "refs/heads/main" ]] || [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
cargo build --verbose --release | |
else | |
cargo build --verbose | |
fi | |
- name: 🧪 Test | |
run: cargo test --verbose | |
integration: | |
runs-on: minafoundation-default-runners | |
steps: | |
- name: 🪄 Extract reference name | |
id: extract_ref | |
shell: bash | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
REF_NAME=${{ github.head_ref }} | |
else | |
REF_NAME=$(echo ${GITHUB_REF#refs/*/}) | |
fi | |
echo "Extracted reference name: $REF_NAME" | |
echo "ref=$REF_NAME" >> $GITHUB_OUTPUT | |
- name: 🤌 Get MiniMina from source | |
uses: MinaFoundation/install-minimina-action@v1 | |
with: | |
# Current commit or branch to use for MiniMina | |
commit_or_branch: ${{ steps.extract_ref.outputs.ref }} | |
- name: 🧪 Test default network | |
shell: bash | |
run: | | |
minimina network create | |
minimina network start | |
minimina network status | |
minimina network info | |
minimina node stop -i mina-bp-1 | |
minimina node start -i mina-bp-1 | |
minimina network stop | |
minimina network delete | |
- name: 🧪 Test network from topology | |
shell: bash | |
run: | | |
cd minimina | |
minimina network create -n large -t tests/data/large_network/topology.json -g tests/data/large_network/genesis_ledger.json | |
minimina network start -n large | |
minimina network status -n large | |
minimina network info -n large | |
minimina node stop -n large -i empty_node-1 | |
minimina node start -n large -i empty_node-1 | |
minimina network stop -n large | |
minimina network delete -n large | |
deploy: | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | |
needs: | |
- build | |
- integration | |
runs-on: minafoundation-default-runners | |
environment: package | |
steps: | |
- name: 📥 Checkout | |
uses: actions/checkout@v3 | |
- name: 📦 Package | |
run: | | |
cargo install cargo-deb | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
cargo deb | |
else | |
# add -main suffix to version | |
version=$(grep "^version" Cargo.toml | head -1 | awk -F '"' '{print $2}') | |
modified_version="${version}-main" | |
cargo deb --deb-version="$modified_version" | |
fi | |
- name: 📤 Upload | |
env: | |
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} | |
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y rubygems locales | |
sudo gem install deb-s3 | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
RELEASE=stable | |
else | |
RELEASE=unstable | |
fi | |
sudo locale-gen en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LANGUAGE=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
deb-s3 upload --s3-region=us-west-2 --bucket packages.o1test.net --lock --preserve-versions --access-key-id=$ACCESS_KEY_ID --secret-access-key=$SECRET_ACCESS_KEY --cache-control=max-age=120 --component $RELEASE --codename "ubuntu" ./target/debian/*.deb |