v0.3.1 #409
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: treedd | |
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: Build docs | |
uses: ammaraskar/sphinx-action@master | |
with: | |
docs-folder: "doc/" | |
- name: Push docs | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/build/html | |
- name: Package docs | |
shell: bash | |
run: | | |
tar -cvf doc.tar.gz doc/build/html/* | |
- name: Upload docs | |
uses: actions/upload-artifact@v4 | |
if: github.repository == 'langston-barrett/treereduce' | |
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@82a92a6e8fbeee089604da2575dc567ae9ddeaab | |
- name: Lint | |
run: make lint | |
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@82a92a6e8fbeee089604da2575dc567ae9ddeaab | |
- run: make static | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab | |
- run: make build | |
- run: make test |