dnstp/.github/workflows/build.yml

56 lines
1.2 KiB
YAML
Raw Normal View History

2024-01-28 19:37:35 +00:00
name: Build Binaries
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allow one concurrent deployment
concurrency:
group: "build"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
2024-01-28 19:40:37 +00:00
with:
toolchain: stable
2024-01-28 19:37:35 +00:00
- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Cargo Test
uses: actions-rs/cargo@v1
with:
2024-01-30 21:58:09 +00:00
command: test
doc:
runs-on: ubuntu-latest
needs: [ build ] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build Docs
run: cargo doc --no-deps --document-private-items
- name: Deploy To Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc