Content tracker refactor - add batching and implement expiry #96
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: 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.75" | |
RS_EXAMPLES_LIST: "content-discovery,iroh-ipfs,dumbpipe-web,iroh-pkarr-node-discovery" | |
GO_EXAMPLES_LIST: "dall_e_worker" | |
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@master | |
with: | |
submodules: recursive | |
- name: Install ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy,rustfmt | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
env: | |
XDG_CACHE_HOME: /root/.cache | |
HOME: /root #added based on https://github.com/actions/setup-go/issues/116 | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.3 | |
- 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: 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'}} | |
- name: go | |
continue-on-error: true | |
run: | | |
git clone https://github.com/n0-computer/iroh-ffi.git | |
for i in ${GO_EXAMPLES_LIST//,/ } | |
do | |
echo "Checking $i" | |
cd $i | |
go build | |
cd .. | |
done | |
env: | |
XDG_CACHE_HOME: /root/.cache | |
HOME: /root #added based on https://github.com/actions/setup-go/issues/116 |