Skip to content

Bump styfle/cancel-workflow-action from 0.12.0 to 0.12.1 #149

Bump styfle/cancel-workflow-action from 0.12.0 to 0.12.1

Bump styfle/cancel-workflow-action from 0.12.0 to 0.12.1 #149

Workflow file for this run

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@v4
- 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@v4
- name: Format
run: cargo fmt && git diff --exit-code
- name: Deps
run: |
rustup update
rustup component add clippy
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8
- name: Lint
run: cargo clippy -- --deny warnings
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deps
run: |
sudo apt-get install -y musl-tools
rustup target add x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8
- 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@v4
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8
- 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