This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
Take closed_captions api field for subtitles into account (#297) #597
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: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- arch: x86_64 | |
toolchain: x86_64-unknown-linux-musl | |
- arch: aarch64 | |
toolchain: aarch64-unknown-linux-musl | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.toolchain }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Install cross | |
run: cargo install --force cross | |
- name: Build | |
run: cross build --release --no-default-features --features openssl-tls-static --target ${{ matrix.toolchain }} | |
- name: Upload binary artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: crunchy-cli-linux-${{ matrix.arch }} | |
path: ./target/${{ matrix.toolchain }}/release/crunchy-cli | |
if-no-files-found: error | |
- name: Upload manpages artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: manpages | |
path: ./target/${{ matrix.toolchain }}/release/manpages | |
if-no-files-found: error | |
- name: Upload completions artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: completions | |
path: ./target/${{ matrix.toolchain }}/release/completions | |
if-no-files-found: error | |
build-mac: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: x86_64-apple-darwin-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Build | |
run: cargo build --release --target x86_64-apple-darwin | |
- name: Upload binary artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: crunchy-cli-darwin-x86_64 | |
path: ./target/x86_64-apple-darwin/release/crunchy-cli | |
if-no-files-found: error | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: x86_64-pc-windows-gnu-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install system dependencies | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: mingw-w64-x86_64-rust base-devel | |
- name: Build | |
shell: msys2 {0} | |
run: cargo build --release --target x86_64-pc-windows-gnu | |
- name: Upload binary artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: crunchy-cli-windows-x86_64 | |
path: ./target/x86_64-pc-windows-gnu/release/crunchy-cli.exe | |
if-no-files-found: error |