Skip to content

Actually actually build Linux with http2 #42

Actually actually build Linux with http2

Actually actually build Linux with http2 #42

Workflow file for this run

# Based on https://github.com/AlyoshaVasilieva/luminous-ttv/blob/main/.github/workflows/release.yaml
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths:
- '**.rs'
- 'Cargo**'
name: Release
jobs:
check:
name: Check
strategy:
fail-fast: false
matrix:
version: [ 'ubuntu-latest', 'windows-latest' ]
runs-on: ${{ matrix.version }}
steps:
- uses: actions/checkout@v3
- name: setup
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo check
lint:
name: Lint
needs: check
strategy:
fail-fast: false
matrix:
version: [ 'ubuntu-latest', 'windows-latest' ]
cargo-cmd:
- fmt --all -- --check
- clippy --all
runs-on: ${{ matrix.version }}
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo ${{ matrix['cargo-cmd'] }}
release:
name: Release
needs: lint
runs-on: ${{ matrix.os }}
env:
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS: "-Ctarget-cpu=x86-64-v2"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Ctarget-cpu=x86-64-v2"
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-msvc
os: windows-latest
binName: twitch-hls-client.exe
- target: i686-pc-windows-msvc
os: windows-latest
binName: twitch-hls-client.exe
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
binName: twitch-hls-client
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- run: cargo build --release --target=${{ matrix.target }} --features http2
if: ${{ contains(matrix.target, 'linux') }}
- run: cargo build --release --target=${{ matrix.target }}
if: ${{ !contains(matrix.target, 'linux') }}
- name: Smoke Test
run: cargo run --release --target=${{ matrix.target }} --features http2 -- -V
if: ${{ contains(matrix.target, 'linux') }}
- name: Smoke Test
run: cargo run --release --target=${{ matrix.target }} -- -V
if: ${{ !contains(matrix.target, 'linux') }}
- name: Move Binary
id: mv
run: mv "target/${{ matrix.target }}/release/${{ matrix.binName }}" .
- name: Zip Files
uses: vimtor/[email protected]
id: archive
with:
files: README.md LICENSE ${{ matrix.binName }}
dest: twitch-hls-client-${{ matrix.target }}.zip
- name: Upload Archive
uses: ncipollo/release-action@v1
with:
draft: true
allowUpdates: true
updateOnlyUnreleased: true
artifactErrorsFailBuild: true
artifacts: twitch-hls-client-${{ matrix.target }}.zip
artifactContentType: application/zip
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true