Add iroh-loro: P2P CRDT sync using Loro and iroh #356
This file contains hidden or 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: CI | |
on: | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
RUST_BACKTRACE: 1 | |
RUSTFLAGS: -Dwarnings | |
RUSTDOCFLAGS: -Dwarnings | |
MSRV: "1.81" | |
RS_EXAMPLES_LIST: "dumbpipe-web,extism/host,extism/iroh-extism-host-functions,extism/plugin,iroh-automerge,iroh-automerge-repo,iroh-gateway,frosty,browser-echo,framed-messages" | |
WASM_EXAMPLES_LIST: "browser-echo" | |
IROH_FORCE_STAGING_RELAYS: "1" | |
jobs: | |
build_and_test_nix: | |
timeout-minutes: 30 | |
name: Build and test (Nix) | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ubuntu-latest] | |
rust: [stable] | |
include: | |
- name: ubuntu-latest | |
os: ubuntu-latest | |
release-os: linux | |
release-arch: amd64 | |
runner: [self-hosted, linux, X64] | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy,rustfmt | |
- name: Add wasm target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: check | |
run: | | |
for i in ${RS_EXAMPLES_LIST//,/ } | |
do | |
echo "Checking $i" | |
cargo check --manifest-path $i/Cargo.toml --all-features | |
done | |
env: | |
RUST_LOG: ${{ runner.debug && 'DEBUG' || 'INFO'}} | |
- name: wasm | |
run: | | |
for i in ${WASM_EXAMPLES_LIST//,/ } | |
do | |
echo "Checking wasm $i" | |
cd $i | |
# the rust flag should get picked up from the `config.toml` file | |
# but cargo build seems to not be picking it up | |
# this dependency exists for both `browser-chat` and `browser-echo` | |
# so I'm adding the flag to the command | |
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --target wasm32-unknown-unknown | |
cd .. | |
done | |
env: | |
RUST_LOG: ${{ runner.debug && 'DEBUG' || 'INFO'}} | |
- name: fmt | |
run: | | |
for i in ${RS_EXAMPLES_LIST//,/ } | |
do | |
echo "Checking $i" | |
cargo fmt --all --manifest-path $i/Cargo.toml -- --check | |
done | |
env: | |
RUST_LOG: ${{ runner.debug && 'DEBUG' || 'INFO'}} | |
- name: clippy | |
run: | | |
for i in ${RS_EXAMPLES_LIST//,/ } | |
do | |
echo "Checking $i" | |
cargo clippy --manifest-path $i/Cargo.toml | |
done | |
env: | |
RUST_LOG: ${{ runner.debug && 'DEBUG' || 'INFO'}} |