Skip to content

chore: remove algokit_utils and algokit_utils_ffi crates #1113

chore: remove algokit_utils and algokit_utils_ffi crates

chore: remove algokit_utils and algokit_utils_ffi crates #1113

Workflow file for this run

name: CI/CD
on:
# push: # A push indicates that a PR is merged and CD should be triggered
# branches:
# - main
pull_request: # For PRs, we run CI, which is the same as CD without the release step(s)
branches:
- main
jobs:
check_rust:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
# Enable verbose logging for debugging localnet and test issues
RUST_LOG: debug
# Ensure output is not buffered for immediate feedback
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.85.0
components: clippy, rustfmt
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install algokit CLI
run: uv tool install algokit
- name: Check formatting
run: cargo fmt --check
- name: Clippy
# Run clippy and treat warnings as errors
run: cargo clippy -- -D warnings
- name: Start localnet
run: algokit localnet start
- name: Build all crates
run: cargo build --workspace
- name: Run Rust tests with cargo t (cargo-nextest)
run: cargo t --workspace --all-targets --failure-output=immediate --status-level=all
# A setup job to define the matricies that will be used across all of the jobs in this workflow
setup:
runs-on: ubuntu-latest
outputs:
# Swift/FFI jobs (array of objects: crate_name, swift_package)
ffi_packages: ${{ steps.set_matrices.outputs.ffi_packages }}
steps:
- id: set_matrices
run: |
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import json
# Crates that produce FFI bindings
crates = ["algokit_transact"]
items = []
for crate in crates:
pascal = ''.join(p.capitalize() for p in crate.split('_'))
# Brand fixups
pascal = pascal.replace('Algokit', 'AlgoKit')
items.append({"crate_name": crate, "swift_package": pascal})
print('ffi_packages=' + json.dumps(items))
PY
swift_ci:
needs:
- setup
uses: ./.github/workflows/swift_ci.yml
strategy:
matrix:
include: ${{ fromJSON(needs.setup.outputs.ffi_packages) }}
with:
crate: ${{ matrix.crate_name }}
package: ${{ matrix.swift_package }}
release: ${{ github.event_name == 'push' }}