Skip to content

Commit

Permalink
Merge pull request #9 from kianmeng/prettify-yaml
Browse files Browse the repository at this point in the history
Prettify yaml files
  • Loading branch information
ku1ik authored Sep 11, 2022
2 parents a8dc6f5 + 27981bc commit 0b6b0bf
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always
Expand All @@ -14,24 +14,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true

- name: Build
run: cargo build --verbose
- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose
- name: Run tests
run: cargo test --verbose

- name: Check formatting
run: cargo fmt --check
- name: Check formatting
run: cargo fmt --check

- name: Lint with clippy
run: cargo clippy
- name: Lint with clippy
run: cargo clippy
82 changes: 41 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- 'v*.*.*'
- "v*.*.*"

jobs:
publish:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false
binary_ext: '.exe'
binary_ext: ".exe"

- os: macos-latest
target: x86_64-apple-darwin
Expand All @@ -48,47 +48,47 @@ jobs:
strip: strip

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}

- name: Install required dependencies
shell: bash
run: |
if [[ ${{ matrix.target }} == x86_64-unknown-linux-musl ]]; then
sudo apt-get update
sudo apt-get install -y musl-tools
fi
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
sudo apt-get update
sudo apt-get install -y binutils-aarch64-linux-gnu
fi
if [[ ${{ matrix.target }} == arm-unknown-linux-gnueabihf ]]; then
sudo apt-get update
sudo apt-get install -y binutils-arm-linux-gnueabihf
fi
- name: Install required dependencies
shell: bash
run: |
if [[ ${{ matrix.target }} == x86_64-unknown-linux-musl ]]; then
sudo apt-get update
sudo apt-get install -y musl-tools
fi
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
sudo apt-get update
sudo apt-get install -y binutils-aarch64-linux-gnu
fi
if [[ ${{ matrix.target }} == arm-unknown-linux-gnueabihf ]]; then
sudo apt-get update
sudo apt-get install -y binutils-arm-linux-gnueabihf
fi
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: build
args: --target ${{ matrix.target }} --release --locked
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: build
args: --target ${{ matrix.target }} --release --locked

- name: Strip binary
if: matrix.strip
run: ${{ matrix.strip }} target/${{ matrix.target }}/release/agg${{ matrix.binary_ext }}
- name: Strip binary
if: matrix.strip
run: ${{ matrix.strip }} target/${{ matrix.target }}/release/agg${{ matrix.binary_ext }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/agg${{ matrix.binary_ext }}
asset_name: agg-${{ matrix.target }}${{ matrix.binary_ext }}
tag: ${{ github.ref }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/agg${{ matrix.binary_ext }}
asset_name: agg-${{ matrix.target }}${{ matrix.binary_ext }}
tag: ${{ github.ref }}

0 comments on commit 0b6b0bf

Please sign in to comment.