Use console-v2 protocol in logs subcommand #64
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: Rust CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
clippy_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run Clippy | |
run: cargo clippy --all-targets --all-features | |
- name: Run Rustfmt | |
run: cargo fmt --all --check | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
# setup cross-compilation (https://blog.logrocket.com/guide-cross-compilation-rust/) | |
- run: cargo install cross | |
- if: ${{ matrix.os == 'windows-latest' }} | |
run: rustup target add aarch64-pc-windows-msvc | |
- if: ${{ matrix.os == 'macos-latest' }} | |
run: rustup target add aarch64-apple-darwin | |
- if: ${{ matrix.os == 'ubuntu-20.04' }} | |
run: rustup target add aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf | |
- name: Build | |
run: cargo build --verbose --release | |
- name: Build for Linux ARMv6/ARMv8 | |
if: ${{ matrix.os == 'ubuntu-20.04' }} | |
run: | | |
cross build --verbose --release --target aarch64-unknown-linux-gnu | |
cross build --verbose --release --target arm-unknown-linux-gnueabihf | |
- name: Build for Windows ARMv8 | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: cross build --verbose --release --target aarch64-pc-windows-msvc | |
- name: Build for macOS ARMv8 | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: cross build --verbose --release --target aarch64-apple-darwin | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
if: ${{ success() }} | |
with: | |
name: octynectl-${{ matrix.os }} | |
path: | | |
target/release/octynectl${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
target/*/release/octynectl${{ matrix.os == 'windows-latest' && '.exe' || '' }} |