Skip to content

fix: swap -s and -x flags for stream and max-size options #22

fix: swap -s and -x flags for stream and max-size options

fix: swap -s and -x flags for stream and max-size options #22

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy -- -D warnings
- name: Format check
run: cargo fmt --check
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: yek
asset_name: yek-x86_64-unknown-linux-gnu.tar.gz
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: yek
asset_name: yek-x86_64-apple-darwin.tar.gz
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: yek
asset_name: yek-aarch64-apple-darwin.tar.gz
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Build target
run: cargo build --release --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
staging="yek-${{ matrix.target }}"
mkdir -p "$staging"
cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "$staging/"
tar czf "${{ matrix.asset_name }}" "$staging"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.asset_name }}
release:
name: Release
needs: [test, lint, build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: List artifacts
run: ls -R artifacts
- name: Move artifacts
run: |
mv artifacts/*/*.tar.gz ./
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
*.tar.gz