.gitea/build: init
This commit is contained in:
parent
922e41fa10
commit
d6688fa003
73
.gitea/workflows/build.yml
Normal file
73
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
name: "Build and test"
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install latest nightly toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --all-features --verbose --release
|
||||||
|
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install latest nightly toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Check code format
|
||||||
|
run: cargo fmt -- --check
|
||||||
|
|
||||||
|
- name: Check clippy
|
||||||
|
run: cargo clippy --all-features -- --deny warnings
|
||||||
|
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install latest nightly toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Build docs
|
||||||
|
run: cargo doc --all-features --document-private-items --release
|
||||||
|
|
||||||
|
- name: Transfer files
|
||||||
|
uses: https://git.pvv.ntnu.no/Projects/rsync-action@main
|
||||||
|
with:
|
||||||
|
source: target/doc/
|
||||||
|
target: ${{ gitea.ref_name }}/docs/
|
||||||
|
username: gitea-web
|
||||||
|
ssh-key: ${{ secrets.WEB_SYNC_SSH_KEY }}
|
||||||
|
host: bekkalokk.pvv.ntnu.no
|
||||||
|
known-hosts: "bekkalokk.pvv.ntnu.no ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEI6VSaDrMG8+flg4/AeHlAFIen8RUzWh6URQKqFegSx"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user