mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-06-01 23:51:46 -04:00
39 lines
1003 B
YAML
39 lines
1003 B
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Setup sccache
|
|
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
|
uses: mozilla-actions/sccache-action@v0.0.6
|
|
- name: Configure sccache
|
|
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
|
run: |
|
|
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
|
|
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libfontconfig1-dev libgoogle-perftools-dev google-perftools
|
|
- uses: actions/checkout@v4
|
|
- name: Clippy
|
|
run: cargo clippy -- -D warnings
|
|
- name: Check fmt
|
|
run: cargo fmt -- --check
|
|
- name: Run tests
|
|
run: cargo test --benches -- adobe_example
|
|
- name: Build
|
|
run: cargo build
|