name: Continuous integration

on:
  pull_request:
  push:
    branches:
      - main

jobs:

  build-and-test-wasm:
    name: Build and test (WASM + Chrome)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: Swatinem/rust-cache@v2
      - name: 'Setup Rust'
        run: |
          curl -sSf https://sh.rustup.rs | sh -s -- -y
          rustup component add clippy
          rustup component add rustfmt
      - name: 'Install environment packages'
        run: |
          sudo apt-get update -qqy
          sudo apt-get install jq protobuf-compiler cmake
      - name: 'Install Rust/WASM test dependencies'
        run: |
          rustup target install wasm32-unknown-unknown
          cargo install toml-cli
          WASM_BINDGEN_VERSION=`toml get ./Cargo.lock . | jq '.package | map(select(.name == "wasm-bindgen"))[0].version' | xargs echo`
          cargo install wasm-bindgen-cli --vers "$WASM_BINDGEN_VERSION"
        shell: bash
      # See: https://github.com/SeleniumHQ/selenium/blob/5d108f9a679634af0bbc387e7e3811bc1565912b/.github/actions/setup-chrome/action.yml
      - name: 'Setup Chrome and chromedriver'
        run: |
          wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
          echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list
          sudo apt-get update -qqy
          sudo apt-get -qqy install google-chrome-stable

          CHROMEDRIVER_URL=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json |
              jq -r '.channels.Stable.downloads.chromedriver | map(select(.platform == "linux64")) | first.url')
          curl -L -O "$CHROMEDRIVER_URL"
          unzip chromedriver-linux64.zip
          pushd ./chromedriver-linux64
          chmod +x chromedriver
          sudo mv chromedriver /usr/local/bin
          popd

          chromedriver -version
        shell: bash
      - name: 'Run Rust headless browser tests'
        run: CHROMEDRIVER=/usr/local/bin/chromedriver cargo test --target wasm32-unknown-unknown
        shell: bash

  build_and_test:
    name: Build and test
    runs-on: ${{ matrix.os }}
    continue-on-error: false
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macOS-latest]
        rust: [stable]
        experimental: [false]
        include:
          - os: ubuntu-latest
            rust: stable
            release-os: linux
            release-arch: amd64
            protoc-arch: linux-x86_64
          - os: macos-latest
            rust: stable
            release-os: darwin
            release-arch: aarch64
            protoc-arch: osx-aarch_64
          # windows is broken somehow atm
          - os: windows-latest
            rust: stable
            release-os: windows
            release-arch: amd64

    env:
      RUST_BACKTRACE: full
      # Force not building debuginfo to save space on disk.
      RUSTFLAGS: "-C debuginfo=0"
      RUSTV: ${{ matrix.rust }}
      MSRV: "1.70"
    steps:
    - uses: actions/checkout@master

    - name: Set build arch
      run: |
        echo "PROTOC_ARCH=${{ matrix.protoc-arch }}" >> $GITHUB_ENV

    - name: Install ${{ matrix.rust }}
      run: |
        rustup toolchain install --profile default ${{ matrix.rust }}

    - name: Install Rust MSRV
      if: matrix.os != 'windows-latest'
      run: |
        rustup toolchain install --profile minimal $MSRV

    - name: Install Rust MSRV
      if: matrix.os == 'windows-latest'
      run: |
        rustup toolchain install --profile minimal $Env:MSRV

    - name: Install Protoc windows
      if: matrix.os == 'windows-latest'
      uses: arduino/setup-protoc@v1
      with:
        version: '3.20.1'
        repo-token: ${{ secrets.GITHUB_TOKEN }}

    - name: Install Protoc
      if: matrix.os != 'windows-latest'
      run: |
        PROTOC_VERSION=3.20.1
        PROTOC_ZIP=protoc-$PROTOC_VERSION-$PROTOC_ARCH.zip
        curl --retry 3 --retry-max-time 90 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP
        sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
        sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
        rm -f $PROTOC_ZIP
        echo "PROTOC=/usr/local/bin/protoc" >> $GITHUB_ENV
        echo "PROTOC_INCLUDE=/usr/local/include" >> $GITHUB_ENV

    - name: check MSRV
      if: matrix.os != 'windows-latest'
      run: |
        cargo +$MSRV check --all-targets

    - name: check MSRV
      if: matrix.os == 'windows-latest'
      run: |
        cargo +$Env:MSRV check --all-targets

    - name: check
      run: |
        cargo check --all-targets

    - name: clippy
      run: |
        cargo clippy --all-targets -- -D warnings

    - name: docs
      env:
        RUSTDOCFLAGS: -Dwarnings
      run: |
        cargo doc --no-deps --document-private-items

    - name: tests
      timeout-minutes: 30
      run: |
        cargo test --lib --bins --tests --examples

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable

    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - run: rustup component add rustfmt
      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

  audit:
    name: audit
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable

    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: install
          args: --force cargo-audit
      - uses: actions-rs/cargo@v1
        with:
          command: generate-lockfile
      - uses: actions-rs/cargo@v1
        with:
          command: audit

Homonyms

soft3/hemera/.github/workflows/ci.yml
soft3/tru/.github/workflows/ci.yml
soft3/lens/.github/workflows/ci.yml
soft3/radio/.github/workflows/ci.yml
cyb/honeycrisp/rane/.github/workflows/ci.yml
soft3/radio/iroh-willow/.github/workflows/ci.yml
cyb/honeycrisp/aruminium/.github/workflows/ci.yml
soft3/radio/quinn/.github/workflows/ci.yml
soft3/radio/iroh-ffi/.github/workflows/ci.yml
neural/inf/rs/cozo/cozo-lib-python/.github_disabled/workflows/CI.yml
cyb/honeycrisp/.claude/worktrees/agent-ad6c77c38e86bc291/aruminium/.github/workflows/ci.yml
cyb/honeycrisp/.claude/worktrees/agent-aa1259cb10112b22a/aruminium/.github/workflows/ci.yml
cyb/honeycrisp/.claude/worktrees/agent-ad6c77c38e86bc291/rane/.github/workflows/ci.yml
cyb/honeycrisp/.claude/worktrees/agent-aa1259cb10112b22a/rane/.github/workflows/ci.yml

Graph