Bump Swatinem/rust-cache from 2.5.1 to 2.6.0 #132
Workflow file for this run
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
# The NAME makes it easier to copy/paste snippets from other CI configs | |
NAME: tree-crasher | |
jobs: | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous run | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: '0.4.10' | |
- name: Build docs | |
run: | | |
cd doc | |
mdbook build | |
- name: Push docs | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/book | |
- name: Package docs | |
shell: bash | |
run: | | |
tar -cvf doc.tar.gz doc/book/* | |
- name: Upload docs | |
uses: actions/upload-artifact@v3 | |
if: github.repository == 'langston-barrett/${{ env.NAME }}' | |
with: | |
name: "${{ env.NAME }}-docs" | |
path: "*.tar.gz" | |
if-no-files-found: error | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Format | |
run: cargo fmt && git diff --exit-code | |
- name: Deps | |
run: | | |
rustup update | |
rustup component add clippy | |
- uses: Swatinem/rust-cache@b8a6852b4f997182bdea832df3f9e153038b5191 | |
- name: Lint | |
run: cargo clippy -- --deny warnings | |
static: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Deps | |
run: | | |
sudo apt-get install -y musl-tools | |
rustup target add x86_64-unknown-linux-musl | |
- uses: Swatinem/rust-cache@b8a6852b4f997182bdea832df3f9e153038b5191 | |
- run: | | |
cargo build \ | |
--bin ${NAME}-c \ | |
--bin ${NAME}-css \ | |
--bin ${NAME}-javascript \ | |
--bin ${NAME}-regex \ | |
--bin ${NAME}-rust \ | |
--bin ${NAME}-solidity \ | |
--bin ${NAME}-sql \ | |
--bin ${NAME}-typescript \ | |
--locked \ | |
--release \ | |
--target=x86_64-unknown-linux-musl | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@b8a6852b4f997182bdea832df3f9e153038b5191 | |
- run: env RUSTFLAGS="@$PWD/rustc-flags" cargo test --locked --no-run | |
- run: env RUSTFLAGS="@$PWD/rustc-flags" cargo test | |
- run: env RUSTFLAGS="@$PWD/rustc-flags" cargo test --locked --no-run --features=radamsa | |
- run: env RUSTFLAGS="@$PWD/rustc-flags" cargo test --features=radamsa |