Skip to content

Bump version for violentmonkeyscript.user.js #349

Bump version for violentmonkeyscript.user.js

Bump version for violentmonkeyscript.user.js #349

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 ]
pull_request:
branches: [ master ]
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-latest]
rust: [stable, 1.65, 1.66, 1.67]
steps:
- uses: actions/checkout@v2
- 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/sccache-action@c94e27bef21ab3fb4a5152c8a878c53262b4abb0
with:
version: "v0.4.0-pre.6"
- 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: Xuanwo/sccache-action@c94e27bef21ab3fb4a5152c8a878c53262b4abb0
with:
version: "v0.4.0-pre.6"
- 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