Skip to content

Update README.md

Update README.md #415

Workflow file for this run

name: Linux and macOS
# Template Reference: https://www.infinyon.com/blog/2021/04/github-actions-best-practices/
on:
push:
branches: [ master, llm_candidate ]
pull_request:
branches: [ master, llm_candidate ]
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "true"
jobs:
build:
name: Cargo test (${{ matrix.rust }}) (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14]
rust: [stable]
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
key: rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-${{ steps.get-date.outputs.date }}-build
restore-keys: |
rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-
rust-${{ runner.os }}
# Real tests starts here
- name: Check version
run: rustup --version && rustc --version && cargo --version
- name: Install rustfmt
run: |
rustup component add rustfmt
which rustfmt && rustfmt --version
- name: Build
run: |
cd fire_seq_search_server
cargo build --verbose
- name: Run tests
run: |
cd fire_seq_search_server
cargo test --verbose
- name: Install
run: |
cd fire_seq_search_server
cargo install --path .
- name: Package
run: |
cd fire_seq_search_server
cargo package --verbose
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
key: rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-${{ steps.get-date.outputs.date }}-build
restore-keys: |
rust-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-
rust-${{ runner.os }}
- name: Build
run: |
cd fire_seq_search_server
cargo build --verbose
- name: Save Artifact
run: |
mkdir builds
mv fire_seq_search_server/target/debug/fire_seq_search_server builds
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: logseq-${{ runner.os }}-builds
path: builds
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats