Skip to content

Speech accents using sayit library #115

Speech accents using sayit library

Speech accents using sayit library #115

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install native system dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: r7kamura/rust-problem-matchers@b5092889692373e09c98a0aeb380a044a651ab86
- name: Run clippy and cargo checks
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: spacestationnt/ssnt
- name: Login to Docker Hub
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
# cache strategy:
# merges (main branch) read and write from docker hub `cache` tag.
# PRs read from both docker hub and github caches. docker hub for initial compilation and github
# for consecutive builds
cache-from: |
${{ github.event_name != 'push' && 'type=gha' || '' }}
spacestationnt/ssnt:cache
cache-to: |
${{ github.event_name != 'push' && 'type=gha,mode=max' || '' }}
${{ github.event_name == 'push' && 'type=registry,ref=spacestationnt/ssnt:cache,mode=max' || '' }}